Voicemail Dialplan

Hello Everyone

i have a problem and i carn’t see how to solve it

exten => 2501,1,Dial(${usr1},15)
exten => 2501,n,Background(sorry-no-one-is)
exten => 2501,n,Gotoif($[${EXTEN}=1]?call:cont)
exten => 2501,n(call),Dial(${usr2},15)
exten => 2501,n(cont),Voicemail(${EXTEN})

basically when a person dials 2501 and no one picks up i want it to play a message that says "sorry I cant get to the phone right now please hold for my voice mail or press 1 to dial another member of the team.

any ideas where im going wrong?

Thanks in advance

Ketan

Background plays a message and then jumps to the extension matching the number they press in the current context (unless a different one was specified on the background command).

So it will not continue on with 2501…it would be looking for extension 1.

I didn’t get a chance to try the below, but it should help you…

exten => 2501,1,Goto(TeamCall,s,1)

[TeamCall]
exten => s,1,Dial(${usr1},15)
exten => s,n,Answer()
exten => s,n,Background(sorry-no-one-is)
exten => s,n,WaitExten(5)
exten => s,n,Voicemail(${EXTEN})
exten => 1,1,Dial(${usr2},15)
exten => 1,n,Voicemail(${EXTEN})

thanks for you help mazzic

i might of been a bit confusing

what i need is when someone dials my extention say its 2501 and i dont answer or its busy a file will play saying “sorry i am not avalabel to take your call, press 1 if you like to speak to another member of our team or hold the line to leave me a voice mail.” then if the person presses 1 then rings someone, if nothing is pressed it goes to my voicemail.

[quote=“KDesai”]thanks for you help mazzic

i might of been a bit confusing

what i need is when someone dials my extention say its 2501 and i dont answer or its busy a file will play saying “sorry i am not avalabel to take your call, press 1 if you like to speak to another member of our team or hold the line to leave me a voice mail.” then if the person presses 1 then rings someone, if nothing is pressed it goes to my voicemail.[/quote]

That is exactly what the mazzic´s example do; Dial extension 15 secons if no one answer the channel answer and play a message, it wait 5 second for user response, if the user dont press 1 it send to voicemal if user press 1 then dial user2.

Thank you navaismo for you help,
Sorry if I sound a bit stupid but if i implemented that i would have to implement a menu for each user because of the line

exten => s,1,Dial(${usr1},15)

The variable ${urs1} would need to change for each extension

thanks for you help

Weren’t you already going to have to tell it who to dial for the 2nd person? I started with your example and you had the variables usr1 and usr2 listed…

With a little change you could do this…

exten => 2501,1,Macro(TeamCall,${EXTEN},3000)
exten => 3000,1,Macro(TeamCall,${EXTEN},2501)

[macro-TeamCall]
exten => s,1,Dial(SIP/${ARG1},15)
exten => s,n,Answer()
exten => s,n,Read(VAR1,sorry-no-one-is,1,,,5)
exten => s,n,Gotoif($[${VAR1}=1]?call:cont)
exten => s,n(call),Dial(SIP/${ARG2},15)
exten => s,n(cont),Voicemail(${ARG1})