All pastes #491850 Raw Edit

Unnamed

public ini v1 · immutable
·published 2007-05-16 21:43 UTC
rendered paste body
;;;;;;  Most of this is junk, all the active stuff is at the bottom;  I just left a lot of what was here when I set up * ;  so I could study it later.;;;;;;; Asterisk Management Portal (AMP); Copyright (C) 2004 Coalescent Systems Inc; dialparties.agi (http://www.sprackett.com/asterisk/); Asterisk::AGI (http://asterisk.gnuinter.net/); gsm (http://www.ibiblio.org/pub/Linux/utils/compress/!INDEX.short.html); loligo sounds (http://www.loligo.com/asterisk/sounds/); mpg123 (http://voip-info.org/wiki-Asterisk+config+musiconhold.conf); include extension contexts generated from AMP#include extensions_additional.conf; Customizations to this dialplan should be made in extensions_custom.conf; See extensions_custom.conf.sample for an example#include extensions_custom.conf[macro-vm]exten => s,1,Voicemail(u${ARG1})      ; no answer to voicemailexten => s,2,Hangupexten => o,1,Background(one-moment-please)	; 0 during vm message will hangupexten => o,2,Hangupexten => a,1,Goto(app-directory,*411,1)exten => a,2,Hangup; What to do on hangup.[macro-hangupcall]exten => s,1,ResetCDR(w)exten => s,2,NoCDR()exten => s,3,Wait(5)exten => s,4,Hangup[macro-faxreceive]exten => s,1,SetVar(FAXFILE=/var/spool/asterisk/fax/${UNIQUEID}.tif)exten => s,2,SetVar(EMAILADDR=${FAX_RX_EMAIL})exten => s,3,rxfax(${FAXFILE})exten => s,103,SetVar(EMAILADDR=${FAX_RX_EMAIL})exten => s,104,Goto(3); ############################################################################; Applications [app]; ############################################################################;[app-directory]exten => #,1,Wait(1)exten => #,2,GotoIf($[${DIRECTORY} = first]?4:)exten => #,3,Directory(default|ext-local)exten => #,4,Directory(default|ext-local|f)exten => #,5,Hangupexten => *411,1,Wait(1)exten => *411,2,GotoIf($[${DIRECTORY} = first]?4:)exten => *411,3,Directory(default|ext-local)exten => *411,4,Directory(default|ext-local|f)exten => *411,5,Hangupexten => h,1,Hangup[app-dnd]exten => *78,1,Answerexten => *78,2,Wait(1)exten => *78,3,DBput(DND/${CALLERIDNUM}=YES)exten => *78,4,Playback(allison7/do-not-disturb)exten => *78,5,Playback(activated)exten => *78,6,Macro(hangupcall)exten => *79,1,Answerexten => *79,2,Wait(1)exten => *79,3,DBdel(DND/${CALLERIDNUM})exten => *79,4,Playback(allison7/do-not-disturb)exten => *79,5,Playback(de-activated)exten => *79,6,Macro(hangupcall)[app-messagecenter]exten => *98,1,Answerexten => *98,2,Wait(1)exten => *98,3,VoiceMailMain(default)exten => *98,4,Macro(hangupcall)exten => _*98X.,1,Answer			; can dial *98<exten> to skip 'mailbox' prompt.  Useful for speedial.exten => _*98X.,2,Wait(1)exten => _*98X.,3,VoiceMailMain(${EXTEN:3}@default)exten => _*98X.,4,Macro(hangupcall)[app-callwaiting]exten => *70,1,Answerexten => *70,2,Wait(1)exten => *70,3,DBput(CW/${CALLERIDNUM}=ENABLED)exten => *70,4,Playback(callwaiting)exten => *70,5,Playback(activated)exten => *70,6,Macro(hangupcall)exten => *71,1,Answerexten => *71,2,Wait(1)exten => *71,3,DBdel(CW/${CALLERIDNUM})exten => *71,4,Playback(callwaiting)exten => *71,5,Playback(de-activated)exten => *71,6,Macro(hangupcall)[app-callforward]; dialed call forward app - forwards calling extensionexten => _*72.,1,DBput(CF/${CALLERIDNUM}=${EXTEN:3})exten => _*72.,2,Answerexten => _*72.,3,Wait(1)exten => _*72.,4,Playback(loligo/call-fwd-unconditional)exten => _*72.,5,Playback(loligo/for)exten => _*72.,6,Playback(loligo/extension)exten => _*72.,7,SayDigits(${CALLERIDNUM})exten => _*72.,8,Playback(loligo/is-set-to)exten => _*72.,9,SayDigits(${EXTEN:3})exten => _*72.,10,Macro(hangupcall); prompting call forward app - forwards entered extensionexten => *72,1,Answerexten => *72,2,Wait(1)exten => *72,3,BackGround(allison7/please-enter-your)exten => *72,4,Playback(extension)exten => *72,5,Read(fromext,then-press-pound)exten => *72,6,Wait(1)exten => *72,7,BackGround(ent-target-attendant)exten => *72,8,Read(toext,then-press-pound)exten => *72,9,Wait(1)exten => *72,10,DBput(CF/${fromext}=${toext})exten => *72,11,Playback(call-fwd-unconditional)exten => *72,12,Playback(for)exten => *72,13,Playback(extension)exten => *72,14,SayDigits(${fromext})exten => *72,15,Playback(is-set-to)exten => *72,16,SayDigits(${toext})exten => *72,17,Macro(hangupcall); cancels dialed extension call forwardexten => _*73.,1,DBdel(CF/${EXTEN:3})exten => _*73.,2,Answerexten => _*73.,3,Wait(1)exten => _*73.,4,SayDigits(${EXTEN:3})exten => _*73.,5,Playback(call-fwd-cancelled)exten => _*73.,6,Macro(hangupcall); cancels call forward for calling extensionexten => *73,1,DBdel(CF/${CALLERIDNUM})exten => *73,2,Answerexten => *73,3,Wait(1)exten => *73,4,Playback(loligo/call-fwd-cancelled)exten => *73,5,Macro(hangupcall); dialed call forward on busy app - forwards calling extension when busyexten => _*90.,1,DBput(CFB/${CALLERIDNUM}=${EXTEN:3})exten => _*90.,2,Answerexten => _*90.,3,Wait(1)exten => _*90.,4,Playback(loligo/call-fwd-on-busy)exten => _*90.,5,Playback(loligo/for)exten => _*90.,6,Playback(loligo/extension)exten => _*90.,7,SayDigits(${CALLERIDNUM})exten => _*90.,8,Playback(loligo/is-set-to)exten => _*90.,9,SayDigits(${EXTEN:3})exten => _*90.,10,Macro(hangupcall); cancels call forward on busy for calling extensionexten => *91,1,DBdel(CFB/${CALLERIDNUM})exten => *91,2,Answerexten => *91,3,Wait(1)exten => *91,4,Playback(call-fwd-on-busy)exten => *91,5,Playback(de-activated)exten => *91,6,Macro(hangupcall)exten => h,1,Hangup;;;;;;;;;;;;;;;;;;;;;;;;  userful bit;;;;;;;;;;;;;;;;;;;;;;[inbound]; My inbound number from voipuser.orgexten => 08444xxxxxx,1,Goto(inbound|s|1)exten => s,1,Answerexten => s,2,DigitTimeout,9exten => s,3,ResponseTimeout,9exten => s,4,BackGround(mygreeting)exten => i,1,Playback,pbx-invalidexten => i,1,Goto(inbound|s|1)exten => t,1,Goto(myextensions|200|1)exten => t,2,Hangupinclude => myextensions[myextensions] ; Our context for X-Lite clients; rather than using this for each and every extension;exten => 201,1,Playback,transfer;exten => 201,2,Dial(SIP/201|20|r);exten => 201,3,Voicemail,u201;exten => 201,103,Voicemail,b201;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; we are going to use 1 line which looks like this:exten => _XXX,1,Macro(staff,${EXTEN});;;;;;;;;;;;;;	Record Main Greeting;;;;;;;;;;;;exten => 9998,1,Record,mygreeting:gsmexten => 9999,1,Playback,mygreeting[mcwa]include => myextensionsinclude => voicemailinclude => outbound[macro-staff]exten => s,1,Playback,transferexten => s,2,Dial(SIP/${ARG1}|20|r)exten => s,3,Voicemail(u${ARG1})exten => s,103,Voicemail(b${ARG1})[voicemail]exten => 6969,1,VoicemailMain(${CALLERIDNUM})[outbound]exten => _XXXXXXXXXXX,1,Dial(IAX/user:password@voipuser/${EXTEN})exten => _XXXXXXXXXXX,2,Dial(SIP/${EXTEN}@voipuser)exten => _00.,1,Dial(SIP/${EXTEN}@voipuser)