All pastes #753261 Raw Edit

Someone

public text v1 · immutable
#753261 ·published 2007-10-29 02:16 UTC
rendered paste body
[general]
;
; If static is set to no, or omitted, then the pbx_config will rewrite
; this file when extensions are modified.  Remember that all comments
; made in the file will be lost when that happens. 
;
; XXX Not yet implemented XXX
;
static=yes
;
; if static=yes and writeprotect=no, you can save dialplan by
; CLI command "dialplan save" too
;
writeprotect=no
;
; If clearglobalvars is set, global variables will be cleared 
; and reparsed on an extensions reload, or Asterisk reload.
;
; If clearglobalvars is not set, then global variables will persist
; through reloads, and even if deleted from the extensions.conf or
; one of its included files, will remain set to the previous value.
;
; NOTE: A complication sets in, if you put your global variables into
; the AEL file, instead of the extensions.conf file. With clearglobalvars
; set, a "reload" will often leave the globals vars cleared, because it
; is not unusual to have extensions.conf (which will have no globals)
; load after the extensions.ael file (where the global vars are stored).
; So, with "reload" in this particular situation, first the AEL file will
; clear and then set all the global vars, then, later, when the extensions.conf
; file is loaded, the global vars are all cleared, and then not set, because
; they are not stored in the extensions.conf file.
;
clearglobalvars=no

; The "Globals" category contains global variables that can be referenced
; in the dialplan with the GLOBAL dialplan function:
; ${GLOBAL(VARIABLE)}
; ${${GLOBAL(VARIABLE)}} or ${text${GLOBAL(VARIABLE)}} or any hybrid
; Unix/Linux environmental variables can be reached with the ENV dialplan
; function: ${ENV(VARIABLE)}
;
[globals]
TRUNK=Zap/1					; Trunk interface
SIPURA = sip/522
SunRoom = sip/523
Bedroom = sip/524
LivingRoom = sip/525

;My Contexts
[default]					;Incoming Trunk Calls
;exten => _X.,1,Noop(Called Extension is ${EXTEN})	;Test feature
exten => _X,1,Answer
exten => s,2,Dial(SIP/522&SIP/523&SIP/524&SIP/525,25)
exten => s,3,Answer()
exten => s,4,Voicemail(522,u)
include => internal
include => parkedcalls
include => shortcodes

[outgoing]
exten => _NXXXXXX,1,Dial(Zap/1/${EXTEN})
exten => _NXXXXXX,2,Congestion()
exten => _NXXXXXX,3,Busy()
exten => _1NXXNXXXXXX,1,Dial(Zap/1/${EXTEN})
exten => _1NXXNXXXXXX,2,Congestion()
exten => _1NXXNXXXXXX,3,Busy()
exten => 411,1,Dial(Zap/1/18003733411)
exten => 611,1,Dial(Zap/1/611)
include => parkedcalls

[internal]
;exten => _5XX,1,Dial(SIP/${EXTEN})
;exten => _5XX,2,Answer()
;exten => _5XX,3,Voicemail(522,u)
exten => 522,1,Dial(SIP/522,20)
exten => 522,2,Answer()
exten => 522,3,Voicemail(522,u)
exten => 522,4,Hangup()
exten => a,1,Goto(SecretAA,s,1)
exten => 523,1,Dial(SIP/522,20)
exten => 523,2,Answer()    
exten => 523,3,Voicemail(522,u)
exten => 523,4,Hangup()
exten => 524,1,Dial(SIP/522,20)
exten => 524,2,Answer()    
exten => 524,3,Voicemail(522,u)
exten => 524,4,Hangup()
exten => 525,1,Dial(SIP/522,20)
exten => 525,2,Answer()    
exten => 525,3,Voicemail(522,u)
exten => 525,4,Hangup()
exten => 526,1,Dial(SIP/522,20)
exten => 526,2,Answer()    
exten => 526,3,Voicemail(522,u)
exten => 526,4,Hangup()
exten => 699,1,MeetMe(699,DiprM,3550)
exten => 700,1,Park()
exten => 701,1,Wait(1)
exten => 701,2,ParkedCall(701)
include = prompts
include = parkedcalls
include = shortcodes
include = outgoing
include => Blf_Group_1
include => Blf-Group-Pickup
include => Intercom_Group
include => One_Way_Page_Group
include => Two_way_Page_Group
include => SecretAA

[shortcodes]
exten => *20,1,agi,/var/lib/asterisk/agi-bin/backup.py
exten => *20,2,Hangup()
exten => *17,1,VoiceMailMain()
exten => *62,1,agi,/var/lib/asterisk/agi-bin/wakeup.php
exten => *62,2,Hangup()
exten => *63,1,WaitMusicOnHold(30)
exten => *64,1,agi,/var/lib/asterisk/agi-bin/astermyth.php
exten => *64,2,Hangup()
exten => *18,1,Answer()
exten => *18,2,Background(pls-wait-connect-call)
exten => *18,3,DISA(no-password|internal)
exten => *19,1,Answer
exten => *19,2,Playback(national-weather-service)
exten => *19,3,agi,/var/lib/asterisk/agi-bin/weather.pl
exten => *19,4,Wait(1)
exten => *19,5,Playback(currentconditions)
exten => *19,6,Playback(forecast)
exten => *19,7,Hangup()
exten => *21,1,Answer
exten => *21,2,SayDigits(${CALLERID(number)})
exten => *21,3,SayAlpha(${CALLERID(name)})
exten => *21,4,Hangup()
exten => *99,1,Answer
exten => *99,2,Playback(/var/lib/asterisk/sounds/tt-monkeys)
exten => *99,3,Playback(/var/lib/asterisk/sounds/tt-monkeys)
exten => *99,4,Hangup()

[prompts]
exten => *3,1,Answer()
exten => *3,2,Record(EndTime.gsm)
exten => *3,3,Playback(EndTime)
exten => *3,4,Hangup()
exten => *4,1,Answer()
exten => *4,2,Record(AAgreeting.gsm)
exten => *4,3,Playback(AAgreeting)
exten => *4,4,Hangup()
exten => *6,1,Record(MythTheShowTime.gsm)
exten => *6,2,Playback(MythTheShowTime)
exten => *6,3,Hangup()

[SecretAA]
exten => s,1,Answer
exten => s,2,Set(TRIES=0)
exten => s,3(playback),Background(AAgreeting)
exten => s,4,WaitExten(3)
exten => 1,1,Goto(internal,522,1)
exten => 2,1,Dial(SIP/523&SIP/524&SIP/525,20,r)
exten => 2,2,Answer()
exten => 2,3,Voicemail(523,u)
exten => 3,1,Playback(im-sorry)
exten => 3,2,Playback(please-try-again)
exten => 3,3,GoTo(s,1)
exten => 4,1,Playback(im-sorry)
exten => 4,2,Playback(please-try-again)
exten => 4,3,GoTo(s,1)
exten => 5,1,Playback(im-sorry)
exten => 5,2,Playback(please-try-again)
exten => 5,3,GoTo(s,1)
exten => 6,1,Playback(im-sorry)
exten => 6,2,Playback(please-try-again)
exten => 6,3,GoTo(s,1)
exten => 7,1,Playback(im-sorry)
exten => 7,2,Playback(please-try-again)
exten => 7,3,GoTo(s,1)
exten => 8,1,Playback(im-sorry)
exten => 8,2,Playback(please-try-again)
exten => 8,3,GoTo(s,1)
exten => 9,1,Playback(im-sorry)
exten => 9,2,Playback(please-try-again)
exten => 9,3,GoTo(s,1)
exten => 0,1,Playback(im-sorry)
exten => 0,2,Playback(please-try-again)
exten => 0,3,GoTo(s,1)
exten => t,1,Playback(im-sorry)
exten => t,2,Playback(please-try-again)
exten => t,3,Set(TRIES=$[${TRIES} +1])
exten => t,4,GoToIf($[${TRIES} >2]?disconnect)
exten => t,5,GoTo(s,playback)
exten => t,6(disconnect),Playback(please-hang-up-and-try-again)
exten => t,7,Hangup()
include => internal

[Blf_Group_1]
exten => 522,hint,SIP/522
exten => 523,hint,SIP/523
exten => 524,hint,SIP/524
exten => 525,hint,SIP/525
exten => 526,hint,SIP/526
exten => 701,hint,park:701@parkedcalls

[macro-page];
;
; Paging macro:
;
;       Check to see if SIP device is in use and DO NOT PAGE if they are
;
;   ${ARG1} - Device to page

exten => s,1,ChanIsAvail(${ARG1}|js)			; j is for Jump and s is for ANY call
exten => s,n,GoToIf([${AVAILSTATUS} = "1"]?autoanswer:fail)
exten => s,n(autoanswer),Set(_ALERT_INFO="RA")			; This is for the PolyComs
exten => s,n,SIPAddHeader(Call-Info: Answer-After=0)	; This is for the Grandstream, Snoms, and Others
exten => s,n,NoOp()					; Add others here and Post on the Wiki!!!!
exten => s,n,Dial(${ARG1}||)
exten => s,n(fail),Hangup


[Intercom_Group]
exten => _*5XX,1,Macro(page,SIP/${EXTEN})  ;Page Each Extension
exten => _*5XX,2,Hangup

[One_Way_Page_Group]
exten => **1,1,Set(TIMEOUT(absolute)=60)
exten => **1,2,Page(SIP/522@page&SIP/523@page&SIP/524@page&SIP/525@page/n|d)