System information

have a maingreeting.wav and a maingreeting.gsm file in your sounds folder, Play
back() will select the one that requires the least CPU to play back to the caller).
You’ll probably want a separate extension for recording each of the prompts, possibly
hidden away from your normal set of extensions, to avoid a mistyped extension from
wiping out any of your current menu prompts. If the number of prompts that you have
is large, repeating this extension with slight modifications for each will get tedious, but
there are ways around that. We’ll show you how to make your prompt recording more
intelligent in Chapter 17, but for now, this method will suffice.
The Dialplan
Here is the code required to create the auto attendant that we designed earlier. We will
often use blank lines before labels within an extension in order to make the dialplan
easier to read, but note that just because there is a blank line does not mean there is a
different extension:
[main_menu]
exten => s,1,Verbose(1, Caller ${CALLERID(all)} has entered the auto attendant)
same => n,Answer()
; this sets the inter-digit timer
same => n,Set(TIMEOUT(digit)=2)
; wait one second to establish audio
same => n,Wait(1)
; If Mon-Fri 9-5 goto label daygreeting
same => n,GotoIfTime(9:00-17:00,mon-fri,*,*?daygreeting:afterhoursgreeting)
same => n(afterhoursgreeting),Background(after-hours) ; AFTER HOURS GREETING
same => n,Goto(menuprompt)
same => n(daygreeting),Background(daytime) ; DAY GREETING
same => n,Goto(menuprompt)
same => n(menuprompt),Background(main-menu) ; MAIN MENU PROMPT
same => n,WaitExten(4) ; more than 4 seconds is probably
; too much
same => n,Goto(0,1) ; Treat as if caller has pressed '0'
exten => 1,1,Verbose(1,
same => n,Goto(Queues,7002,1) ; Sales Queue - see Chapter 13 for details
exten => 2,1,Verbose(1,
same => n,Goto(Queues,7001,1) ; Service Queue - see Chapter 13 for details
exten => 3,1,Verbose(1,
same => n,Background() ; Address and fax info
same => n,Goto(s,menuprompt) ; Take caller back to main menu prompt
338 | Chapter 15:The Automated Attendant
Downloa d f r o m W o w ! e B o o k < w w w.woweb o o k . c o m >