High cpu usage for asterisk & events/0, zap channels dow

Hello - we’re having an intermittent issue in that our Asterisk box works fine for hours/days at a time, but suddenly the zap channels go down (busy when dialing in), and the system processes show ‘asterisk’ at 50% CPU usage and ‘events/0’ at 50% cpu usage. If asterisk is restarted at this point, everything goes back to normal, but if one attempts to make an outbound call, the entire server locks up and must be cold restarted.

We’re unable to find any common factor amongst all the times that this is happened (about 5-6), but it does appear that Zap channels are not releasing before it happens. It might be a result of it, or the cause of it, it’s hard to tell. We just notice in the logs that calls start going out/coming in on 2/1 and 3/1 instead of 1/1, when 1/1 should have freed up long before.

This is a new installation that’s only been up for a week and has always had this issue. It’s on a 2.6.26-5 kernel from a Debian kernel image, asterisk version 1.4.21.2 from the Debian apt package, zaptel 1.4.12.1, and wanpipe-3.3.14. Our Zap channels go over a 23 channel PRI line.

Does this sound like an Asterisk issue or a driver issue? Has anyone seen anything like this before? It appears something is triggering off a fast loop or something to eat up so much CPU, but I have no idea where to proceed. Thanks a lot for your time.

It sounds like you need to look at the dialplan as i guess if you do a show channels you will find a few stuck ones.

Ian

Thanks for the response - I have some new information that seems like it may not be dialplan related, but let me know what you think.

Last night I was able to trigger the scenario - while no one was calling in or out on the system (verified by the logs), I kept calling in over and over again, just hanging up once the auto attendant started speaking. After doing that about 10 times, I called in, dialed an extension, waited until the voicemail started, hung up. Then I called in a few more times, always calling in immediately after hanging up (hanging up right after the line picked up, not dialing an extension). On the second or third time, when the system picked up, I didn’t hear the normal message playback, I just got dead silence, and thats when the CPU activity started going to 50% for ‘asterisk’ and ‘events/0’.

I later tried to do these same steps again, but it didn’t trigger it off. I can verify no one else was calling into the system while I did the above.

Hi

what does the dialplan for the ivr looklike ?

post the full context that calls come into. I assume you have a h t and i extenion in it

As With no debug or dialplan cant realy offer much help.

Ian

I do have i and t extensions defined, but I don’t have the h extension defined - what would I put in it? Is there a way to force the zap channel to close out when a hang up is detected? Do I need to do a soft hangup? Thanks for your help, below is the context my calls come into

[cp-external]

; Branch analog/no DNIS, shouldn’t get here
exten => s,1,Answer
exten => s,n,Goto(cp-external2,s-${CALLERID(dnid)},1)

; Intercept any extension with an answer first, then
; brance to appropriate extension
exten => _XXXX,1,Answer
exten => _XXXX,n,Goto(cp-external2,s-${CALLERID(dnid)},1)

[cp-external2]
; Ben’s DiD
exten => s-5046,1,Macro(stdexten,101@default,SIP/101)
exten => s-5046,n,Hangup

; Sherrin’s DiD
exten => s-5184,1,Macro(stdexten,106@default,SIP/106)
exten => s-5184,n,Hangup

; Meetme Conference
exten => s-4025,1,Meetme(|s)
exten => s-4025,n,Hangup

; Virtual Fax Main
exten => s-6541,1,Macro(faxreceive,an email address)
exten => s-6541,n,Hangup

; Virtual Fax Private
;exten => s-6546,1,Macro(faxreceive,an email address)
exten => s-6546,1,Macro(faxreceive,an email address)
exten => s-6546,n,Hangup

; All other numbers dialed lead to normal context
exten => _s-.,1,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds
exten => _s-.,n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds
exten => _s-.,n,Background(cpgreet)
exten => _s-.,n,WaitExten

; Connect to extension if dialed
exten => _1XX,1,Macro(stdexten,${EXTEN}@default,SIP/${EXTEN})
exten => _1XX,n,Background(cpgreet)
exten => _1XX,n,WaitExten

; Company directory
exten => *,1,Directory(default|cp-external2)
exten => *,n,WaitExten

; Menu items
exten => 2,1,Macro(stdexten,101@default,SIP/101) ; Sales - Ben
exten => 3,1,Macro(stdexten,102@default,SIP/102) ; Accounting - Kelly
exten => 4,1,Macro(stdexten,103@default,SIP/103) ; Client Services - Noah

; Catch invalid entries
exten => i,1,Playback(invalid)
exten => i,n,Background(cpgreet)
exten => i,n,WaitExten

; Catch timeout
exten => t,1,Background(cpgreet)
exten => t,n,WaitExten

First obvious one jumping out at me is WaitExten without a timeout.

should be WaitExten(10) for ten seconds etc

Ian

I went through and changed them all to WaitExten(10), and I was hoping that fixed it, but it just happened again. Any other ideas?