[Asterisk-Dev] How IAX workd behind the firewall
craigs at postincrement.com
Mon Jul 12 05:02:36 MST 2004
On Mon, 12 Jul 2004 06:17:10 -0600
Rich Adamson <radamson at routers.com> wrote:
> > That's H.323 I believe, SIP just uses one RTP port as stated in SDP payloads
> Sip 'will' require three ports for most calls...
> - udp5060 for the sip protocol (eg, handshaking)
> - udpXXXX for outbound rtp audio (specific port selected by *)
> - udpYYYY for inbound rtp audio (specific port selected by the remote device)
> The values of XXXX and YYYY are not specified in any RFC, and therefore
> are left up to the implementor to select a specific range of ports.
> Cisco uses a different range then does Xten, then does Grandstream, etc.
Actually, there are RFC-specified limitation on XXXX and YYYY. RFC 1889
(RTP) contains the following in chapter 10:
"For UDP and similar protocols, RTP uses an even port number and the
corresponding RTCP stream uses the next higher (odd) port number. If an
application is supplied with an odd number for use as the RTP port, it
should replace this number with the next lower (even) number."
And RFC 1890 says the following in chapter 7:
"Applications need not have a default [port pair] and may require that
the port pair be explicitly specified. The particular port numbers were
chosen to lie in the range above 5000 to accomodate port number
allocation practice within the Unix operating system, where port numbers
below 1024 can only be used by privileged processes and port numbers
between 1024 and 5000 are automatically assigned by the operating system."
But these limits only apply to the advertised ports on which RTP is to
be received - there are actually no limitations on the ports that can be
used to *send* RTP data. So in fact, RTP can use up to 4 ports - two
sockets for receiving, and two seperate sockets for sending.
Craig Southeren, craigs at postincrement.com http://www.postincrement.com
Post Increment - Software, Consulting and Services
Co-founder of the only open source H.323 project
Phone: +61 2 43654666 Fax: +61 2 43673140 Mobile: +61 417 231046
ICQ: #86852844 MSN: craig_southeren at hotmail.com
GnuPG Public Key: http://www.postincrement.com/pgp.txt
More information about the asterisk-dev