Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; extensions.conf - the Asterisk dial plan
- ;
- ; Static extension configuration file, used by
- ; the pbx_config module. This is where you configure all your
- ; inbound and outbound calls in Asterisk.
- ;
- ; This configuration file is reloaded with the "dialplan reload" command in the CLI
- [general];
- static=yes;
- writeprotect=no;
- autofallthrough=no;
- clearglobalvars=yes;
- [globals];
- [default];
- exten => s,1,Verbose(Unrouted call handler);
- same => n,Playback(silence/1&tt-weasels);
- same => n,Hangup();
- [voipms-inbound];
- exten => 3149691077,1,Goto(business-inbound,s,1);
- exten => 3145551212,1,NoOp();
- same => n,Dial(SIP/jill,30);
- same => n,VoiceMail(jill@default);
- same => n,Hangup();
- exten => 3148888888,1,Goto(fax-in,fax,1); This is a dedicated fax number
- exten => _X.,1,Verbose(Call to undefined ${EXTEN}: ${CALLERID(all)} -- ${STRFTIME(${EPOCH},,%Y-%m-%d %H%M.%S)});
- same => n,Playback(silence/1&ss-noservice);
- same => n,Congestion(30);
- same => n,Hangup();
- [ipkall-inbound];
- exten => 2065237757,1,NoOp();
- same => n,Dial(SIP/jane,30);
- same => n,VoiceMail(jane@default);
- same => n,Hangup();
- exten => _X.,1,Verbose(Call to undefined ${EXTEN}: ${CALLERID(all)} -- ${STRFTIME(${EPOCH},,%Y-%m-%d %H%M.%S)});
- same => n,Playback(silence/1&ss-noservice);
- same => n,Congestion(30);
- same => n,Hangup();
- [business-inbound];
- exten => s,1,NoOp();
- exten => s,n,Set(COUNT=3); initialize the variable and set how many loops you want
- exten => s,n,Set(TIMEOUT(digit)=3);
- exten => s,n,BackGround(silence/1&if-u-know-ext-dial);
- exten => s,n,While($[${COUNT} > 0]);
- exten => s,n,BackGround(silence/1&for-tech-support&press&digits/1);
- exten => s,n,BackGround(silence/1&for-service&press&digits/2);
- exten => s,n(return),WaitExten(4); ; Return here on invalid
- exten => s,n,Set(COUNT=$[${COUNT} - 1]);
- exten => s,n,EndWhile();
- exten => s,n,WaitExten(2);
- exten => s,n,Goto(t,1);
- exten => 1,1,Queue(queue-tech-support,hntw,,,3600);
- exten => 1,n,Playback(all-reps-busy);
- exten => 1,n,VoiceMail(4000@default);
- exten => 1,n,Hangup();
- exten => 2,1,Queue(queue-service,hntw,,,3600);
- exten => 2,n,Playback(all-reps-busy);
- exten => 2,n,VoiceMail(5000@default);
- exten => 2,n,Hangup();
- exten => i,1,BackGround(pbx-invalid);
- same => n,WaitExten(2);
- same => n,Goto(s,return);
- exten => t,1,Playback(sorry-youre-having-problems&vm-goodbye);
- same => n,Hangup();
- include => internal;
- [fax-in];
- exten => fax,1,NoOp();
- same => n,Ringing();
- same => n,Set(TIMEOUT(absolute)=300);
- same => n,Set(FileBaseName=${STRFTIME(${EPOCH},,%Y%m%d)}-${CALLERID(num)}-${UNIQUEID});
- same => n,Set(FAXFILE=/var/spool/asterisk/fax/${FileBaseName}.tif);
- same => n,Set(PDFFILE=/var/spool/asterisk/fax/pdf/${FileBaseName}.pdf);
- ;same => n,Wait(9); Optional, for more ring time
- same => n,ReceiveFAX(${FAXFILE});
- exten => h,1,NoOp();
- same => n,GotoIf($[${EXISTS(${FAXOPT(status)})}]?${FAXOPT(status)});
- same => n,Set(FAXOPT(status)=NOSTATUS);
- same => n(SUCCESS),NoOp();
- same => n,System(/usr/bin/tiff2pdf -o ${PDFFILE} ${FAXFILE});
- same => n,System(/bin/echo "Please see attachment."|/usr/bin/mutt -a ${PDFFILE} -s "New fax from ${CALLERID(num)}" -- ${DB(fax/fax-manager/email)});
- ;same => n,System(/bin/rm ${FAXFILE}); Delete the TIFF
- ;same => n,System(/bin/rm ${PDFFILE}); Delete the PDF
- same => n,Goto(end);
- same => n(FAILED),NoOp();
- same => n,System(/bin/echo "I regret to inform you that a fax from ${CALLERID(all)} has failed. If you were expecting a fax from this number\, you may need to contact the sender and ask to have it sent again."|/usr/bin/mutt -s "Fax from ${CALLERID(num)} failed" -- ${DB(fax/fax-manager/email)});
- same => n(end),NoOp();
- same => n,Verbose(mail result = ${SYSTEMSTATUS});
- exten => t,1,Congestion();
- exten => T,1,Hangup();
- [callcentric-outbound];
- exten => _1777ZXXXXXX,1,Dial(SIP/callcentric/${EXTEN}); callcentric internal calling using 777 area code
- [voipms-outbound];
- exten => _NXXXXXX,1,Goto(1314${EXTEN},1); 7-digit dialing in the 314 area code
- exten => _NXXNXXXXXX,1,Goto(1${EXTEN},1); 10-digit dialing
- exten => _1NXXNXXXXXX,1,Dial(SIP/voipms/${EXTEN}); 11-digit dialing
- exten => _1NXXNXXXXXX,n,Hangup();
- exten => _011.,1,Dial(SIP/voipms/${EXTEN}); international dialing using 011 prefix
- exten => _011.,n,Hangup();
- exten => _00.,1,Dial(SIP/voipms/${EXTEN}); international dialing using 00 prefix
- exten => _00.,n,Hangup();
- [isn-outbound];
- exten => _012.,1,NoOp();
- exten => _012.,n,Set(CALLERID(num)=700${CALLERID(num)}*929);
- exten => _012.,n,Set(CALLERID(name)=ISN ${CALLERID(name)});
- exten => _012.,n,Set(TIMEOUT(absolute)=10800);
- exten => _012.,n,Set(isnresult=${ENUMLOOKUP(${EXTEN:3},sip,,,freenum.org)});
- exten => _012.,n,GotoIf($["${isnresult}" = ""]?congestion);
- exten => _012.,n,Dial(SIP/${isnresult},120);
- exten => _012.,n(congestion),Congestion();
- exten => h,1,Hangup();
- exten => i,1,Congestion();
- exten => T,1,Hangup();
- [internal];
- exten => 123,1,Dial(SIP/00001234FFFF-a,30);
- exten => 528,1,Dial(SIP/001122334455,30);
- exten => 762,1,Dial(SIP/aabbccddeeff,36);
- [phones];
- include => internal;
- include => callcentric-outbound;
- include => voipms-outbound;
- include => isn-outbound;
- [unauthenticated];
- exten => _X.,1,Verbose(Call to undefined ${EXTEN}: ${CALLERID(all)} -- ${STRFTIME(${EPOCH},,%Y-%m-%d %H%M.%S)});
- exten => _X.,n,Playback(silence/1&ss-noservice);
- exten => _X.,n,Congestion(30);
- exten => _X.,n,Hangup();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement