[Kamailio-Users] NAT traversal

Iñaki Baz Castillo ibc at aliax.net
Mon Feb 23 12:28:12 CET 2009


2009/2/23 BERGANZ François <francois at acropolistelecom.net>:
> Hello,
>
> I come back for NAT transversal.
> First, I am sorry if you think that I email a lot!

Well, you should understand that VoIp is complex, even more hen
dealing with NAT, so there is not a magic solution and some knowledge
is required.



> After some captures...
> I could see that the Nated phone tell in the 200ok that its RTP port is 192.168...
> "Peer audio RTP is at port 192.168.1.82:41000"
>
> I just have to find why the phone say it.
> And how to open a RTP port and tell it to my asterisk trough the SER.
> Have you an idea?

Please describe your topology: where is Asterisk? where are phones? NAT?

If Asterisk has public IP and phones are behind NAT you need a
solution for the RTP which could be:

a) Using Asterisk comedia mode (so Asterisk ignores the private
address in the phone's SDP and sends audio to the public address from
which receives audio from the phone. This is achieved by setting
"nat=yes" in the phone peer configuration.

b) Using a media proxy (RtpProxy or MediaProxy).

c) Using STUN in the phone (it requieres you have no symmetric NAT in
your router). With it, the phone discovers which public address and
port to write in the SIP headers and SDP so the other endpoint
(Asterisk in your case) will see it as not natted.



-- 
Iñaki Baz Castillo
<ibc at aliax.net>



More information about the Users mailing list