no rtp ports remaining

ambroisie
Posts: 119
Member Since:
2007-10-30

hello

wonder if anyone has seen this problem. i today experienced a problem with my users being unable to make or receive calls. the debug messages showed

Apr 30 15:31:14 ERROR[8272] rtp.c: No RTP ports remaining. Can't setup media stream for this call.
Apr 30 15:31:14 ERROR[8272] rtp.c: No RTP ports remaining. Can't setup media stream for this call.
Apr 30 15:31:14 WARNING[8272] chan_sip.c: Unable to create RTP audio and video session: Address already in use

i fixed the issue by restarting the system. wonder if there is an issue with ports not being released. i have my system configured for RTP to use 10001-10021 which should be more than enough for 6 extensions, usually at any one time there are no more than 2-3 calls on the system. this was true when this problem was experienced.

is there a way of checking what ports are in use ?

is there a way of releasing ports ?

is there a timeout or audit process that needs to be modified ?

any suggestions to prevent a reocurrence would be much appreciated

cheers

David

PS: i am running TB 2.2 on this system....it has bene running for months without any issue albeit i only changed the RTP port to this range about 2 weeks ago



SkykingOH
Posts: 2619
Member Since:
2007-12-17
Check you

Check you /etc/asterisk/rtp.conf

In the Asterisk CLI show channels, channels = RTP ports.

Scott

--

Scott

aka "Skyking"



jahyde
Posts: 1972
Member Since:
2006-06-02
you need RTP ports for each

you need RTP ports for each phone, plus for each SIP trunk (sounds like you have SIP trunks?)

but looks like you should have enough for 5 calls - just check here for proper RTP settings and how it works to verify everything:
http://www.fridu.org/content/view/38/55/

I usually dont limit it that much, maybe 10000-10050 at most.

--

--my PBX is run on 2 V8's



eoo
Posts: 448
Member Since:
2006-10-30
2 RTP ports per channel. if

2 RTP ports per channel. if you are using SIP trunks, that's 2 ports per trunk. 6 phones on 6 trunks = 24 ports required, or three more than you have allowed.

I would widen the range a bit.



karllui2008
Posts: 113
Member Since:
2007-10-18
RTP ports are dynamically

RTP ports are dynamically assigned. If maximum only 3 concurrent calls at a given time, only 12 RTP ports are needed. Widening the range may solve the problem but we don't know the root cause at this point.



eoo
Posts: 448
Member Since:
2006-10-30
OP says usually 2-3 calls,

OP says usually 2-3 calls, not max.

You should be able to backtrack through logs starting from when this happens and see exactly how many calls were taking place and how many channels, and therefor RTP ports, were in use.



SkykingOH
Posts: 2619
Member Since:
2007-12-17
Yep, that's why I asked him

Yep, that's why I asked him to post his rtp.conf so we could see if something got messed up.

Scott

--

Scott

aka "Skyking"



ambroisie
Posts: 119
Member Since:
2007-10-30
hi chaps...apologies for the delay

been rather busy and have been monitoring this issue but it has not reoccurred - guess that is good and bad. i also found about half a dozen other references (google) to same issue dating back to 2003 or so when digium did do some fixes to asterisk code, but also found a number of instances since when the problem appears to have been a one off. seems to be the same here. at least i know what i can do to monitor it (netstat -na seems to be a good way of tracking the number of open ports and to see if this is increasing - some other instances of this problem seem to have resulted in people losing the entire 10000 port range they had allocated).

my rtp.conf is very simple....
/etc/asterisk/rtp.conf
rtpstart=10001
rtpend=10021



16again
Posts: 251
Member Since:
2007-03-04
as far as I know: -for each

as far as I know:
-for each RTP port, you also open RTCP port
-a call can take up 4 ports
-first port should be even, so 10001 won't be used
-SIP trunks also use rtp ports

Maybe ports aren't released directly
What happens when calls are put on hold...? This way a phone takes up N times 4 ports!

I'd just double your RTP range



ambroisie
Posts: 119
Member Since:
2007-10-30
interesting

first port should be even...never heard of that one before...and i do know (have seen) it been used...but i think the uptake here is i should probably increase the number of ports !



16again
Posts: 251
Member Since:
2007-03-04
http://en.wikipedia.org/wiki/

http://en.wikipedia.org/wiki/Real-time_Transport_Protocol
RTP does not have a standard TCP or UDP port on which it communicates. The only standard that it obeys is that UDP communications are done via an even port and the next higher odd port is used for RTP Control Protocol (RTCP) communications.



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.