[asterisk-bugs] [Asterisk 0014777]: No RTP ports remaining. Can't setup media stream for this call.

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Mar 30 10:26:51 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=14777 
====================================================================== 
Reported By:                lamsoft
Assigned To:                lmadsen
====================================================================== 
Project:                    Asterisk
Issue ID:                   14777
Category:                   Channels/chan_sip/General
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     assigned
Asterisk Version:           1.6.1.0-rc3 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-03-29 10:19 CDT
Last Modified:              2009-03-30 10:26 CDT
====================================================================== 
Summary:                    No RTP ports remaining. Can't setup media stream for
this call.
Description: 
I'm running Asterisk on VMWare under Windows 2003 Server using VMWare NAT.
Because I have to input the port mapping manually (Asterisk is behind
NAT), I just assigned 26 ports from 20000 - 20025, but I think it is enough
for me to use because I just have 3 SIP peers.

reinvite set to "no" in sip.conf

There are two PSTN account, 
one is VOIP type, provided by my ISP, the number is 3xxx-xxxx
and the other one is using Linksys SPA-3102, physically connected to a
PSTN line provided by my service provider, the number is 2xxx-xxxx

When I run "netstat -nap | grep asterisk", there are no RTP port being
used initially.
I call the PSTN number 3xxx-xxxx, 2 RTP ports assigned, and the rule is
forward to a voice menu to select which extension you want to call, I enter
the extension number, 6 RTP ports assigned, when I disconnect the call,
there are 2 RTP ports using, it seems ok that ASTERISK know the call is
disconnected and release that RTP port.

But if I call the PSTN Number 2xxx-xxxx, my ATA-Box forward that call to
asterisk, and same, select the extension to call, after that, 8 RTP ports
being used, and after disconnect the call, asterisk does not release the
RTP ports, and so on more and more ports are being used and finally an
error is shown in "asterisk -r":

[Mar 28 23:24:17] ERROR[9140]: rtp.c:2517 ast_rtp_new_with_bindaddr: No
RTP ports remaining. Can't setup media stream for this call.
[Mar 28 23:24:17] WARNING[9140]: chan_sip.c:6272 sip_alloc: Unable to
create RTP audio session: Address already in use

What I can do is either "core restart now" or "service asterisk restart"
to force asterisk to release all the RTP port.
====================================================================== 

---------------------------------------------------------------------- 
 (0102392) lamsoft (reporter) - 2009-03-30 10:26
 http://bugs.digium.com/view.php?id=14777#c102392 
---------------------------------------------------------------------- 
Sorry may be my poor english, a SWF video is uploaded for easier
understanding.
After finish each call, 2 more UDP ports is being occupied and didn't
release, and so on finally all the RTP ports was being used and cannot make
a new call.

Thank you.

Download Link: http://www.sendspace.com/file/gm8rex (5.05MB)

HKBN_PSTN Trunk Setup in users.conf
[HKBN_PSTN]
disallow = all
allow = ulaw,alaw
context = DID_HKBN_PSTN
canreinvite = no
hasexten = no
hasiax = no
hassip = yes
host = dynamic
type = peer
qualify = yes
registeriax = no
registersip = no
secret = password
trunkname = HKBN_PSTN
trunkstyle = customvoip
username = HKBN_PSTN
insecure = port,invite
dtmfmode = inband
nat = no
transport = tcp,udp 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-03-30 10:26 lamsoft        Note Added: 0102392                          
======================================================================




More information about the asterisk-bugs mailing list