Firewall port settings for RTP/RTCP

Get help with installing and running AsteriskNOW.

Moderators: Moderator, Support

Firewall port settings for RTP/RTCP

Postby kclive » Thu Dec 10, 2015 9:58 am

I am running Asterisk 11.2.1 and am using it to make SIP calls between clients on both LAN and WAN. I have set up the firewall with the appropriate port forwarding and NAT policies, and am able to make calls almost all of the time.

However, I've had instances of one-way audio while load-testing my system with calls. From reading the documentation about rtp.conf, I know that for each RTP port, an RTCP port = RTP port + 1 is used. I have defined a wide enough range (rtpstart and rtpend) for the number of clients I have, and I know my firewall has the exact same range forwarded.

Is it possible that, under a loaded scenario where unused RTP ports are scarce, that Asterisk could choose rtpend as the RTP port, and rtpend + 1 (outside firewall range) as the RTCP port? Do I have to allow for this possibility on my firewall? I want to know for certain whether this is the case or not so I can move further in my root cause analysis.

Thank you!
kclive
Newsterisk
 
Posts: 1
Joined: Thu Dec 10, 2015 9:45 am

Re: Firewall port settings for RTP/RTCP

Postby david55 » Fri Dec 11, 2015 7:59 am

Looking at http://svn.digium.com/svn/asterisk/trun ... asterisk.c the end is the highest port number used for RTP, not the highest port number used.

Also, in that version (the last one on SVN), it appears to be rounding by masking with the wrong mask - it should be using -2, but it is using -1 - and it doesn't seem to be consistent about which way it round, and looks like it will get the even and add crossed if it actually wraps.

Incidentally, it starts looking for a free number at a random position.

PS This doesn't relate to the installer, so is more likely to be seen on Asterisk Support.
david55
Moves Like Spencer
 
Posts: 12570
Joined: Fri Sep 26, 2008 5:03 am


Return to AsteriskNOW Support

Who is online

Users browsing this forum: No registered users and 7 guests