--- configs/extensions.conf.sample.orig 2008-01-30 07:34:37.000000000 -0800 +++ configs/extensions.conf.sample 2008-02-10 22:55:55.000000000 -0800 @@ -211,6 +211,7 @@ ; List canonical entries here ; ;exten => 12564286000,1,Macro(stdexten,6000,IAX2/foo) +;exten => 12564286000,n,Goto(default,s,1) ; exited Voicemail ;exten => _125642860XX,1,Dial(IAX2/otherbox/${EXTEN:7}) [dundi-e164-customers] @@ -379,47 +380,59 @@ [macro-stdexten]; ; ; Standard extension macro: -; ${ARG1} - Extension (we could have used ${MACRO_EXTEN} here as well +; ${ARG1} - Extension (we could have used ${MACRO_EXTEN} here as well) ; ${ARG2} - Device(s) to ring +; ${ARG3} - Optional context in Voicemail (if empty, then "default") ; +; Note that the current version will drop through to the next priority in the +; case of their pressing '#'. This gives more flexibility in what do to next: +; you can prompt for a new extension, or drop the call, or send them to a +; general delivery mailbox, or... +; -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,Set(MAILBOX=$["${ARG3}" ? ${ARG1}@${ARG3} :: ${ARG1}]) +exten => s,n,Dial(${ARG2},20) ; Ring the interface, 20 seconds maximum +exten => s,n,Goto(s-${DIALSTATUS},1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER) + +exten => s-NOANSWER,1,Voicemail(${MAILBOX},u) ; If unavailable, send to voicemail w/ unavail announce +exten => s-NOANSWER,n,MacroExit() ; If they press #, return to start + +exten => s-BUSY,1,Voicemail(${MAILBOX},b) + ; If busy, send to voicemail w/ busy announce +exten => s-BUSY,n,MacroExit() ; 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 +exten => a,1,VoicemailMain(${MAILBOX}) ; 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)` +; ${ARG3} - Context in voicemail (if empty, then "default") +; ${ARG4} - Optional DONTCALL context name to jump to (assumes the s,1 extension-priority) +; ${ARG5} - 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 +; See above note in stdexten about priority handling on macro exit. +; +exten => s,1,Set(MAILBOX=$["${ARG3}" ? ${ARG1}@${ARG3} :: ${ARG1}]) +exten => s,n,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,n,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-NOANSWER,1,Voicemail(${MAILBOX},u) ; If unavailable, send to voicemail w/ unavail announce +exten => s-NOANSWER,n,MacroExit() ; 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-BUSY,1,Voicemail(${MAILBOX},b) ; If busy, send to voicemail w/ busy announce +exten => s-BUSY,n,MacroExit() ; 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-DONTCALL,1,Goto(${ARG4},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-TORTURE,1,Goto(${ARG5},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 +exten => a,1,VoicemailMain(${MAILBOX}) ; If they press *, send the user into VoicemailMain [macro-page]; ; @@ -464,6 +477,7 @@ exten => 1234,1,Playback(transfer,skip) ; "Please hold while..." ; (but skip if channel is not up) exten => 1234,n,Macro(stdexten,1234,${GLOBAL(CONSOLE)}) +exten => 1234,n,Goto(default,s,1) ; exited Voicemail exten => 1235,1,Voicemail(1234,u) ; Right to voicemail @@ -580,8 +594,10 @@ ;exten => 6394,1,Dial(Local/6275/n) ; this will dial ${MARK} ;exten => 6275,1,Macro(stdexten,6275,${MARK}) ; assuming ${MARK} is something like Zap/2 +;exten => 6275,n,Goto(default,s,1) ; exited Voicemail ;exten => mark,1,Goto(6275|1) ; alias mark to 6275 ;exten => 6536,1,Macro(stdexten,6236,${WIL}) ; Ditto for wil +;exten => 6536,n,Goto(default,s,1) ; exited Voicemail ;exten => wil,1,Goto(6236|1) ;If you want to subscribe to the status of a parking space, this is @@ -604,6 +620,56 @@ ; ;exten = 8700,1,Dial(${MARK},30,A(/path/to/my/announcemsg)) ; + +; example of a comparmentalized company called "acme" +; +; this is the context that your incoming IAX/SIP trunk dumps you in... +;[acme-incoming] +;exten => s,1,Wait(1) +;exten => s,n,Answer() +;exten => s,n(menu),Playback(acme/vm-brief-menu) +;exten => s,n(exten),Background(vm-enter-num-to-call) +;exten => s,n,WaitExten(5) +;exten => s,n(goodbye),Playback(vm-goodbye) +;exten => s,n(end),Hangup() +; +;include => acme-extens +; +;exten => i,1,Playback(vm-invalid) +;exten => i,n,Goto(s,exten) ; optionally, transfer to operator +; +;exten => t,1,Goto(s,goodbye) +; +; this is the context our internal SIP hardphones use (see sip.conf) +; +;[acme-internal] +;exten => s,1,Answer() +;exten => s,n(exten),Background(vm-enter-num-to-call) +;exten => s,n,WaitExten(5) +;exten => s,n(goodbye),Playback(vm-goodbye) +;exten => s,n(end),Hangup() +; +;include => trunkint +;include => trunkld +;include => trunklocal +; +;include => acme-extens +; +; you can test what your system sounds like to outside callers by dialing this +;exten => 777,1,DISA(no-password,acme-incoming) +; +; grouping of acme's extensions... never used directly, always included. +; +;[acme-extens] +;exten => 111,1,Macro(stdexten,111,SIP/pete_1,acme) +;exten => 111,n,Goto(s,exten) +; +;exten => 112,1,Macro(stdexten,112,SIP/nancy_1,acme) +;exten => 112,n,Goto(s,end) +; +; end of acme example + + ; For more information on applications, just type "core show applications" at your ; friendly Asterisk CLI prompt. ; --- configs/voicemail.conf.sample.orig 2007-11-27 08:12:33.000000000 -0800 +++ configs/voicemail.conf.sample 2008-02-10 17:40:19.000000000 -0800 @@ -246,3 +246,13 @@ ;The intro can be customized on a per-context basis ;directoryintro=dir-company2 1234 => 5678,Company2 User,root@localhost + +; example for our acme compartmentalized company +; +; Pete telecommutes from Chicago, so we'll customize timestamps for him. +; +;[acme] +;tz=eastern +;111 => 7383,Pete,pete@acme-widgets.com,,tz=central +;112 => 6262,Nancy,nancy@acme-widgets.com +;