Oprhaned Voicemail Channels


I am currently using Asterisk a centralized voicemail server for around 15 PBXs. Several times now we have seen an issue where otherwise hung-up calls hang on the system in VoiceMailMain() or Voicemail() applications. After a few of these channels, voicemail stops working entirely and all calls hang, leading to upwards of 70-100 orphaned channels that are stuck open, e.g.

Channel              Context              Extension        Prio State   Application  Data                      CallerID        Duration Accountcode PeerAccount BridgeID
SIP/tp-asterisk-0000 macro-voicemail      s                   3 Up      VoiceMail    3113@default,u            +1XXXXXXXXXX    00:26:10 tp                                                                         
SIP/pg-asterisk-0000 macro-vmadmin        myvm                1 Up      VoiceMailMai 2720@default              2720            00:48:55 pg

Has anyone had a similar experience or suggested resolution? My voicemail dialplans are pasted below for reference:


include => central-vmadmin                                                                                                                                                                                         
exten => _vm.,1,NoOp(-->Incoming Voicemail Call from Remote-->)                                                                                                                                                    
exten => _vm.,n,Set(VMEXTEN=${EXTEN:3})                                                                                                                                                                            
exten => _vm.,n,Set(ORIG_DIALSTATUS=${IF($["${EXTEN:2:1}"="b"]?BUSY:UNAVAIL)})                                                                                                                                     
exten => _vm.,n,NoOp(Remote Extension: ${VMEXTEN}, Dialstatus on Remote PBX: ${ORIG_DIALSTATUS})                                                                                                                   
exten => _vm.,n,Macro(voicemail,${VMEXTEN},${ORIG_DIALSTATUS})                                                                                                                                                     

exten => s,1,NoOp(Dialing Voicemail for ${ARG1})
exten => s,n,GotoIf($["${VM_INFO(${ARG1},exists)}"="0"]?nomailbox,1)
exten => s,n,ExecIf($["${ARG2}"="BUSY"]?VoiceMail(${ARG1}@default,b))
exten => s,n,ExecIf($["${ARG2}"!="BUSY"]?VoiceMail(${ARG1}@default,u))
exten => s,n,Playback(goodbye)
exten => s,n,Hangup()

exten => nomailbox,1,NoOp(*****No Mailbox for ${ARG1}*****)
exten => nomailbox,n,Playback(vm-no&ha/mailbox&for&extension)
exten => nomailbox,n,SayDigits(${ARG1})
exten => nomailbox,n,Playback(goodbye)
exten => nomailbox,n,Hangup()

exten => _va.,1,NoOp(-->Incoming Voicemail Check from Remote-->)
exten => _va.,n,Set(VMEXTEN=${EXTEN:2})
exten => _va.,n,ExecIf($["${VMEXTEN}"="98"]?Macro(vmadmin))
exten => _va.,n,ExecIf($["${VMEXTEN}"!="98"]?Macro(vmadmin,${VMEXTEN}))


exten => s,1,NoOp(*****Accessing Voicemail System*****)
exten => s,n,Answer()
exten => s,n,Set(MAILBOX=${ARG1})
exten => s,n,Set(VMCONTEXT=${ARG2})
exten => s,n,ExecIf($["${VMCONTEXT}"=""]?Set(VMCONTEXT=default))
exten => s,n,GotoIf($["${MAILBOX}"=""]?general,1)
exten => s,n,Goto(myvm,1)


Are you using ODBC or IMAP or anything? What version of Asterisk is in use?

What is the state of the SIP channel?

Asterisk version is Asterisk certified/13.21-cert, and we are just using default file storage for voicemail. However, we are using Realtime Voicemail configuration via ODBC.

All channels show as being “UP” when doing a ‘core show channels’

Thanks all for the quick follow up.

I’d suggest using the current mainline version and seeing if the problem is resolved. If instead you have a support agreement you should contact Digium Technical Support for assistance[1].

[1] https://www.digium.com/support

Sorry, it’s 13.21-cert4, which seems to be the most recent version of Certified Asterisk? (we only use the Certified releases). However, this previously happened on 13.13 as well…I updated to 13.21-cert4 recently to try to resolve the problem.

Certified is an older version of Asterisk and only receives fixes as a result of commercial agreement customers raising issues. Unless you have a support agreement any fixes as a result of this would not be merged into it. To ensure it’s still an applicable issue it’s best to use the current release (13.28.0) and see if it occurs there. If it does still occur you’ll need to get a backtrace[1] and file an issue on the issue tracker[2].

[1] https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace#GettingaBacktrace-GettingInformationForADeadlock
[2] https://issues.asterisk.org/jira

OK, thanks, I’ll give 13.28 a try and see how it goes. Thanks for your help!

I recommend adding a ABSOULUTE timeout to your dialplans.

In my voicemail leave dialplan I set

same => n,Set(TIMEOUT(absolute)=900);

Based on the maximum length of messages I allow + some fudge factor to let callers re-record if needed.

in my voicemail check dialplan I set

same => n,Set(TIMEOUT(absolute)=3600)

To allow for users to listen to multiple voicemails or to re-listen multiple times.

Thanks! I’ve added that in, although I was less generous with the times haha :wink:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.