Couldn’t Allocate A Port For RTP Instance
Hello,
my logs are flooded with:
WARNING: The ‘stasis/m:cdr:aggregator-00000005’ task processor queue reached 5000 scheduled tasks again.
and then, when call came, I got this:
ERROR: Oh dear… we couldn’t allocate a port for RTP instance
‘0x6e1e680fd670’
WARNING: Unable to cancel schedule ID 0. This is probably a bug
(res_rtp_asterisk.c: dtls_srtp_stop_timeout_timer, line 2873).
any idea what is happening, or how to troubleshoot his ?
—
4 thoughts on - Couldn’t Allocate A Port For RTP Instance
> this happens when phone is set to “Do not disturb” and a call comes. Also, on the phone I see 19 missed calls, not just 1 missed call
—
This means there’s a ton of channel events being created.
This means that there are a ton of channels or sessions up that are using all the RTP resources.
There is insufficient information. You’d need to state what version of Asterisk, as well as which channel driver to begin with. Showing a console log may also provide information.
> thank you, I found the problem:
I had this in extensions.conf:
same => n,GotoIf($[ “${DIALSTATUS}” = “BUSY” ]?6:7)
and then I added one line above that, and forgot to adjust the numbers. So basically, the rule was going in an cycle.
Is there a better way than to use hardcoded numbers for GotoIf ?
—
Yes. Use labels[1][2][3].
[1]
https://wiki.asterisk.org/wiki/display/AST/Goto+Application+and+Priority+Labels
[2]
https://wiki.asterisk.org/wiki/display/AST/Contexts,+Extensions,+and+Priorities#Contexts,Extensions,andPriorities-Applicationcalls
[3]
https://wiki.asterisk.org/wiki/display/AST/Asterisk+20+Application_GotoIf