How to Go Main Menu after giving Voicemail

Hi,

I have asterisk server running in RHEL4 with TDM2400 configured with 90 extensions approximately. How to configure asterisk in such way that after giving voicemail to particular extensions, it should go to main menu of asterisk or Exit.

For example i need like after giving voicemail, press ‘1’ to go to main menu or press ‘0’ to exit

Please help me to configure this feature.

Thanks in advance.

krishna kumar

below …

You can just call it after voicemail or even before voicemail. What I have setup is an IVR, from the menu you can call extensions, if an extension rings for 30 seconds a submenu comes up and asks if you would like to leave a message or return to the main menu… you may want to try this.

[default] ;whatever your default context is
exten => 01,1,Dial(SIP/phone1,30,tr)
exten => 01,2,Goto(submenu,s,1)

exten => 5555555555,1,Goto(mainmenu,s,1) ;incoming from PSTN

[mainmenu]
exten => s,1,Background(welcome) ;"Welcome, press 1 for phone1"
exten => s,n,WaitExten
exten => 1,1,Goto(default,01,1)

[submenu]
exten => s,1,Playback(not-available) ;"extension 01 is not available. Press 1 to leave a message or 2 to return to the main menu"
exten => s,n,WaitExten
exten => 1,1,VoiceMail,u01 ;replace '01' with mailbox number for phone1
exten => 2,1,Goto(mainmenu,s,1)

Hope that helps at all… Good luck!

Hi,

Thanks for the help,

Do I need to configure submenu for all the extensions configured in asterisk server or only one submenu will dofor all the extensions?

Well, in your case you wouldn’t want to have 90 different submenu’s and you also wouldn’t want to declare 90 different steps. What you need to do is figure out a method of telling asterisk automatically which voicemail to forward to after choosing 1 to leave a message. You could have your own voicemail context and just have all the mailboxes inside of it but you would need a way to call each specific one without typing unecessary code. The trick is to type as little as possible and still achieve what you want

I, unfortunately don’t have as many extensions because I am mainly dealing with just a test system so I did not run into this complication. But I would post a thread for this issue.

Good Luck to you and if you have any other questions I would be glad to take a stab at them…

Hi,

Can you help me to remodify the extensions.conf as per my need. I attached my extensions.conf file for reference

Thank you,


OUTBOUND=Zap/g1

[default]

include => pro
include => pro1

exten => s,1,Wait(1)
exten => s,2,Answer()
exten => s,3,Background(welcome)
exten => s,4,WaitExten(10)
exten => s,5,Background(welcome)
exten => s,6,WaitExten(10)
exten => s,7,Goto(280,1)
exten => s,8,Hangup()

[pro]
include =>parkedcalls
include => pro1

exten => 294,1,Dial(SIP/294,20,rtT)
exten => 294,2,VoiceMail(294@voicemail)
exten => 294,3,PlayBack(vm-goodbye)
exten => 294,4,Hangup()

exten => 218,1,Dial(SIP/218,20,rtT)
exten => 218,2,VoiceMail(218@voicemail)
exten => 218,3,PlayBack(vm-goodbye)
exten => 218,4,Hangup()

exten => 281,1,Dial(SIP/281,20,rtT)
exten => 281,2,VoiceMail(281@voicemail)
exten => 281,3,PlayBack(vm-goodbye)
exten => 281,4,Hangup()

exten => 282,1,Dial(SIP/282,20,rtT)
exten => 282,2,voiceMail(282@voicemail)
exten => 282,3,PlayBack(vm-goodbye)
exten => 282,4,Hangup()

exten => 283,1,Dial(SIP/283,20,rtT)
exten => 283,2,voiceMail(283@voicemail)
exten => 283,3,PlayBack(vm-goodbye)
exten => 283,4,Hangup()

exten => 284,1,Dial(SIP/284,20,rtT)
exten => 284,2,voiceMail(284@voicemail)
exten => 284,3,PlayBack(vm-goodbye)
exten => 284,4,Hangup()

exten => 285,1,Dial(SIP/285,20,rtT)
exten => 285,2,voiceMail(285@voicemail)
exten => 285,3,PlayBack(vm-goodbye)
exten => 285,4,Hangup()

Can’t you just use a macro? Look at the [macro-stdexten] example and modify it. You call the macro with the extension number as a parameter so the macro “knows” which voicemail to go to.