Asterisk and RTP ports

In a normal VOIP Call between two phones (or peers) asterisk consumes 2 or 3 RTP ports because maintains control of the call.
There is a way to configure asterisk release the control when the call is estabilished and so release the no more used RTP ports?

Thanks in advance


canreinvite=yes, plus some other conditions, possibly relating to NAT, and certainly relating to not using any features that require Asterisk to watch for DTMF.

Thank you for your reply. I am new to asterisk and don’t know much of the argument.
I have tried your solution, but the RTP (and RTCP) Port occupation is always of 3 for every call.

The Environment is this: a phone central, the Asterisk computer and a Windows Computer running Microsoft Speech Server 2007.
The Speech Server acts as an IVR and the asterisk is used to route some calls between the phone central and the speech server when we need to play a message before the call is esabilished.
There are some scenarios when the Asterisk is bypassed and the comunication is between the central and Speech Server directly.
In that case the RTP Port occupation iis of only 1 at every call.
If the call instead pass from asterisk, the occupation is always 3 or more ports every call.
We need to lower this number.
We are using Asterisk



There should only be two RTP ports in active use. I don’t know about RTCP. I assumed it used the same ones, but, if not, I would expect two ports as well.

I don’t know for certain that Asterisk releases RTP ports when not actively using them. That would risk a re-invite back failing. Our concern is traffic, not the number of ports.

You should probably do sip show history on the connections, to see if Asterisk is attempting an external bridge. As it looks as though there is no NAT involved, the only reason for not attempting would either be that you only have early media, or that you have enabled transfers, or something else that needs DTMF to be monitored.