[globals]

[default]
exten => _X!,1,Congestion()


[AllCalls]



same => n(Voicemail),Voicemail(${EXTEN}@Office)
same => n(Hangup),Hangup





[DefaultPlan]
[DialIn]
exten => _22XX,1,Dial(SIP/${EXTEN})
exten => _22XX,n,Voicemail(${EXTEN},u)
exten => _22XX,n,Hangup
exten => _22XX,2200,Voicemail(${EXTEN},b)
exten => _22XX,2201,Hangup




;;;;;Record your own message
exten => 2298,1,Wait(2) ; Call 2298 to Record new Sound Files
;exten => 2298,2,Record(/tmp/asterisk-recording:alaw) ; Press # to stop recording
;exten => 2298,2,Record(/tmp/asterisk-recording-${STRFTIME(${EPOCH},,%d%m%Y-%H%M%S)}:alaw)
exten => 2298,2,Record(/tmp/asterisk-recording-${STRFTIME(${EPOCH},,%d%m%Y-%H%M%S)}.wav)
exten => 2298,3,Wait(2)
exten => 2298,4,Playback(/tmp/asterisk-recording-${STRFTIME(${EPOCH},,%d%m%Y-%H%M%S)}) ; Listen to your voice
exten => 2298,5,wait(2)
exten => 2298,6,Hangup



;;;;Conference
;CONFERENCE - GUEST
;
exten => 2297,1,Progress()
exten => 2297,2,Wait(1)
exten => 2297,3,ConfBridge(1,default_bridge,default_user)

;
;CONFERENCE - ADMIN
;
exten => 2296,1,Progress()
exten => 2296,2,Wait(1)
exten => 2296,3,ConfBridge(1,default_bridge,admin_user)




;;;;;Reboot
;;;;;Reboot
exten => 2295,1,Set(CALLERID(name)=${DB(cidname/${CALLERID(num)})})
exten => 2295,n,Answer()
exten => 2295,n,Goto(macro-reboot,s,1)
exten => 2295,n,Busy(3)


;;;IVR
exten => 2294,1,Answer()
exten => 2294,n,Goto(demo-menu,s,1)
exten => 2294,n,Busy(3)

;;;IVR----business hours
exten => 2293,1,Answer()
exten => 2293,n,Goto(example-ivr,s,1)
exten => 2293,n,Busy(3)






;;;;;;Reboot from extension
[macro-reboot]
exten => s,1,Authenticate(147852)     
exten => s,n,System(/sbin/shutdown -r 1)
exten => s,n,Wait(2)
exten => s,n,Hangup()




