Skip to main content

Execute next priority after Voicemail call

Posted by eherr on Wed, 04/18/2012

I have 1.4.26 multitenant.

I have a DID going to a voicemail box.

I tried to adjust the code for goto-voicemail but it doesnt return to execute the next priority.

Does the Voicemail app hangup the channel and never return control back to the scripts?

--E


Submitted by eeman on Wed, 04/18/2012 Permalink

more details are required.. not even sure what the heck you're describing. there is no 'next' if voicemail answers.. the user normally hangs up.

dialplan examples work best

Submitted by eherr on Wed, 04/18/2012 Permalink

/etc/asterisk/inbound_actions.include
[from-outside-+19145551212-tl-allhours-testCompany]
exten => +19145551212,1,Set(__tenant=testCompany)
exten => +19145551212,2,Set(CDR(userfield)=testCompany)
exten => +19145551212,3,Set(MOH=${DB(TL/MOH/default${TL_DASH}${tenant})})
exten => +19145551212,n,GotoIf($["${MOH}" = ""]?nomoh)
exten => +19145551212,n,SetMusicOnHold(${MOH})
exten => +19145551212,n(nomoh),Macro(eh-goto-voicemail-notify,335@default-testCompany,u,)


/etc/asterisk/user_scripts.include
[macro-eh-goto-voicemail-notify]
exten => s,1,NoOp("*********************************")
exten => s,n,VoiceMail(${ARG1},${ARG2})
exten => s,n,NoOp("!!!!!!!!!!!!!")

exten => o,1,GotoIf($["${ARG3}" = ""]?check)
exten => o,n,Set(OPERATOR=${ARG3})
exten => o,n(check),GotoIf($["${OPERATOR}" != ""]?dial)
exten => o,n,Set(OPERATOR=0)
exten => o,n(dial),Dial(Local/${OPERATOR}@from-inside${TL_DASH}${tenant})

exten => a,1,VoiceMailMain(${ARG1})
exten => a,n,Hangup

the exten => s,n,NoOp("!!!!!!!!!!!!!!!!!") never plays

Submitted by eeman on Wed, 04/18/2012 Permalink

and it never ever will.. the application VoiceMail stays engaged until the caller hangs up or the application reaches a voicemail.conf setting of max call length in wich case the application hangs up. the only way out of Voicemail is to zero out or hit star

this is an asterisk thing, not a thirdlane thing.

Submitted by eherr on Wed, 04/18/2012 Permalink

I understand if this is asterisk and not thirdlane but if i should cease with my inquiry, let me know.

My question continues with if there is no way to execute after Voicemail call, then why when I put

exten => h,1,NoOp(!!!!!!!!!!!!)

at the end of the macro, it displays the !!!!!!!!!!!?

Submitted by eeman on Wed, 04/18/2012 Permalink

because you redefined something to execute on a hangup.. h is the hangup extension.. you dont have to have a call connected to execute that. what exactly are you trying to achieve?

Submitted by eherr on Wed, 04/18/2012 Permalink

nothing as of yet. i wanted to be able to regain control of the execution of a script after voicemail call and i was not able to see where the Voicemail app returned control to so i can begin to work on some after the call scripts.

I didnt know until 10 minutes ago, nor do I want to leave other extensions active while I interjected with an H extension. I would rather return to the control of the parent extension if there is one and modify from there.

Submitted by eeman on Wed, 04/18/2012 Permalink

VoiceMail is a self-contained IVR system with its own prompts etc and offers no such flexibility. Once you call VoiceMail its the end of your dialplan, with the exception of the o and a extensions. In order to re-define the behavior and customize how voicemail works on your system you would need to use the Mini-Voicemail set of tools they built for the 1.8 branch. See below link for reference. They even give you example dialplan of how the individual mini applications can collect your data while giving you the flow to manipulate and customize other features.

http://www.asterisk.org/doxygen/trunk/App_minivm.html