[asterisk-users] RTP port ranges

Tony Mountifield tony at softins.co.uk
Fri Sep 13 05:31:41 CDT 2013


In article <5232DCBC.20803 at telenet.be>,
Jonas Kellens <jonas.kellens at telenet.be> wrote:
> 
> I have defined that I want to receive audio (RTP) on port 11500 till 
> 11954 (rtp.conf).
> 
> The same range I have defined in my firewall.
> 
> I now see that an IP-address gets blocked by my firewall because there 
> are packets coming onto port 11955.
> 
> 
> How come the client sends audio on port 11955 when I clearly define in 
> my SDP-body that I want to receive audio on port range 11500 till 11954 ?
> 
> What makes the client choose this port number when it is not allowed ?

An RTP connection typically uses a pair of adjacent ports. The even port
for the RTP stream, and the next port up (odd) for RTCP reports.

So when defining a port range, you should probably make the lower port
number even and the upper port number odd.

(so the default 10000-20000 is probably wrong too, and should be 10000-19999)

It also means that you should allow at least twice as many ports as the
number of simultaneous calls you want to handle.

Cheers
Tony
-- 
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org



More information about the asterisk-users mailing list