Re: [SR-Users] SIP routing problem when kamailio uses 2 interfaces

2010-08-26 Thread Klaus Darilion

I think you have multiple issues:

(not sure if I am right as I have to guess your network setup)

1. If Kamailio is an Application Layer Gateway between the public and 
the internal network, then of course Asterisk should listen only on the 
internal interface. Thus in sip.conf add:


  udpbindaddr = internal.ip.add.ress

Further you can tweak if Asterisk should use internal or public IP 
addresses inside the SIP message headers by playing around with

  externip = ...
  localnet = ...

2. Regardless of the Via header inserted by Kamailio Asterisk should 
respond to the IP address from which Kamailio sent the request. Thus I 
guess Kamailio sent the request with the public IP address as source IP.


To have Kamailio acting correctly you have to make sure that Kamailio is 
listening on both interfaces 
(http://sip-router.org/wiki/cookbooks/core-cookbook/devel#listen):


  listen=udp:public.ip.add.ress:5060
  listen=udp:internal.ip.add.ress:5060

and activate multihoming feature of Kamailio to have proper IP addresses 
in Via and Record-Route headers 
(http://sip-router.org/wiki/cookbooks/core-cookbook/devel#mhomed)


  mhomed=1

regards
Klaus

Am 22.08.2010 04:46, schrieb Gnaneshwar Gatla:

Hello All,

I'm using Kamailio as a Border controller for my VoIP Research project at my
school.
The problem I'm facing is Kamailio routes the traffic to the private network
where my asterisk machine is listening.
The asterisk machine responds to the Kamailio using the public network but
not the private. Is this an issue with Asterisk? If so how do I resolve it?

   client   kam_publicKam_pvt  Ast_pvtAst_public
|   |   |   |
|
|   |   |   |
|
|INVITE |   |   |
|
||  |INVITE |   |
|   |   |--||
|   |   |   |
|
|   |   |   |
|
|   |   |   |
|
|   |   | 404   |
|
|   |--|---|---|
|   |   |   |
|
|   |   | ACK   |
|
|   |   |--||
|   |   |   |
|
| 404   |   |   |
|
||  |   |   |
|   |   |   |
|
| ACK   |   |   |
|
||  |   |   |
|   |   |   |
|
|   |   |   |
|


Regards
Gnaneshwar


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] SIP routing problem when kamailio uses 2 interfaces

2010-08-24 Thread Gnaneshwar Gatla
Hello All,

I'm using Kamailio as a Border controller for my VoIP Research project at my
school.
The problem I'm facing is Kamailio routes the traffic to the private network
where my asterisk machine is listening.
The asterisk machine responds to the Kamailio using the public network but
not the private. Is this an issue with Asterisk? If so how do I resolve it?

  clientkam_publicKam_pvt  Ast_pvtAst_public
|   |   |   |
|
|   |   |   |
|
|INVITE |   |   |
|
|| |INVITE |   |
|   |   |--|   |
|   |   |   |
|
|   |   |   |
|
|   |   |   |
|
|   |   | 404   |
|
|   |--|---|---|
|   |   |   |
|
|   |   | ACK   |
|
|   |   |--|   |
|   |   |   |
|
| 404   |   |   |
|
|| |   |   |
|   |   |   |
|
| ACK   |   |   |
|
|| |   |   |
|   |   |   |
|
|   |   |   |
|


Regards
Gnaneshwar


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users