rtp.conf
Configuration of Asterisk Real Time Protocol, RTP, media channels. RTP is used for SIP communication.
Details
On your router you might want to arrange both traffic shaping (QoS) and port forwarding (in case of NAT) for the RTP range that you chose
For each RTP port, you also open RTCP port. Therefore a call can consume up to 4 RTP ports.
The first port of the range should be even, so 10001 won’t be used (use 10000 or 10002 instead); the last port must be uneven, and if you specify e.g. 10017 as last in range asterisk will actually use 10018, so be aware!
Question2:
- maybe ports aren’t released directly by Asterisk after the call has completed?
- does Asterisk allocate RTP ports for each member in a group dial (DIAL(SIP/device1&SIP/device2) before the actual call is established?
Check with “netstat -anup” or “netstat -anu” for open ports
Experience shows that often Asterisk seems to consume more RTP ports (or RTP port numbers) than one would expect, so it is most probably not a good idea to reduce the RTP port range to exactly 4 times the maximum number of concurrent calls…
Related issues:
- bug 14777 and bug 11257: Error “No RTP ports remaining. Can’t setup media stream for this call.”
- one possible cause/solution: check if ulimit is set high enough
- possible related: bug 8036
Example
;
; RTP Configuration
;
[general]
;
; RTP start and RTP end configure start and end addresses
;
rtpstart=10000
rtpend=20000
If you have a NAT or firewall between Asterisk and the server, you need to set these up to handle forwarding of the configured ports.
Related:
- RTP – Real Time Protocol