?? extensions.ael
字號(hào):
///////////////////////////////////////////////////////////////////////////////// Helpdesk Queuecontext hd-queue { s => { NoOp(Add a background sound to tell the user their options); Queue(helpdesk|t); NoOp(Put in options to apologize and send user to voicemail); }; 0 => goto default|0|1; 1 => { Dial(u41950@svm1.shsu.edu); Congestion(10); Hangup; };};context l903-calling { _9903NXXXXXX => { Realtime(l903_ext|exchange|${EXTEN:4:3}|l903_); if ("${l903_exchange}foo" = "foo") { Playback(num-outside-area); SayDigits(1); Playback(and-area-code); Playback(before-the-number); Hangup; }; &dialout(${EXTEN}); Congestion(10); Hangup; };};///////////////////////////////////////////////////////////////////////////////// Extensions pulled from houston.conf// Converted the extension list to the databasecontext houston-calling { _9713NXXXXXX => { Realtime(hou_713_ext|exchange|${EXTEN:4:3}|hou_713_); if ("${hou_713_exchange}foo" = "foo") { Playback(num-outside-area); SayDigits(1); Playback(and-area-code); Playback(before-the-number); Hangup; }; &dialout(${EXTEN}); Congestion(10); Hangup; }; _9281NXXXXXX => { Realtime(hou_281_ext|exchange|${EXTEN:4:3}|hou_281_); if ("${hou_281_exchange}foo" = "foo") { Playback(num-outside-area); SayDigits(1); Playback(and-area-code); Playback(before-the-number); Hangup; }; &dialout(${EXTEN}); Congestion(10); Hangup; }; _9832NXXXXXX => { Realtime(hou_832_ext|exchange|${EXTEN:4:3}|hou_832_); if ("${hou_832_exchange}foo" = "foo") { Playback(num-outside-area); SayDigits(1); Playback(and-area-code); Playback(before-the-number); Hangup; }; &dialout(${EXTEN}); Congestion(10); Hangup; };};///////////////////////////////////////////////////////////////////////////////// Extensions pulled from huntsville.conf// Converted the extension list to the databasecontext huntsville-calling { _9NXXXXXX => { Realtime(hv_ext|exchange|${EXTEN:1:3}|hv_); if ("${hv_exchange}foo" = "foo") { Playback(num-outside-area); SayDigits(1); Playback(and-area-code); Playback(before-the-number); Hangup; }; &dialout(${EXTEN}); Congestion(10); Hangup; }; _NXXXXXX => { NoOp(Stripping last four to see what extension we're dialing); Set(LAST4=${EXTEN:3}); StripLSD(4); }; i => Playback(pbx-invalid); h => Hangup;};///////////////////////////////////////////////////////////////////////////////// Extensions pulled from macros.confmacro dialout( number ) { Realtime(call_info|exten|${CALLERIDNUM:5}|mon_); if ("${mon_monitor}" = "YES") { Dial(SIP/${number}@sgw1.shsu.edu,,wW); Dial(SIP/${number}@sgw2.shsu.edu,,wW); } else { Dial(SIP/${number}@sgw1.shsu.edu); Dial(SIP/${number}@sgw2.shsu.edu); };};// Standard extension macro:// ${ext} - Extensionmacro stdexten( ext ) { Realtime(sipusers|name|${ext}|sip_user_); Realtime(call_info|exten|${ext}|info_); if ("${sip_user_name}foo" = "foo") { Wait(1); &dialout(${ext}); Congestion(10); Hangup; }; NoOp(${CALLERIDNUM}); RealtimeUpdate(call_info|exten|${ext}|calltrace|${CALLERIDNUM}); System(/usr/local/bin/db_update.sh call_info calltrace ${CALLERIDNUM} exten ${ext} &); &checkdnd(${ext}); &checkcf(${ext}); Realtime(call_info|exten|${CALLERIDNUM:5}|mon_); if ("${mon_monitor}" = "YES") { Dial(SIP/${info_forwardto},25,wW); } else { Dial(SIP/${info_forwardto},25); }; switch ("${DIALSTATUS}") { case "BUSY": &checkcfb(${ext}); break; case "CHANUNAVAIL": Dial(IAX2/asterisk:password@scm2.shsu.edu/${info_forwardto},25,wW); MailboxExists(${ext});// if ("${VMBOXEXISTSSTATUS}" = "FAILED") {// Congestion(10);// Hangup;// }; &uvm(${ext}); Hangup; break; case "CONGESTION": MailboxExists(${ext}); if ("$(VMBOXEXISTSSTATUS}" = "FAILED") { Congestion(10); Hangup; }; &bvm(${ext}); Hangup; break; default: MailboxExists(${ext}); if ("$(VMBOXEXISTSSTATUS}" = "FAILED") { Congestion(10); Hangup; }; &uvm(${ext}); Hangup; }; Hangup;};macro uvm( ext ) { Dial(SIP/u${ext}@svm1.shsu.edu); Playback(im-sorry); Playback(voice-mail-system); Playback(down); Congestion(10); Hangup;};macro bvm( ext ) { Dial(SIP/b${ext}@svm1.shsu.edu); Playback(im-sorry); Playback(voice-mail-system); Playback(down); Congestion(10); Hangup;};macro checkdnd( ext ) { if ("${info_donotdisturb}foo" = "foo") { NoOp(Do Not Disturb is not active); } else &uvm(${ext});};macro checkcf( ext ) { if ("${info_forwardto}foo" = "foo") if ("${ext}" = "43974") { Set(info_forwardto=${ext}&SCCP/${ext}); } else { Set(info_forwardto=${ext}&SIP/${ext}w); };};macro checkcfb( ext ) { if ("${info_forwardbusy}foo" = "foo") { Wait(1); MailboxExists(${ext}); if ("$(VMBOXEXISTSSTATUS}" = "FAILED") { &dialout(${ext}); Hangup; }; &bvm(${ext}); Hangup; }; &stdexten(${info_forwardbusy});};///////////////////////////////////////////////////////////////////////////////// Extensions pulled from test.confcontext test-include { includes { test-digium; test-sounds; test-phinfo; };};context test-digium { *500 => { Dial(IAX2/guest@misery.digium.com/s@default); Playback(demo-nogo); Hangup; };};context test-sounds { *501 => { Answer; Musiconhold; Wait(1); Hangup; };};context test-phinfo { *505 => { Answer; NoOp(${CALLERIDNUM:5}); SayDigits(${CALLERIDNUM:5}); Hangup; };};///////////////////////////////////////////////////////////////////////////////// Extensions pulled from external.confcontext long-distance { includes { local1; }; _91XXXXXXXXXX => &dialout(${EXTEN}); _9011. => &dialout(${EXTEN});};context local1 { includes { default; }; 911 => &dialout(911); 9911 => &dialout(9911); _9NXXXXXX => goto huntsville-calling|${EXTEN}|1; _936NXXXXXX => { Goto 9${EXTEN:3}|1; Congestion(10); Hangup; }; _832NXXXXXX => { goto 9${EXTEN}|1; Congestion(10); Hangup; }; _713NXXXXXX => { goto 9${EXTEN}|1 ; Congestion(10); Hangup; }; _281NXXXXXX => { goto 9${EXTEN}|1; Congestion(10); Hangup; }; _NXXNXXXXXX => { goto 9${EXTEN}|1; goto 91${EXTEN}|1; Congestion(10); Hangup; }; _91800NXXXXXX => &dialout(${EXTEN}); _91866NXXXXXX => &dialout(${EXTEN}); _91877NXXXXXX => &dialout(${EXTEN}); _91888NXXXXXX => &dialout(${EXTEN}); _91900NXXXXXX => &dialout(${EXTEN}); _91976NXXXXXX => &dialout(${EXTEN}); _9713NXXXXXX => goto houston-calling|${EXTEN}|1; _9281NXXXXXX => goto houston-calling|${EXTEN}|1; _9832NXXXXXX => goto houston-calling|${EXTEN}|1; _9903NXXXXXX => goto l903-calling|${EXTEN}|1; _31NXXNXXXXXX => &dialout(${EXTEN}); h => Hangup;};///////////////////////////////////////////////////////////////////////////////// Extensions pulled from internal.confcontext from-scm2 { _4XXXX => { NoOp(DIALING SIP EXTENSION ${EXTEN} - FROM ${CALLERIDNUM}); Dial(SIP/${EXTEN},20,wW); Hangup; }; _6XXXX => { NoOp(DIALING SIP EXTENSION ${EXTEN} - FROM ${CALLERIDNUM}); Dial(SIP/${EXTEN},20,wW); Hangup; };};///////////////////////////////////////////////////////////// All internal extensions work through the default context// Phones that can only make internal calls should be in// this context.///////////////////////////////////////////////////////////context default {// Include the contexts in the files that allow us to make these phone calls includes { vm-include; apps-include; test-include; };// ALWAYS have an 'h' extension h => { NoOp(Hangup cause was: ${HANGUPCAUSE}); Hangup; };// We like to hear that we dialed an invalid extension i => Playback(pbx-invalid);// Dial the operator 0 => &dialout(0);// Send voicemail calls to the vm-* contexts to be handled voicemail => goto vm-direct|s|1; 5555 => goto vm-direct|s|1; 62100 => goto vm-extension|s|1;// These are our campus extensions, send them to the macro _6XXXX => &stdexten(${EXTEN}); _4XXXX => &stdexten(${EXTEN});// These are campus extensions as well, might need to take this out though. _9294XXXX => goto _4XXXX|1; _9496XXXX => goto _6XXXX|1;// These allows us to dial from the directory in our phone without worrying about dialing 9 _936294XXXX => { goto ${EXTEN:5}|1; goto 9${EXTEN:3}|1; Congestion(10); Hangup; }; _936496XXXX => { goto ${EXTEN:5}|1; goto 9${EXTEN:3}|1; Congestion(10); Hangup; };};///////////////////////////////////////////////////////////////////////////////// Extensions pulled from apps.confcontext apps-include { includes { app-agents; app-dnd; app-callforward; app-calltrace;
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -