[asterisk-bugs] [Asterisk 0010743]: Separate RTP pool for remote vs. local connections

noreply at bugs.digium.com noreply at bugs.digium.com
Thu Nov 1 16:03:56 CDT 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=10743 
====================================================================== 
Reported By:                jamessan
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   10743
Category:                   Core/RTP
Reproducibility:            always
Severity:                   feature
Priority:                   normal
Status:                     new
Asterisk Version:            SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 82568 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             09-17-2007 10:25 CDT
Last Modified:              11-01-2007 16:03 CDT
====================================================================== 
Summary:                    Separate RTP pool for remote vs. local connections
Description: 
Currently, Asterisk only has the notion of a single pool of RTP ports.  In
my setup (and I doubt this is uncommon), I have phones using my Asterisk
system from both the local network and remote network.  I'd like to be able
to limit the number of calls that can be made to/from the remote network
since my Asterisk system isn't very powerful and local<->remote calls
require Asterisk acting as a middle-man for the entirety of the call.  This
isn't a problem with local<->local calls because the phones REINVITE to
each other and don't involve Asterisk except for SIP signaling.

Simply limiting Asterisk's current RTP pool isn't an option because I
don't want to impose an artificial limitation on how many local calls can
be made.  Restricting the number of ports that are forwarded to Asterisk
from my firewall also isn't an option as the RTP port is chosen at random
and if Asterisk chooses one that I haven't forwarded, part of the audio
stream is lost.

To address this, I've created a patch for rtp.{c,h} which has allows the
user to specify remotertpstart/remotertpend along with the rtpstart/rtpend
options in rtp.conf.  I've also patched chan_sip.c to use the remote RTP
pool when it detects that the call leg it is processing is an external
call.
====================================================================== 

---------------------------------------------------------------------- 
 jamessan - 11-01-07 16:03  
---------------------------------------------------------------------- 
That's an interesting idea.  I'll have to look into whether I can easily
differentiate between remote and local users in our setup.

The bigger issue which I didn't mention in my initial report is that my
setup uses UPnP to attempt mapping ports on the router for RTP.  With the
current single RTP pool Asterisk, how many ports get configured on the
router determines how many calls can be made, whether they're purely
local<->local or involve a remote leg.  If I configure Asterisk to use the
number of RTP ports that's acceptable to support the number of
local<->local calls, then I risk Asterisk trying to use a port that wasn't
mapped on the router and therefore losing voicepath.

The above patches fix this problem as I can tell Asterisk "I got N ports
for remote calls and you can use M ports for local calls." 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
11-01-07 16:03  jamessan       Note Added: 0072932                          
======================================================================




More information about the asterisk-bugs mailing list