;******************************************************************************************
; OptData Office IVR Menu
;******************************************************************************************
;
[incoming]
; Check for Holiday
exten => s,1,GotoIfTime(*|*|1|jan?incoming-holiday,s,1)
exten => s,2,GotoIfTime(*|*|4|jul?incoming-holiday,s,1)
exten => s,3,GotoIfTime(*|*|11|nov?incoming-holiday,s,1)
exten => s,4,GotoIfTime(*|*|24|dec?incoming-holiday,s,1)
exten => s,5,GotoIfTime(*|*|25|dec?incoming-holiday,s,1)
exten => s,6,GotoIfTime(*|*|31|dec?incoming-holiday,s,1)
exten => s,7,GotoIfTime(*|mon|15-21|jan?incoming-holiday,s,1)
exten => s,8,GotoIfTime(*|mon|15-21|feb?incoming-holiday,s,1)
exten => s,9,GotoIfTime(*|mon|26-31|may?incoming-holiday,s,1)
exten => s,10,GotoIfTime(*|mon|1-7|sep?incoming-holiday,s,1)
exten => s,11,GotoIfTime(*|mon|8-17|oct?incoming-holiday,s,1)
exten => s,12,GotoIfTime(*|thu|22-28|nov?incoming-holiday,s,1)
; Check for Days or Nights
exten => s,13,GotoIfTime(8:00-18:00|mon-fri|*|*?incoming-days,s,4)
exten => s,14,Goto(incoming-night,s,4)
; If we detect a fax tone send call to extension 22 priority 1
; Not all fax machines/fax modems send a fax tone when calling.
; If we get a call from one of those then we can't detect that it's a fax call.
; This only works for devices on Zap channels (Digium cards).
; exten => fax,1,Goto(17,1)
;
; Hang up the line if the caller doesn't do anything
;
exten => t,1,Hangup
;
include => outgoing-zap
include => extensions
include => company-directory
include => company-meetme
include => incoming-sip
[incoming-days]
exten => s,1,Answer
exten => s,2,DigitTimeout(10) ; Set Digit Timeout to 10 seconds
exten => s,3,ResponseTimeout(20) ; Set Response Timeout to 20 seconds
exten => s,4,Background(optdata/vm-silence-1) ; one second silence
exten => s,5,Background(optdata/vm-welcome) ; play the welcome message
exten => s,6,Background(optdata/vm-if-you-do-not-know-ext) ; play if you do not know the extension
exten => s,7,Background(optdata/vm-menu1) ; play the pay attention prompt
exten => s,8,Background(optdata/vm-menu2-don) ; play the Don message
exten => s,9,Background(optdata/vm-menu2-randy) ; play the Randy message
exten => s,10,Background(optdata/vm-menu2-mickey) ; play the Mickey message
exten => s,11,Background(optdata/vm-menu2-johnny) ; play the Johnny message
exten => s,12,Background(optdata/vm-menu2-brian) ; play the Brian message
exten => s,13,Background(optdata/vm-menu2-jennifer) ; play the Jennifer message
exten => s,14,Background(optdata/vm-menu2-balaji) ; play the Balaji message
exten => s,15,Background(optdata/vm-menu2-operator) ; play the Operator message
exten => s,16,Background(optdata/vm-options-lowest) ; play the Options Menu message
exten => s,17,NoOp
;
; Repeat the previous menu
exten => *,1,Goto(s,5)
;
; #=hangup
exten => #,1,Background(vm-goodbye)
exten => #,2,Hangup
;
exten => t,1,Goto(i,1) ; If they take too long, give up
;
exten => i,1,Background(pbx-invalid) ; "That's not valid, try again"
exten => i,2,Wait(1)
exten => i,3,Goto(s,5)
; If we detect a fax tone send call to extension 22 priority 1
; Not all fax machines/fax modems send a fax tone when calling.
; If we get a call from one of those then we can't detect that it's a fax call.
; This only works for devices on Zap channels (Digium cards).
; exten => fax,1,Goto(17,1)
;
include => outgoing-zap
include => extensions
include => company-directory
include => company-meetme
include => incoming-sip
[incoming-night]
exten => s,1,Answer
exten => s,2,DigitTimeout(10) ; Set Digit Timeout to 10 seconds
exten => s,3,ResponseTimeout(20) ; Set Response Timeout to 20 second
exten => s,4,Background(optdata/vm-silence-1) ; one second silence
exten => s,5,Background(optdata/vm-welcome) ; play the intro message
exten => s,6,Background(optdata/vm-silence-1) ; one second silence
exten => s,7,Background(optdata/vm-office-closed) ; play office closed
exten => s,8,Background(optdata/vm-office-hours) ; play office hours
exten => s,9,Background(optdata/vm-if-you-do-not-know-ext) ; play if you do not know the extension
exten => s,10,Background(optdata/vm-menu1) ; play the pay attention prompt
exten => s,11,Background(optdata/vm-voice-mail-directory-don) ; play the Don message
exten => s,12,Background(optdata/vm-voice-mail-directory-randy) ; play the Randy message
exten => s,13,Background(optdata/vm-voice-mail-directory-mickey) ; play the Mickey message
exten => s,14,Background(optdata/vm-voice-mail-directory-johnny) ; play the Johnny message
exten => s,15,Background(optdata/vm-voice-mail-directory-brian) ; play the Brian message
exten => s,16,Background(optdata/vm-voice-mail-directory-jennifer) ; play the Jennifer message
exten => s,17,Background(optdata/vm-voice-mail-directory-balaji) ; play the Balaji message
exten => s,18,Background(optdata/vm-options-lowest) ; play the Options Menu message
; Repeat the previous menu
exten => *,1,Goto(s,5)
;
; #=hangup
exten => #,1,Background(goodbye)
exten => #,2,Hangup
;
exten => i,1,Background(pbx-invalid) ; "That's not valid, try again"
exten => i,2,NoOp
exten => i,3,Goto(s,10)
;
; If we detect a fax tone send call to extension 22 priority 1
; Not all fax machines/fax modems send a fax tone when calling.
; If we get a call from one of those then we can't detect that it's a fax call.
; This only works for devices on Zap channels (Digium cards).
; exten => fax,1,Goto(17,1)
;
include => outgoing-zap
include => extensions
include => company-directory
include => incoming-sip
[incoming-holiday]
;
; provide Holiday greeting and provide emergency access for
; contract clients
exten => s,1,Answer
exten => s,2,DigitTimeout(10) ; Set Digit Timeout to 10 seconds
exten => s,3,ResponseTimeout(20) ; Set Response Timeout to 20 seconds
exten => s,4,Background(optdata/vm-welcome) ; play welcome message
exten => s,5,Background(optdata/vm-office-closed-holiday) ; play the office we are closed message
exten => s,6,Background(optdata/vm-office-hours) ; play the open hours message
exten => s,7,Goto(incoming-night,s,9) ; Jump to office night context
;
; Repeat the previous menu
exten => *,1,Goto(incoming-night,s,4)
;
; #=hangup
exten => #,1,Background(goodbye)
exten => #,2,Hangup
exten => i,1,Background(pbx-invalid) ; "That's not valid, try again"
exten => i,2,Wait(1)
exten => i,3,Goto(incoming-night,s,8)
; If we detect a fax tone send call to extension 22 priority 1
; Not all fax machines/fax modems send a fax tone when calling.
; If we get a call from one of those then we can't detect that it's a fax call.
; This only works for devices on Zap channels (Digium cards).
; exten => fax,1,Goto(17,1)
;
include => extensions
include => company-directory
;
;
;
;******************************************************************************************
; END - Office IVR Menu
;******************************************************************************************
Note: to do extension 0 do it like this:
exten => 0,1,Dial(SIP/Whatever extension you want to be the operator,7,rt)