[general] static = yes writeprotect = no autofallthrough=yes clearglobalvars = yes priorityjumping=no ;userscontext=default [globals] ;CONSOLE=Console/dsp ; Console interface for demo ;CONSOLE=Zap/1 ;CONSOLE=Phone/phone0 ;IAXINFO=guest ; IAXtel username/password ;IAXINFO=myuser:mypass ;TRUNK=Zap/g2 ; TRUNKMSD = 0 ; MSD digits to strip (usually 1 or 0) ; fwddialup = SIP/fwddialup sipphone = SIP/sipphone ; [macro-trunkdial] ; ; Standard trunk dial macro (hangs up on a dialstatus that shoul terminate call) ; ${ARG1} - What to dial ; exten => s,1,Dial(${ARG1}) exten => s,n,Goto(s-${DIALSTATUS},1,) exten => s-NOANSWER,1,Hangup exten => s-BUSY,1,Hangup exten => _s-.,1,NoOp ; [macro-stdexten] ; ; Standard extension macro: ; ${ARG1} - Extension (we could have used ${MACRO_EXTEN} here as well ; ${ARG2} - Device(s) to ring ; exten => s,1,Dial(${ARG2},20) ; Ring the interface, 20 seconds maximum exten => s,2,Goto(s-${DIALSTATUS},1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER) exten => s-NOANSWER,1,Voicemail(${ARG1},u) ; If unavailable, send to voicemail w/ unavail announce exten => s-NOANSWER,2,Goto(default,s,1) ; If they press #, return to start exten => s-BUSY,1,Voicemail(${ARG1},b) ; If busy, send to voicemail w/ busy announce exten => s-BUSY,2,Goto(default,s,1) ; If they press #, return to start exten => _s-.,1,Goto(s-NOANSWER,1) ; Treat anything else as no answer exten => a,1,VoicemailMain(${ARG1}) ; If they press *, send the user into VoicemailMain ; [macro-stdPrivacyexten]; ; ; Standard extension macro: ; ${ARG1} - Extension (we could have used ${MACRO_EXTEN} here as well ; ${ARG2} - Device(s) to ring ; ${ARG3} - Optional DONTCALL context name to jump to (assumes the s,1 extension-priority) ; ${ARG4} - Optional TORTURE context name to jump to (assumes the s,1 extension-priority)` ; exten => s,1,Dial(${ARG2},20|p) ; Ring the interface, 20 seconds maximum, call screening ; option (or use P for databased call screening) exten => s,2,Goto(s-${DIALSTATUS},1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER) exten => s-NOANSWER,1,Voicemail(${ARG1},u) ; If unavailable, send to voicemail w/ unavail announce exten => s-NOANSWER,2,Goto(default,s,1) ; If they press #, return to start exten => s-BUSY,1,Voicemail(${ARG1},b) ; If busy, send to voicemail w/ busy announce exten => s-BUSY,2,Goto(default,s,1) ; If they press #, return to start exten => s-DONTCALL,1,Goto(${ARG3},s,1) ; Callee chose to send this call to a polite "Don't call again" script. exten => s-TORTURE,1,Goto(${ARG4},s,1) ; Callee chose to send this call to a telemarketer torture script. exten => _s-.,1,Goto(s-NOANSWER,1) ; Treat anything else as no answer exten => a,1,VoicemailMain(${ARG1}) ; If they press *, send the user into VoicemailMain ; ;-------------------------------------------- ;Gui-Tools ;-------------------------------------------- [asterisk_guitools] exten = executecommand,1,System(${command}) exten = executecommand,n,Hangup() exten = record_vmenu,1,Answer exten = record_vmenu,n,Playback(vm-intro) exten = record_vmenu,n,Record(${var1}) exten = record_vmenu,n,Playback(vm-saved) exten = record_vmenu,n,Playback(vm-goodbye) exten = record_vmenu,n,Hangup exten = play_file,1,Answer exten = play_file,n,Playback(${var1}) exten = play_file,n,Hangup hasbeensetup = Y ; ;----------------------------------------------------- ;add by gui ;----------------------------------------------------- [default] include = all-apps ; [DID_fwddialup] include = default exten = _X.,1,Goto(default|1000|1) exten = s,1,Goto(default|1000|1) ; [DID_sipphone] include = default exten = _X.,1,Goto(default|1000|1) exten = s,1,Goto(default|1000|1) ; [numberplan-custom-1] plancomment = DialPlan1 include = default ; exten = _#6.,1,Macro(trunkdial,${fwddialup}/${EXTEN:2}) comment = _#6.,1,fwddialup-out,custom ; exten = 1747NXXXXXX,1,Macro(trunkdial,${sipphone}/${EXTEN:0}) comment = 1747NXXXXXX,1,sipphone-out,custom exten = 1800NXXXXXX,1,Macro(trunkdial,${sipphone}/${EXTEN:0}) comment = 1800NXXXXXX,1,sipphone-out,custom exten = 1866NXXXXXX,1,Macro(trunkdial,${sipphone}/${EXTEN:0}) comment = 1866NXXXXXX,1,sipphone-out,custom exten = 1877NXXXXXX,1,Macro(trunkdial,${sipphone}/${EXTEN:0}) comment = 1877NXXXXXX,1,sipphone-out,custom exten = 1888NXXXXXX,1,Macro(trunkdial,${sipphone}/${EXTEN:0}) comment = 1888NXXXXXX,1,sipphone-out,custom