[SR-Users] Kamailio behind NAT

Klaus Darilion klaus.mailinglists at pernau.at
Tue Jan 21 14:25:51 CET 2014



On 21.01.2014 13:24, John Smith wrote:
> I might be making wrong assumptions regarding this traffic flow. Is that correct?

That depends on your policy. It is up to you to define how RTP should be 
routed. There are basically 2 choices:

a) RTP from clients is handled by rtpproxy:

phone1 <-nat-> rtpproxy <--> Asterisk <--> rtpproxy <-nat-> phone2

In this case, only the private IP of Kamailio and rtpproxy (can be the 
same IP address) must be mapped to a public IP address.


b) RTP directly to Asterisk:

phone1 <-nat-> Asterisk <-nat-> phone2

In this case, the private IPs of Kamailio and Asterisk must be mapped to 
a public IP address.


When using version a) you have to make sure to set the proper IP address 
in the SDP. For example, SDPs in messages from Kamailio to the phone 
must contains the PUBLIC IP of rtpproxy in the c=... line. SDPs in 
messages from Kamailio to Asterisk must contain the PRIVATE IP of 
rtpproxy in the c=... line.

regards
Klaus



More information about the sr-users mailing list