Trying to create a simple IVR macro, and not sure the best way to go about it.
What I want it to do is this:
Someone calls and Asterisk picks up
"Thank you for calling."
“Press 1 for Sales”
“Press 2 for Support”
“Press 3 for Billing”
“Press 411 for the company directory”
“Press 0 to leave a message in our general mailbox.”
So I initially tried something like:
[macro-test-mainline]
exten => s,1,Answer
exten => s,2,Wait,1 ; give caller id time
exten => s,3,Playback(thank-you-for-calling) ; "Thank you for calling"
exten => s,4,Playback(for-sales) ; "For Sales"
exten => s,5,Background(press-1) ; "Press One"
exten => s,6,Playback(for-tech-support) ; "For Technical Support"
exten => s,7,Background(press-2) ; "Press Two"
exten => s,8,Playback(for-billing) ; "For Billing"
exten => s,9,Background(press-3) ; "Press Three"
exten => s,10,Playback(for-louie-louie) ; For Louie Louie
exten => s,11,Background(digits/4) ; Press Four
exten => s,12,Read(RESPONSE,company-dir-411,3) ;
exten => s,13,Goto(s-${RESPONSE}|1) ;
exten => 1,1,Macro(sales)
exten => 2,1,Goto(support|s|1)
exten => 3,1,Dial(SIP/main2,10)
exten => 4,1,Playback(lyrics-louie-louie) ;
exten => 4,2,Goto(s,1) ;
exten => s-411,1,Directory(default,pdx-exten) ;
exten => s-411,2,Hangup ; should never reach here
exten => s-0,1,Voicemail(3700,u) ;
exten => s-0,2,Playback(vm-goodbye) ;
exten => s-0,3,Hangup ;
But it seems like what might actually work is to have a pre-recorded greeting with all the options (versus playing them back step-by-step) and use the Background() application, like:
[macro-test-mainline]
exten => s,1,Answer
exten => s,2,Wait,1 ; give caller id time
exten => s,3,Playback(thank-you-for-calling) ; "Thank you for calling"
exten => s,4,Background(ivr-greeting) ; Pre-recorded greeting "Press 1 for Sales, 2 for Support, etc..."
exten => 1,1,Macro(sales)
exten => 2,1,Goto(support|s|1)
exten => 3,1,Dial(SIP/main2,10)
exten => 4,1,Playback(lyrics-louie-louie)
exten => 4,2,Goto(s,1)
exten => 411,1,Directory(default,pdx-exten)
exten => 411,2,Hangup
exten => 0,1,Voicemail(3700,u)
exten => 0,2,Playback(vm-goodbye)
exten => 0,3,Hangup
Does that make sense? Is there a better way to go about this that I’m totally missing? Thanks anyone for any insight you can provide!