[Asterisk-Users] Giving user progress in an voice menu system

Josiah Bryan jbryan at productiveconcepts.com
Thu May 12 13:09:54 MST 2005


On Thursday 12 May 2005 3:43 pm, Sean Kennedy wrote:
> Hi all,
>
> I have a voice menu system ( Outlined below ), and I'd like to give the
> user some feedback when they dial an extension ( ringing, music,
> SOMETHING ).  As it stands, when a user enters an extension from the
> menu system, they hear silence while the line rings.  I even tried
> including the Ringing application before calling my macro to dial the
> phones, with no luck.
>
> Any help is apprecaited.
>

Odd - my receptionist was having a similar problem. I used the stdexten macro 
that came with the demo files - when ever someone dialed directly (inside) or 
directly thru the IVR (no receptionist pickup) - the ringback was fine. But 
when the receptionist picked up and transfered - no ringback. All three 
methods of dialing went thru the stdexten macro - very puzzling. The solution 
I finally came up with was to add the 'm' option to the 'Dial' command.

Code speaks louder than words, so here you go..its obviously modified a bit - 
but all should be self explanitory. The "SIP/op" channel is our receptionist 
phone. The macro only adds the MOH option if the call is from the 
receptionist phone, otherwise it leaves all options at default.

Anybody else have any other solutions or need debug outputs to figure this 
out?


[macro-stdexten];
;
; Standard extension macro:
;   ${ARG1} - Extension  (we could have used ${MACRO_EXTEN} here as well
;   ${ARG2} - Device(s) to ring
;
exten => s,1,GotoIf($["${CHANNEL:0:6}" = "SIP/op"]?999|1)
exten => s,n(dial),Dial(${ARG2},20,${opt})                        
exten => s,n,Goto(s-${DIALSTATUS},1)                          

exten => 999,1,SetVar(opt=m)
exten => 999,n,Background(transfer)
exten => 999,n,Goto(s,dial)

;exten => s-NOANSWER,1,Voicemail(u${ARG1})                
exten => s-NOANSWER,1,AGI(vm.pl|u${ARG1})
exten => s-NOANSWER,2,Goto(${vm-exit-context},s,1)       

;exten => s-BUSY,1,Voicemail(b${ARG1})                          
exten => s-BUSY,1,AGI(vm.pl|b${ARG1})
exten => s-BUSY,2,Goto(${vm-exit-context},s,1)                 

exten => _s-.,1,Goto(s-NOANSWER,1)                              

exten => *,1,AGI(checkvm.pl|${ARG1})                            
exten => *,n,Goto(mainmenu-restart,s,1)



-- 
Josiah Bryan
IT Coordinator
Productive Concepts, Inc.
jbryan at productiveconcepts.com
(765) 964-6009, ext. 224



More information about the asterisk-users mailing list