Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [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 'save dialplan' too
- ;
- writeprotect = no
- ;
- ; If autofallthrough is set, then if an extension runs out of
- ; things to do, it will terminate the call with BUSY, CONGESTION
- ; or HANGUP depending on Asterisk's best guess. This is the default.
- ;
- ; If autofallthrough is not set, then if an extension runs out of
- ; things to do, Asterisk will wait for a new extension to be dialed
- ; (this is the original behavior of Asterisk 1.0 and earlier).
- ;
- autofallthrough = yes
- ;
- ; 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
- ;
- ; If priorityjumping is set to 'yes', then applications that support
- ; 'jumping' to a different priority based on the result of their operations
- ; will do so (this is backwards compatible behavior with pre-1.2 releases
- ; of Asterisk). Individual applications can also be requested to do this
- ; by passing a 'j' option in their arguments.
- ;
- ;priorityjumping=yes
- ;
- ; User context is where entries from users.conf are registered. The
- ; default value is 'default'
- ;
- ;userscontext=default
- ;
- ; You can include other config files, use the #include command
- ; (without the ';'). Note that this is different from the "include" command
- ; that includes contexts within other contexts. The #include command works
- ; in all asterisk configuration files.
- ;
- ;#include "filename.conf"
- ;
- ; 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)}
- ;
- ;---------------------------------------------------------------------------------------------
- ;Start DialPlan Basics
- ;---------------------------------------------------------------------------------------------
- ; Any category other than "General" and "Globals" represent
- ; extension contexts, which are collections of extensions.
- ;
- ; Extension names may be numbers, letters, or combinations
- ; thereof. If an extension name is prefixed by a '_'
- ; character, it is interpreted as a pattern rather than a
- ; literal. In patterns, some characters have special meanings:
- ;
- ; X - any digit from 0-9
- ; Z - any digit from 1-9
- ; N - any digit from 2-9
- ; [1235-9] - any digit in the brackets (in this example, 1,2,3,5,6,7,8,9)
- ; . - wildcard, matches anything remaining (e.g. _9011. matches
- ; anything starting with 9011 excluding 9011 itself)
- ; ! - wildcard, causes the matching process to complete as soon as
- ; it can unambiguously determine that no other matches are possible
- ;
- ; For example the extension _NXXXXXX would match normal 7 digit dialings,
- ; while _1NXXNXXXXXX would represent an area code plus phone number
- ; preceded by a one.
- ;
- ; Each step of an extension is ordered by priority, which must
- ; always start with 1 to be considered a valid extension. The priority
- ; "next" or "n" means the previous priority plus one, regardless of whether
- ; the previous priority was associated with the current extension or not.
- ; The priority "same" or "s" means the same as the previously specified
- ; priority, again regardless of whether the previous entry was for the
- ; same extension. Priorities may be immediately followed by a plus sign
- ; and another integer to add that amount (most useful with 's' or 'n').
- ; Priorities may then also have an alias, or label, in
- ; parenthesis after their name which can be used in goto situations
- ;
- ; Contexts contain several lines, one for each step of each
- ; extension, which can take one of two forms as listed below,
- ; with the first form being preferred. One may include another
- ; context in the current one as well, optionally with a
- ; date and time. Included contexts are included in the order
- ; they are listed.
- ;
- ;-----------------------------------------------------------------------------
- ; Magic Extensions to be used within a context
- ;-----------------------------------------------------------------------------
- ; s = start
- ; t = This gets jumped to on timeout waiting for keypress
- ; i = This gets jumped to on an invalid extension
- ; h = This gets jumped to when a call in a given context is hung up
- ; fax = This gets jumped to on fax tone detection
- ;-----------------------------------------------------------------------------
- ; Dial Options
- ;-----------------------------------------------------------------------------
- ; Dial jumps to priority n+101 on Congestion if n+101 exists
- ; 't' -- Allow the user to dial # then an extension to transfer
- ; 'T' -- to allow the calling user to transfer the call
- ; 'r' -- indicate ringing to the calling party, pass no audio until answer
- ; 'm' -- provide hold music to the calling party until answered
- ; 'd' -- data-quality (modem) call (minimum delay)
- ; 'c' -- clear-channel data call (PRI-PRI only)
- ; 'H' -- allow caller to hang up by hitting *
- ; 'C' -- reset call detail record for this call
- ; 'P[(x)]' -- privacy mode, using 'x' as database if provided
- ; 'g' -- goes on in context if the destination channel hangs up
- ;----------------------------------------------------------------------------
- ;
- ;
- ; Note the 'g2' in the TRUNK variable below. It specifies which group (defined
- ; in zapata.conf) to dial, i.e. group 2, and how to choose a channel to use in
- ; the specified group. The four possible options are:
- ;
- ; g: select the lowest-numbered non-busy Zap channel
- ; (aka. ascending sequential hunt group).
- ; G: select the highest-numbered non-busy Zap channel
- ; (aka. descending sequential hunt group).
- ; r: use a round-robin search, starting at the next highest channel than last
- ; time (aka. ascending rotary hunt group).
- ; R: use a round-robin search, starting at the next lowest channel than last
- ; time (aka. descending rotary hunt group).
- ;
- ;-----------------------------------------------------
- ;Start Globals
- ;-----------------------------------------------------
- [globals]
- ;CONSOLE=Console/dsp ; Console interface for demo
- ;CONSOLE=Zap/1
- ;CONSOLE=Phone/phone0
- ;IAXINFO=guest ; IAXtel username/password
- ;IAXINFO=myuser:mypass
- ;TRUNK=Zap/g2
- ;
- TRUNKMSD = 0 ; MSD digits to strip (usually 1 or 0)
- ;
- fwddialup = SIP/fwddialup
- sipphone = SIP/sipphone
- ;
- ;-------------------------------------------------------------
- ; Sip/Voip Provider. Context for each diff provider.
- ; Read and used to fill in dial strings for outbound Dialing.
- ;-------------------------------------------------------------
- ;Number=
- ;AREACODE=
- ;USERID=
- ;USERPASS=
- ;SIPCOMPANYNAME=
- ;PROTOCOL=SIP ;SIP or IAX2
- ;
- ;SipPhone.com
- ;SIPNUMBER= ;your SipPhonecom Number Here
- ;SIPUSERID= ;Your User ID here
- ;SIPPASS= ;Your Password here
- ;PROTOCOL=SIP
- ;
- ;IAXTEL.com user info ------ currently iaxtell offline---------------
- ;IAXLINE=
- ;IAXTELUSER=
- ;IAXCOMPANYNAME=
- ;IAXTELPASS=
- ;PROTOCOL=IAX2
- ;
- ;FreeWorld Dialup user info
- ;FWDNUMBER=
- ;FWDUSERID=
- ;FWDPASSWD=
- ;PROTOCOL=SIP ;SIP or IAX2
- ;
- ;--------------------------
- ;asterisk talk show globals exten 501
- ;-------------------------
- MY_PIN = 3232814080
- MY_SHOW = 22622
- ;
- ;-----------------------------------------------------
- ;Start DialPlan
- ;-----------------------------------------------------
- ;------------------------------------------------------
- ; Start - inbound call mapping
- ;------------------------------------------------------
- [inbound]
- ;
- ;This Exten Goes to Automated attendant after putting
- ;caller ID into the Database
- exten = s,1,Set(BD(Last/Caller=${CALLERIDNUM})
- exten = s,n,Goto(us-holiday-timerules,s,1)
- ;exten = s,n,Goto(can-holiday-timerules,s,1)
- ;
- ;------------------------------------------------------
- ; Basic Time Checking for inbouund routing
- ;
- ;I mapped us and canadian holidays. Still needs EU holidays.
- ;I planb to create a holidays.conf in the future with all the
- ;diff holidays and their country
- ;------------------------------------------------------
- ;
- [us-holiday-timerules]
- exten = s,1,GotoIfTime(*|*|31-1|dec-jan?s|HOLIDAY1)
- exten = s,n,GotoIfTime(*|*|28|may?s|HOLIDAY2)
- exten = s,n,GotoIfTime(*|*|4|jul?s|HOLIDAY3)
- exten = s,n,GotoIfTime(*|*|3|sept?s|HOLIDAY4)
- exten = s,n,GotoIfTime(*|*|8|oct?s|HOLIDAY5)
- exten = s,n,GotoIfTime(*|*|11|nov?s|HOLIDAY6)
- exten = s,n,GotoIfTime(*|*|22|nov?s|HOLIDAY7)
- exten = s,n,GotoIfTime(*|*|24-26|dec?s|HOLIDAY8)
- exten = s,n,Goto(timebasedrules,1,1)
- ;
- exten = s,n(HOLIDAY1),Playback(office-closed&newyears)
- exten = s,n,Goto(s,HOURS))
- exten = s,n(HOLIDAY2),Playback(office-closed&memorialday)
- exten = s,n,Goto(s,HOURS))
- exten = s,n(HOLIDAY3),Playback(office-closed&independanceday)
- exten = s,n,Goto(s,HOURS))
- exten = s,n(HOLIDAY4),Playback(office-closed&Laborday)
- exten = s,n,Goto(s,HOURS)
- exten = s,n(HOLIDAY5),Playback(office-closed&ColumbusDay)
- exten = s,n,Goto(s,HOURS)
- exten = s,n(HOLIDAY6),Playback(office-closed&vetrans)
- exten = s,n,Goto(s,HOURS)
- exten = s,n(HOLIDAY7),Playback(office-closed&thanksgiving)
- exten = s,n,Goto(s,HOURS)
- exten = s,n(HOLIDAY8),Playback(office-closed&x-mas)
- exten = s,n,Goto(s,HOURS)
- ;
- [can-holiday-timerules]
- exten = s,1,GotoIfTime(*|*|31-1|dec-jan?s|HOLIDAY1)
- exten = s,n,GotoIfTime(*|*|6|april?s|HOLIDAY2)
- exten = s,n,GotoIfTime(*|*|9|april?s|HOLIDAY3)
- exten = s,n,GotoIfTime(*|*|21|may?s|HOLIDAY4)
- exten = s,n,GotoIfTime(*|*|25|jun?s|HOLIDAY5)
- exten = s,n,GotoIfTime(*|*|1-2|jul?s|HOLIDAY6)
- exten = s,n,GotoIfTime(*|*|6|aug?s|HOLIDAY7)
- exten = s,n,GotoIfTime(*|*|3|sept?s|HOLIDAY8)
- exten = s,n,GotoIfTime(*|*|8|oct?s|HOLIDAY9)
- exten = s,n,GotoIfTime(*|*|12|nov?s|HOLIDAY10)
- exten = s,n,GotoIfTime(*|*|24-25|dec?s|HOLIDAY11)
- exten = s,n,GotoIfTime(*|*|26|dec?s|HOLIDAY12)
- exten = s,n,Goto(timebasedrules,1,1)
- ;
- exten = s,n(HOLIDAY1),Playback(office-closed&New-Years)
- exten = s,n,Goto(s,HOURS))
- exten = s,n(HOLIDAY2),Playback(office-closed&Good-Friday)
- exten = s,n,Goto(s,HOURS))
- exten = s,n(HOLIDAY3),Playback(office-closed&Easter-Monday)
- exten = s,n,Goto(s,HOURS))
- exten = s,n(HOLIDAY4),Playback(office-closed&Victoriaday)
- exten = s,n,Goto(s,HOURS)
- exten = s,n(HOLIDAY5),Playback(office-closed&SanJuanBaptisteDay)
- exten = s,n,Goto(s,HOURS)
- exten = s,n(HOLIDAY6),Playback(office-closed&CanadaDay)
- exten = s,n,Goto(s,HOURS)
- exten = s,n(HOLIDAY7),Playback(office-closed&Laborday)
- exten = s,n,Goto(s,HOURS)
- exten = s,n(HOLIDAY8),Playback(office-closed&Thanksgiviing)
- exten = s,n,Goto(s,HOURS)
- exten = s,n(HOLIDAY9),Playback(office-closed&Remberanceday)
- exten = s,n,Goto(s,HOURS)
- exten = s,n(HOLIDAY10),Playback(office-closed&xmas)
- exten = s,n,Goto(s,HOURS)
- exten = s,n(HOLIDAY11),Playback(office-closed&boxingday)
- exten = s,n,Goto(office-hours,s,1)
- ;
- [office-hours]
- exten = s,1,Playback(office-hours&vm-goodbye))
- exten = s,n,Macro(hangupcall))
- ;
- [timebasedrules]
- exten = 1,1,NoOp(Office Open)
- exten = 1,n,GotoIfTime(08:00-20:00|mon-fri|*|jan-dec?main-irv-menu,s,1)
- exten = 1,n,Goto(office-hours,s,1)
- ;
- ;-------------------------------------------------------------------
- ; Basic Inbound - IVR Menu
- ;-------------------------------------------------------------------
- [main-ivr-menu]
- exten = s,1,Answer()
- exten = s,n,Background(ivr-menu-gsm-or-wav-file)
- exten = s,n,DigitTimeout(5)
- exten = s,n,ResponseTimeout(10)
- ;
- exten = i,1,Background(pbx-invalid) ; "That's not valid, try again"
- exten = i,2,Wait(1)
- exten = i,3,Goto(s,9)
- ;
- exten = t,1,Playback(pls-wait-connect-call)
- exten = t,n,Goto(operator-queue,s,1)
- ;
- ;1 Sales Dept
- exten = 1,1,GotoIfTime(08:00-16:59|mon-fri|*|*?selection,5,2)
- exten = 1,2,Playback(sales-closed)
- exten = 1,3,Playback(vm-goodbye)
- exten = 1,4,Hangup
- exten = 1,5,Playback(pls-wait-connect-call)
- exten = 1,6,Goto(basic-queues|100|1)
- ;
- ;2 Billing Dept
- exten = 2,1,GotoIfTime(08:00-16:59|mon-fri|*|*?selection,5,2)
- exten = 2,2,Playback(biling-closed)
- exten = 2,3,Playback(vm-goodbye)
- exten = 2,4,Hangup
- exten = 2,5,Playback(pls-wait-connect-call)
- exten = 2,6,Goto(basic-queues|101|1)
- ;
- ;3 Technical Support Dept
- exten = 3,1,GotoIfTime(08:00-22:59|mon-fri|*|*?selection,5,2)
- exten = 3,2,Playback(techsupport-closed)
- exten = 3,3,Playback(vm-goodbye)
- exten = 3,4,Hangup
- exten = 3,5,Playback(pls-wait-connect-call)
- exten = 3,6,Goto(basic-queues|102|1)
- ;
- ;9 Fax Extension
- exten = 9,1,Set(CALLEDFAX=${EXTEN})
- exten = 9,2,Answer
- exten = 9,3,Goto(fax,${EXTEN},1)
- ;
- exten = fax,1,Goto(ext- fax,in_fax,1)
- ;
- ;-----------------------------------------------------
- ;Basic Sip / IAX2 Outbound Proviver setup
- ;change provider to your sip/iax2 provider
- ;-----------------------------------------------------
- ;[provider]
- ;US LD & Canada 11 digit Dialing
- ;exten = _1XXXXXXXXXX,1,DIAL(${PROTOCOL}/${USERNAME}:${PASSWORD}@${PROVIDER}/${EXTEN})
- ;exten = _1NXXNXXXXXX,n,Hangup
- ;
- ;10 digit us dialing
- ;exten = _NXXNXXXXXX,1,DIAL(${PROTOCOL}/${USERNAME}:${PASSWORD}@${PROVIDER}/${EXTEN})
- ;exten = _NXXNXXXXXX,n,Hangup
- ;
- ;us local 7 digit dialing
- ;exten = _NXXXXXX,1,DIAL(${PROTOCOL}/${USERNAME}:${PASSWORD}@${PROVIDER}/&{AREACODE}${EXTEN})
- ;exten = _NXXXXXX,n,Hangup
- ;
- ;International Dialing
- ;exten = _011.,1,DIAL(${PROTOCOL}/${USERNAME}:${PASSWORD}@${PROVIDER}/${EXTEN})
- ;exten = _011.,n,Hangup
- ;
- ;---------------------------------------------
- ;Spipphone.com Ooutboune Setup
- ;---------------------------------------------
- ;[sipphone]
- ;exten = _1747NXXXXXX,1,Dial(SIP/${EXTEN}@sipphone)
- ;exten = _1747NXXXXXX,n,Playback(invalid)
- ;exten = _1747NXXXXXX,n,Congestion
- ;exten = _1747NXXXXXX,n,Hangup
- ;
- ;--------------------------------------------
- ;Free world Dialup outbound
- ;--------------------------------------------
- ;[fwddialup]
- ;exten = _#6.,1,Dial(${PROTOCOL}/${FWDNUMBER}:${FWDPASSWORD}@fwd.pulver.com/${EXTEN:2},60,r)
- ;exten = _#6.,n,Hangup
- ;
- ;----------------------------------------------
- ;Master Dialplan
- ;Need to add active feature checking and status checking.
- ;----------------------------------------------
- [macro-trunkdial]
- ;
- ; Standard trunk dial macro (hangs up on a dialstatus that shoul terminate call)
- ; ${ARG1} - What to dial
- ;
- exten => s,1,Dial(${ARG1})
- exten => s,n,Goto(s-${DIALSTATUS},1,)
- exten => s-NOANSWER,1,Hangup
- exten => s-BUSY,1,Hangup
- exten => _s-.,1,NoOp
- ;
- [macro-stdexten]
- ;
- ; Standard extension macro:
- ; ${ARG1} - Extension (we could have used ${MACRO_EXTEN} here as well
- ; ${ARG2} - Device(s) to ring
- ;
- 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,Goto(s-NOANSWER,1) ; Treat anything else as no answer
- exten => a,1,VoicemailMain(${ARG1}) ; 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)`
- ;
- exten => s,1,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-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-DONTCALL,1,Goto(${ARG3},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-.,1,Goto(s-NOANSWER,1) ; Treat anything else as no answer
- exten => a,1,VoicemailMain(${ARG1}) ; If they press *, send the user into VoicemailMain
- ;
- ;------------------------------------------------
- ;Vertical Service Code & Definitions
- ;-----------------------------------------------------
- ;This is Nanpa vertical service codes + Codes I added to the setup and testing, Some of these functions have not been mapped in
- ;asterisk. Some of them can be remapped or changed, but for the most part the layout fallows Nanpa(North American Numbering Plan Assoc).
- ;I did my best to document as I went along as to what each function does.
- ;
- ;I would like to see all the vsc code move to a functions.conf just use a #include = functionc.conf and the same with the macros in time.
- ;
- ;-----------------------------------------------------
- ;Remote Line Pickup ** is used so that gxp2000 can use this function.
- ;-----------------------------------------------------
- [app-pickup]
- exten = _**.,1,Noop(Attempt to Pickup ${EXTEN:2} by ${CALLERID(num)})
- exten = _**.,n,Pickup(${EXTEN:2})
- ;
- ;--------------------------------------------------------------------------------------------------------------------------------
- ;Inward Voice Activated Services (*00 English, *01 French)
- ;IVAS enables a subscribing business to provide automated voice activated routing for inbound English or French speaking calls
- ;(i.e., separate codes for the same service in each language). IVAS will initially consist of the following services:
- ;
- ;* Voice Activated Premier Dialing (VAPD) which allows customers to contact subscribing businesses by speaking the business
- ; name or service.
- ;
- ;* Voice Activated Blue Pages (VABP) which allows customers to request access to government services.
- ;
- ;* Voice Activated Auto Attendant (VAAA) which provides enhancements to Auto Attendant applications by providing a voice
- ; recognition interface in place of Touch Tone.
- ;
- ;* Voice Activated Audio Text (VAAT) provides users ability to request specific information from a business.
- ;
- ;* Voice Activated Interactive Voice Response (VAIVR) which allows the caller to interact with a subscriber's specific
- ; application in a prescribed manner.
- ;--------------------------------------------------------------------------------------------------------------------------------
- ;
- ;--------------------------------------------------------------------------------------------------------------------------------
- ;Deactivation/Activation of In-Session Activation (ISA) on a per line basis (*02)
- ;Allows a subscriber to deactivate or activate (i.e., toggle) the In-Session Activation feature on a per line basis. ISA
- ;is feature that gives the caller a menu of call completion services using voice prompts when the call encounters a busy
- ;or no-answer condition.
- ;--------------------------------------------------------------------------------------------------------------------------------
- ;
- ;--------------------------------------------------------------------------------------------------------------------------------
- ;Deactivation of In-Session Activation (ISA) on a per call basis (*03)
- ;Allows a subscriber to deactivate the In-Session Activation feature on a per call basis. When the call is completed, ISA
- ;reverts back to the active state. ISA is a feature that gives the caller a menu of call completion services using voice
- ;prompts when the call encounters a busy or no-answer condition.
- ;--------------------------------------------------------------------------------------------------------------------------------
- ;----------------------------------------------------
- ; *1 -
- ;----------------------------------------------------
- ;
- ;-----------------------------------------------------------
- ; *2 - Say Phone Number
- ;-----------------------------------------------------------
- [app-say-exten]
- exten = *2,1,Answer
- exten = *2,n,Playback(your-exten-num-is)
- exten = *2,n,SayDigits(${CALLERID(number)})
- exten = *2,n,Macro(hangupcall)
- ;
- ;-----------------------------------------------------------
- ; *3 - Say Date and Time
- ;-----------------------------------------------------------
- [app-say-date]
- exten = *3,1,Answer
- exten = *3,2,Playback(at-tone-time-exactly)
- exten = *3,3,SayUnixTime(,,IMp)
- exten = *3,4,Playback(beep)
- exten = *3,5,Macro(hangupcall)
- ;
- ;-----------------------------------------------------------
- ; *4 - Echo Test
- ;-----------------------------------------------------------
- [app-echo]
- exten = *4,1,Answer
- exten = *4,n,Playback(demo-echotest)
- exten = *4,n,Playback(beep)
- exten = *4,n,Echo
- exten = *4,n,Playback(demo-echodone)
- exten = *4,n,Macro(hangupcall)
- ;
- ;-----------------------------------------------------------
- ; *5 - Milliwatt Tone
- ;-----------------------------------------------------------
- [app-milliwatt]
- exten = *5,1,Answer
- exten = *5,n,Milliwatt
- exten = *5,n,Macro(hangupcall)
- ;
- ;-----------------------------------------------------------
- ; *6 - Record Promt Test Format Gsm
- ; This exten Records and Plays back a gsm file to test the audio on the phone.
- ;-----------------------------------------------------------
- [app-rec-playback]
- exten = *6,1,Answer
- exten = *6,n,Wait(1)
- exten = *6,n,Record(record:gsm)
- exten = *6,n,Wait(1)
- exten = *6,n,Playback(record)
- exten = *6,n,Macro(hangupcall)
- ;
- ;-----------------------------------------------------------
- ; *7 - Music On Hold
- ; You can edit the musiconhold.conf and setup multi diff moh streams Just change MusicOnHold(....)
- ;-----------------------------------------------------------
- [app-moh]
- exten = *7,1,Answer
- exten = *7,n,MusicOnHold(default)
- exten = *7,n,Macro(hangupcall)
- ;
- ;------------------------------------
- ;*8 Says Time & plays Tone & Repeat's
- ;------------------------------------
- [app-clock]; repeates time.
- exten = *8,1,Answer
- exten = *8,2,Set(FutureTime=$[${EPOCH} + 8])
- exten = *8,3,Set(FutureTimeMod=$[${FutureTime} % 10])
- exten = *8,4,Set(FutureTime=$[${FutureTime} - ${FutureTimeMod}])
- exten = *8,5,Set(MaxConnectTime=$[${FutureTime} + 180])
- exten = *8,6,Set(FutureTimeMod=$[${FutureTime} - ${EPOCH}])
- exten = *8,7,GotoIf($["${FutureTimeMod}" < "0"]?10:8)
- exten = *8,8,wait(1)
- exten = *8,9,goto(6)
- exten = *8,10,Answer
- exten = *8,11,Set(FutureTime=$[${FutureTime} + 10])
- exten = *8,12,Set(FutureTimeMod=$[${FutureTime} % 60])
- exten = *8,13,wait(1)
- exten = *8,14,playback(at-tone-time-exactly)
- exten = *8,15,SayUnixTime(${FutureTime},,I)
- exten = *8,16,SayUnixTime(${FutureTime},,M)
- exten = *8,17,GotoIf($["${FutureTimeMod}" = "0"]?18:20)
- exten = *8,18,SayUnixTime(${FutureTime},,p)
- exten = *8,19,goto(23)
- ext
Add Comment
Please, Sign In to add comment