[Asterisk-Users] Q about IAX (and IAXy)

Antony Stone Antony.Stone at Asterisk.Open.Source.IT
Sat Dec 18 17:35:41 MST 2004


On Sunday 19 December 2004 00:26, Nabeel Jafferali wrote:

> I have heard many times that IAX is "NAT-transperant". I am unsure how
> it accomplishes this.
>
> I do know that SIP works like this: your SIP device send a request to
> the SIP server (usually on port 5060) with whatever command. The SIP
> server respends to your device's "apparent" IP and port (this is decided
> depending on how that NAT is set up, STUN, etc.). The voice is then sent
> to the "apparent" RTP port on your device (deciding what that is, again,
> would depend on the NAT set up).

Note that in the above description, the SIP communication is one phase of the 
process, RTP (the audio channel) is a separate phase, and operates on totally 
different UDP ports from the SIP phase.   The UDP ports used by RTP vary for 
each conversation, and therefore cannot be known about by a firewall or NAT 
device in advance.

> How does IAX eliminate this problem of ports being "mapped" by your NAT
> router and external IPs? Does it use one port for both commands and
> voice packets? Does the remote server just use the "received from" IP
> address and port to respond?

Yes.   IAX uses just a single port (UDP 5036) and IAX2 uses just a single port 
(4569) to send both call setup and audio data between the endpoints.

Therefore a NAT device between two IAX systems has only a single channel, on a 
well-known port number, to deal with, and this is simple to do.

> Finally, would an IAXy work seamlessly in a configuration where it is
> plugged into a NAT router which is plugged into another NAT router  -
> double NATted? The * server is on a public IP.

Yes, so long as both NAT routers allow reply packets back through, this will 
work (and if they don't, they're not much use for anything else either).

Regards,

Antony.

-- 
"The problem with television is that the people must sit and keep their eyes 
glued on a screen; the average American family hasn't time for it."

 - New York Times, following a demonstration at the 1939 World's Fair.

                                                     Please reply to the list;
                                                           please don't CC me.



More information about the asterisk-users mailing list