System jump to 99% CPU and NO calls

Today one of our systems running Asterisk 1.6.2.16 froze up and wouldn’t make or take a call. It’s a dual core Atom 510 with 4G of RAM and a solid state drive. There are approximately 50 exts and the system has a Digium PRI card that never has to do more than 5 or 6 simultaneous calls.

Here is what I found in the logs at the time it went down.

[Jul 27 09:26:40] VERBOSE[15013] pbx.c: – Executing [s@macro-dial:7] Dial(“DAHDI/3-1”, “SIP/2030&SIP/2010&SIP/2001,12,tTrwWM(auto-blkvm)”) in new stack
[Jul 27 09:26:40] ERROR[15013] rtp.c: No RTP ports remaining. Can’t setup media stream for this call.
[Jul 27 09:26:40] WARNING[15013] chan_sip.c: Unable to create RTP audio session: Address already in use
[Jul 27 09:26:40] ERROR[15013] chan_sip.c: Unable to build sip pvt data for ‘2030’ (Out of memory or socket error)
[Jul 27 09:26:40] WARNING[15013] app_dial.c: Unable to create channel of type ‘SIP’ (cause 42 - Switching equipment congestion)
[Jul 27 09:26:40] ERROR[15013] rtp.c: No RTP ports remaining. Can’t setup media stream for this call.
[Jul 27 09:26:40] WARNING[15013] chan_sip.c: Unable to create RTP audio session: Address already in use
[Jul 27 09:26:40] ERROR[15013] chan_sip.c: Unable to build sip pvt data for ‘2010’ (Out of memory or socket error)
[Jul 27 09:26:40] WARNING[15013] app_dial.c: Unable to create channel of type ‘SIP’ (cause 42 - Switching equipment congestion)
[Jul 27 09:26:40] ERROR[15013] rtp.c: No RTP ports remaining. Can’t setup media stream for this call.
[Jul 27 09:26:40] WARNING[15013] chan_sip.c: Unable to create RTP audio session: Address already in use
[Jul 27 09:26:40] ERROR[15013] chan_sip.c: Unable to build sip pvt data for ‘2001’ (Out of memory or socket error)
[Jul 27 09:26:40] WARNING[15013] app_dial.c: Unable to create channel of type ‘SIP’ (cause 42 - Switching equipment congestion)
[Jul 27 09:26:40] VERBOSE[15013] app_dial.c: == Everyone is busy/congested at this time (3:0/0/3)
[Jul 27 09:26:40] VERBOSE[15013] pbx.c: – Executing [s@macro-dial:8] Set(“DAHDI/3-1”, “DIALSTATUS=CHANUNAVAIL”) in new stack
[Jul 27 09:26:40] VERBOSE[15013] pbx.c: – Executing [s@macro-dial:9] GosubIf(“DAHDI/3-1”, “0?CHANUNAVAIL,1”) in new stack
[Jul 27 09:26:40] VERBOSE[15013] pbx.c: – Executing [7020@ext-group:15] Set(“DAHDI/3-1”, “RingGroupMethod=”) in new stack
[Jul 27 09:26:40] VERBOSE[15013] pbx.c: – Executing [7020@ext-group:16] GotoIf(“DAHDI/3-1”, “0?nodest”) in new stack
[Jul 27 09:26:40] VERBOSE[15013] pbx.c: – Executing [7020@ext-group:17] Set(“DAHDI/3-1”, “__NODEST=”) in new stack
[Jul 27 09:26:40] VERBOSE[15013] pbx.c: – Executing [7020@ext-group:18] NoOp(“DAHDI/3-1”, “Deleting: BLKVM/7020/DAHDI/3-1 TRUE”) in new stack
[Jul 27 09:26:40] VERBOSE[15013] pbx.c: – Executing [7020@ext-group:19] Goto(“DAHDI/3-1”, “ext-group,7021,1”) in new stack

You’ve either got an RTP socket leak, or you haven’t allocated a large enoug range of ports in rtp.conf. Start with the latter. Note that you need two ports for each leg, as you need an RTCP one as well as an RTP one.

If you’ve got a leak, you should try the end of line 1.6.2 release (1.6.2.19?), to see if that fixes it.

The range was 10000 to 10025. I set it back to the 10000 to 20000.

Thanks for the input.