All pastes #433721 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-04-10 23:50 UTC
rendered paste body
;Vertical Service Codes
;Code Definitions
[vsc]
;
;-----------------------------------------------------
;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 - System Status recorded file
;----------------------------------------------------
; *1 - System Status
exten => *1,1,Answer 
exten => *1,n,Wait(.5) 
exten => *1,n,Playback(/usr/local/share/asterisk/sounds/custom/systemstatus) 
exten => *1,n,Wait(.5) 
exten => *1,n,Macro(Hangup)
;
; **1 - System status record
exten => *1*,1,Answer 
exten => *1*,n,Wait(2) 
exten => *1*,n,Record(/usr/local/share/sounds/custom/systemstatus:gsm) 
exten => *1*,n,Wait(2) 
exten => *1*,n,Playback(/usr/local/share/asterisk/sounds/custom/systemstatus) 
exten => *1*,n,Wait(2) 
exten => *1*,n,Macro(Hangupcall)	
;
;-----------------------------------------------------------
; *2 - Say Phone Number
;-----------------------------------------------------------
;[say-exten]
exten => *2,1,Answer
exten => *2,n,Playback(your-exten-num-is)
exten => *65,n,SayDigits(${CALLERID(number)})
exten => *2,n,Macro(hangupcall)
;
;-----------------------------------------------------------
; *3  - Say Date and Time
;-----------------------------------------------------------
;[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
;-----------------------------------------------------------
;[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
;-----------------------------------------------------------
;[tone]
exten => *5,1,Answer
exten => *5,n,Milliwatt
exten => *5,n,Macro(hangupcall)
;
;-----------------------------------------------------------
; *6 - Record Promt Test Format Gsm
;-----------------------------------------------------------
;[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 
;-----------------------------------------------------------
;[moh]
exten => *7,1,Answer
exten => *7,n,MusicOnHold(default)
exten => *7,n,Macro(hangupcall)
;
;------------------------------------
;*8  Says Time & plays Tone & Repeat's
;------------------------------------
;[custom-Repeating-clock] ; repeates time.
exten => *8,1,ringing 
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) 
exten => *8,20,playback(and) 
exten => *8,21,SayUnixTime(${FutureTime},,S) 
exten => *8,22,playback(seconds) 
exten => *8,23,Set(FutureTimeMod=$[${FutureTime} - ${EPOCH}]) 
exten => *8,24,GotoIf($["${FutureTimeMod}" < "1"]?27:25) 
exten => *8,25,wait(1) 
exten => *8,26,goto(23) 
exten => *8,27,playback(beep) 
exten => *8,28,Set(FutureTimeMod=$[${MaxConnectTime} - ${EPOCH}]) 
exten => *8,29,GotoIf($["${FutureTimeMod}" < "1"]?30:11) 
exten => *8,30,Hangup
;
;-----------------------------------------------------------
; *9 - Avaible for local mapping
;-----------------------------------------------------------
;[app-wakeup]
exten => *9,1,Macro(user-callerid,)
exten => *9,n,Answer
exten => *9,n,Wait(1)
exten => *9,n,AGI(wakeup.php)
exten => *9,n,Macro(hangupcall,)
;
;-----------------------------------------------------------
; *10 - Reginal & Local Weather 
;-----------------------------------------------------------
;[app-weather]
exten => *10,1,Macro(user-callerid,)
exten => *10,n,Answer
exten => *10,n,Wait(1)
exten => *10,n,Set(TIMEOUT(digit)=7)
exten => *10,n,Set(TIMEOUT(response)=10)
exten => *10,n,Flite('At the beep enter the five digit zip code for the weather report you wish to retrieve.')
exten => *10,n,Read(ZIPCODE,beep,5,,,,,)
exten => *10,n,Flite('Please hold a moment while we contact the National Weather Service for your report.')
exten => *10,n,AGI(nv-weather-zip.php|${ZIPCODE})
exten => *10,n,Noop(Wave file: ${TMPWAVE})
exten => *10,n,Playback(${TMPWAVE})
exten => *10,n,Macro(hangupcall,)
;
;----------------------------------------------------------
; *11 - System Status via agi
;----------------------------------------------------------
;[system-stat]
exten => *11,1,AGI(systatagi)
exten => *11,n,Wait(1)
exten => *11,n,Playback(loadavgis)
exten => *11,n,SayDigits(${LOADAVGPRE})
exten => *11,n,Playback(point)
exten => *11,n,SayDigits(${LOADAVGSUF})
exten => *11,n,Wait(1)
exten => *11,n,Playback(thereare)
exten => *11,n,SayDigits(${NUMUSER})
exten => *11,n,Playback(userson)
exten => *11,n,Wait(1)
exten => *11,n,Macro(hangupcall)
;
;-----------------------------------------------------------
; *12 - Current Company Job Listings not yet working
;-----------------------------------------------------------
[jobs-postings]
exten => *12,1,Answer 
exten => *12,n,Playback(current-job-postings) 
exten => *12,n,System(/usr/local/bin/curl -s )
exten => *12,n,Wait(1) 
exten => *12,n,MP3Player(/tmp/.mp3) 
exten => *12,n,System(rm /tmp/ .mp3 -f) 
exten => *12,n,Playback(vm-goodbye)
exten => *12,n,Macro(hangupcall)
;
;------------------------------------------------------------
;Intercom
;------------------------------------------------------------
;[ext-intercom]
exten => _*13.,1,Set(dialnumber=${EXTEN:3})
exten => _*13.,n,dbGet(user-intercom=AMPUSER/${dialnumber}/intercom)
exten => _*13.,n,GotoIf($["${user-intercom}" = "disabled" ]?nointercom)
exten => _*13.,n,Set(__SIPADDHEADER=Call-Info: \;answer-after=0)
exten => _*13.,n,Set(__ALERT_INFO=Ring Answer)
exten => _*13.,n,Set(__SIP_URI_OPTIONS=intercom=true)
exten => _*13.,n,Dial(Local/${dialnumber}@from-internal/n,)
exten => _*13.,n,Busy(20)
exten => _*13.,n,Macro(hangupcall,)
exten => _*13.,n(nointercom),Noop(Intercom disallowed by ${dialnumber})
exten => _*13.,n,Playback(intercom&for&extension)
exten => _*13.,n,SayDigits(${dialnumber})
exten => _*13.,n,Playback(is&disabled)
exten => _*13.,n,Congestion(20)
;
;------------------------------------------------------------
;Enable Intercom Per exten
;------------------------------------------------------------
exten => *14,1,Answer
exten => *14,n,Wait(1)
exten => *14,n,Macro(user-callerid,)
exten => *14,n,Set(DB(AMPUSER/${CALLERID(number)}/intercom)=enabled)
exten => *14,n,Playback(intercom&enabled)
exten => *14,n,Macro(hangupcall,)
;
;------------------------------------------------------------
;Disable Intercom Per exten
;------------------------------------------------------------
exten => *15,1,Answer
exten => *15,n,Wait(1)
exten => *15,n,Macro(user-callerid,)
exten => *15,n,Set(DB(AMPUSER/${CALLERID(number)}/intercom)=disabled)
exten => *15,n,Playback(intercom&disabled)
exten => *15,n,Macro(hangupcall,)
;
;
;-------------------------------------------------------------
; DIctation Record
;-------------------------------------------------------------
;[app-dictate-record]
exten => *34,1,Answer
exten => *34,n,Macro(user-callerid,)
exten => *34,n,Noop(CallerID is ${CALLERID(num)})
exten => *34,n,Set(DICTENABLED=${DB(AMPUSER/${CALLERID(num)}/dictate/enabled)})
exten => *34,n,GotoIf($[$["x${DICTENABLED}"="x"]|$["x${DICTENABLED}"="xdisabled"]]?nodict:dictok)
exten => *34,n(nodict),Playback(feature-not-avail-line)
exten => *34,n,Hangup
exten => *34,n(dictok),Dictate(/var/lib/asterisk/sounds/dictate/${CALLERID(num)})
exten => *34,n,Macro(hangupcall,)
;
;---------------------------------------------------------------
;Dictation Send
;---------------------------------------------------------------
;[app-dictate-send]
exten => *35,1,Answer
exten => *35,n,Macro(user-callerid,)
exten => *35,n,Noop(CallerID is ${CALLERID(num)})
exten => *35,n,Set(DICTENABLED=${DB(AMPUSER/${CALLERID(num)}/dictate/enabled)})
exten => *35,n,GotoIf($[$["x${DICTENABLED}"="x"]|$["x${DICTENABLED}"="xdisabled"]]?nodict:dictok)
exten => *35,n(nodict),Playback(feature-not-avail-line)
exten => *35,n,Hangup
exten => *35,n(dictok),Read(DICTFILE,enter-filename-short,,,,)
exten => *35,n,Set(DICTEMAIL=${DB(AMPUSER/${CALLERID(num)}/dictate/email)})
exten => *35,n,Set(DICTFMT=${DB(AMPUSER/${CALLERID(num)}/dictate/format)})
exten => *35,n,Set(NAME=${DB(AMPUSER/${CALLERID(num)}/cidname)})
exten => *35,n,Playback(dictation-being-processed)
exten => *35,n,System(/var/lib/asterisk/bin/audio-email.pl --file /var/lib/asterisk/sounds/dictate/${CALLERID(num)}/${DICTFILE}.raw --attachment dict-${DICTFILE} --format ${DICTFMT} --to ${DICTEMAIL} --subject "Dictation from ${NAME} Attached")
exten => *35,n,Playback(dictation-sent)
exten => *35,n,Macro(hangupcall,)
;
;--------------------------------------------------------------------------------------------------------------------------------
;Change Forward-To Number for Customer/Programmable Call Forwarding Busy Line (*40)
;Access Code followed by directory number is used to change the forwarded-to number for Call Forwarding Busy Line (CFBL). The state 
;of CFBL is not changed when this access code is used. This feature will utilize the activation code of *90 and deactivation code *91 
;with the following exceptions:activation will not require/allow the identification of a forwarded-to directory number and deactivation 
;will not clear the forwarded-to directory number.
;--------------------------------------------------------------------------------------------------------------------------------
exten => _*40.,1,Answer
exten => _*40.,n,Wait(1)
exten => _*40.,n,Macro(user-callerid,)
exten => _*40.,n,Set(DB(CPCFB/${CALLERID(number)})=${EXTEN:3})
exten => _*40.,n,Playback(call-fwd-no-ans&for&extension)
exten => _*40.,n,SayDigits(${CALLERID(number)})
exten => _*40.,n,Playback(is-set-to)
exten => _*40.,n,SayDigits(${EXTEN:3})
exten => _*40.,n,Macro(hangupcall,)
;
;--------------------------------------------------------------------------------------------------------------------------------
;Six-Way Conference Calling Activation (*41)
;Allows the subscriber to originate a six-way conference call. Customers will enter this code prior to the first directory number 
;added into the conference. Each subsequent member of the conference is added with a flash hook. This code is used to eliminate 
;action conflicts with other flash hook originated features.
;--------------------------------------------------------------------------------------------------------------------------------
;
;--------------------------------------------------------------------------------------------------------------------------------
;Change Forward-To Number for Customer Programmable Call Forwarding Don't Answer (*42)
;Access Code followed by directory number is used to change the forwarded-to number for Call Forwarding Don't Answer (CFDA). The 
;state of CFDA is not ;changed when this access code is used. This feature will utilize the activation code of *92 and deactivation 
;code *93 with the following exceptions:activation will not require/allow the identification of a forwarded-to directory number and 
;deactivation will not clear the forwarded-to directory number.
;--------------------------------------------------------------------------------------------------------------------------------
exten => _*42.,1,Answer
exten => _*42.,n,Wait(1)
exten => _*42.,n,Macro(user-callerid,)
exten => _*42.,n,Set(DB(CPCFDA/${CALLERID(number)})=${EXTEN:3})
exten => _*42.,n,Playback(call-fwd-no-ans&for&extension)
exten => _*42.,n,SayDigits(${CALLERID(number)})
exten => _*42.,n,Playback(is-set-to)
exten => _*42.,n,SayDigits(${EXTEN:3})
exten => _*42.,n,Macro(hangupcall,
;
;--------------------------------------------------------------------------------------------------------------------------------
;Drop last member of Six-Way Conference Call (*43)
;Provides the subscriber establishing a six-way conference to terminate the last party added to the call. This frees the port for 
;an additional party when the last party wasn't reachable.
;--------------------------------------------------------------------------------------------------------------------------------
;
;--------------------------------------------------------------------------------------------------------------------------------
;Voice Activated Dialing (*44)
;Access to the Voice Activated Dialing (VAD) directory. Customers will dial this code to access their VAD directory in order to add, 
;delete or review the names and numbers
;--------------------------------------------------------------------------------------------------------------------------------
;
;--------------------------------------------------------------------------------------------------------------------------------
;Voice Dialing Extended Dial Tone (*45)
;Extend dial tone for Voice Activated Dialing (VAD). Customers will dial this code to extend the length of time in which dial 
;tone is heard after going off-hook so that various Customer Premise Equipment (CPE, i.e., fax and modems) will work properly.
;--------------------------------------------------------------------------------------------------------------------------------
;
;--------------------------------------------------------------------------------------------------------------------------------
;French Voice Activated Network Control (*46)
;Provides the subscriber access to Voice Activated Network Control (VANC) via the French language. Subscribers will dial this 
;code to access VANC so that they can say a name or command in French that will be activated, deactivated or provide access 
;to a service, e.g., Call Forwarding, Call Trace, etc.
;--------------------------------------------------------------------------------------------------------------------------------
;
;--------------------------------------------------------------------------------------------------------------------------------
;Override Feature Authorization (*47)
;Allows a subscriber to override a Feature Authorization activated on a line which restricts 1+ calls from that line. Feature 
;Authorization may be overriden by dialing *47 and a Personal Identification Number ;(PIN) and then dialing a 1+ call after 
;receiving a second dial tone.
;--------------------------------------------------------------------------------------------------------------------------------
;
;--------------------------------------------------------------------------------------------------------------------------------
;Override Do Not Disturb (*48)
;Allows a subscriber to override the Do Not Disturb feature which has been activated on a line. After receiving a message 
;indicating the station is in a Do Not Disturb condition, the subscriber may override the condition by dialing *48 and then 
;a Personal Identification Number (PIN) thus allowing the call to be completed in the normal manner.
;--------------------------------------------------------------------------------------------------------------------------------
exten => _*48.,1,Dial(SIP/${ARG1}:3|20|r) ; 20sec timeout
exten => _*48.,n,Voicemail(u${ARG1})
exten => _*48.,n,Hangup
;
;--------------------------------------------------------------------------------------------------------------------------------
;Long Distance Signal (*49)
;Extended period activation/deactivation (toggle) of basic 1FR/1MR long distance signal ringing/call waiting tones.
;--------------------------------------------------------------------------------------------------------------------------------
;
;--------------------------------------------------------------------------------------------------------------------------------
;Voice Activated Network Control (*50)
;Access to Voice Activated Network Control (VANC). Customers will dial this code to access VANC so that they can say a name or
;command that will be activated, deactivated or to access a service.
;--------------------------------------------------------------------------------------------------------------------------------
;
;--------------------------------------------------------------------------------------------------------------------------------
*51 - Who Called Me?
Who Called Me? (*51)
Provides the subscriber with the directory number (DN), date, and time of unanswered calls. 
;--------------------------------------------------------------------------------------------------------------------------------
exten => *51,1,Macro(user-callerid)
exten => *51,2,Answer
exten => *51,3,Wait(1)
exten => *51,4,Background(info-about-last-call)
exten => *51,5,Background(telephone-number)
exten => *51,6,Set(lastcaller=${DB(CALLTRACE/${CALLERID(number)})})
exten => *51,7,GotoIf($[${lastcaller}]?8:10)
exten => *51,8,SayDigits(${lastcaller})
exten => *51,9,Macro(hangupcall)
exten => *51,10,Playback(from-unknown-caller)
exten => *51,11,Playback(unidentified-no-callback)
exten => *51,12,Macro(hangupcall)
;
;--------------------------------------------------------------------------------------------------------------------------------
;Single Line Variety Package (SVP) - Call Hold (*52)
;Gives the subscriber the capability of placing a call on hold so that the call may be continued from another extension.
;--------------------------------------------------------------------------------------------------------------------------------
;
;--------------------------------------------------------------------------------------------------------------------------------
;Single Line Variety Package (SVP) - Distinctive Ring B (*53)
;Allows a subscriber to select, by way of distinctive ringing, the particular person or extension that the subscriber wishes to alert.
;--------------------------------------------------------------------------------------------------------------------------------
;
;--------------------------------------------------------------------------------------------------------------------------------
;Single Line Variety Package (SVP) - Distinctive Ring C (*54)
;Allows a subscriber to select, by way of distinctive ringing, the particular person or extension that the subscriber wishes to alert.
;--------------------------------------------------------------------------------------------------------------------------------
;
;--------------------------------------------------------------------------------------------------------------------------------
;Single Line Variety Package (SVP) - Distinctive Ring D (*55)
;Allows a subscriber to select, by way of distinctive ringing, the particular person or extension that the subscriber wishes to alert.
;--------------------------------------------------------------------------------------------------------------------------------
;
;--------------------------------------------------------------------------------------------------------------------------------
;Change Forward-To Number for ISDN Call Forwarding (*56)
;Access code followed by directory number (DN) is used to change the Forward-To number for Call Forwarding Variable feature button. 
;The state of Call ;Forwarding Variable feature button is not changed when this access code is utilized.
;--------------------------------------------------------------------------------------------------------------------------------
;
;--------------------------------------------------------------------------------------------------------------------------------
;Customer Originated Trace (*57)
;Provides the recipient of an obscene, harassing, or threatening call the ability to request an auto-trace of the last call received.
;--------------------------------------------------------------------------------------------------------------------------------
;
;--------------------------------------------------------------------------------------------------------------------------------
;ISDN MBKS Manual Exclusion (*58 Activation, *59 Deactivation)
;Access code allows a Multibutton Key Set (MBKS) user or an analog set user whose telephone number is shared on another ISDN MBKS
to inhibit other stations from picking up a call on hold or bridging onto a call that is active at the station.
;--------------------------------------------------------------------------------------------------------------------------------
;
;--------------------------------------------------------------------------------------------------------------------------------
;Selective Call Rejection (*60 Activation, *80 Deactivation)
;Allows the subscriber to have incoming calls from a limited number of calling parties rejected by the terminating switching system.
;--------------------------------------------------------------------------------------------------------------------------------
exten => _*60.,1,Macro(user-callerid)
exten => _*60.,n,Set(DB(BLACKLIST/${CALLERID(number)})=${EXTEN:3})
exten => _*60.,n,Answer
exten => _*60.,n,Wait(1)
exten => _*60.,n,Playback(blacklist-add&for&extension)
exten => _*60.,n,SayDigits(${CALLERID(number)})
exten => _*60.,n,Playback(is-set-to)
exten => _*60.,n,SayDigits(${EXTEN:3})
exten => _*60.,n,Macro(hangupcall)
;
;--------------------------------------------------------------------------------------------------------------------------------
;Distinctive Ringing/Call Waiting (*61 Activation, *81 Deactivation)
;Allows the subscriber to have incoming calls from a limited number of calling parties identified using distinctive alerting treatment.
;--------------------------------------------------------------------------------------------------------------------------------
;
;--------------------------------------------------------------------------------------------------------------------------------
;Selective Call Waiting (*62)
;Provides the subscriber the ability to provide a Call Waiting signal to a predetermined list of directory numbers specified by 
;the subscriber. Callers not on the predetermined list will receive busy tone.
;--------------------------------------------------------------------------------------------------------------------------------
exten => *62,1,Answer
exten => *62,n,Wait(1)
exten => *62,n,Macro(user-callerid)
exten => *62,n,Set(DB(SCW/${CALLERID(number)})=ENABLED)
exten => *62,n,Playback(selective-call-waiting&activated)
exten => *62,n,Macro(hangupcall)
exten => _*62.,1,Macro(user-callerid)
exten => _*62.,n,Set(DB(SCW/${CALLERID(number)})=${EXTEN:3})
exten => _*62.,n,Answer
exten => _*62.,n,Wait(1)
exten => _*62.,n,Playback(selective-call-waiting-unconditional&for&extension)
exten => _*62.,n,SayDigits(${CALLERID(number)})
exten => _*62.,n,Playback(is-set-to)
exten => _*62.,n,SayDigits(${EXTEN:3})
exten => _*62.,n,Macro(hangupcall)
;
;--------------------------------------------------------------------------------------------------------------------------------
;Selective Call Forwarding (*63 Activation, *83 Deactivation)
;Allows the subscriber to have incoming calls from a limited number of calling parties forwarded to a prespecified remote station.
;--------------------------------------------------------------------------------------------------------------------------------
exten => *63,1,Answer
exten => *63,n,Wait(1)
exten => *63,n,Macro(user-callerid)
exten => *63,n,Set(DB(SCF/${CALLERID(number)})=ENABLED)
exten => *63,n,Playback(selective-call-waiting&activated)
exten => *63,n,Macro(hangupcall)
exten => _*63.,1,Set(DB(SCF/${CALLERIDNUM})=${EXTEN:3})})
exten => _*63.,n,Answer
exten => _*63,n,Wait(1)
exten => _*63.,n,Playback(selective-call-forwarding&for&extension)
exten => _*63.,n,SayDigits(${CALLERIDNUM})
exten => _*63.,n,Playback(is-set-to)
exten => _*63.,n,SayDigits(${EXTEN:3})
exten => _*63.,n,Macro(hangupcall)
;
;--------------------------------------------------------------------------------------------------------------------------------
;Selective Call Acceptance (*64 Activation, *84 Deactivation)
;Provides the subscriber the ability to block calls from all but a predetermined list of directory numbers specified by the 
;subscriber. Unaccepted callers may receive an announcement or be routed to a predetermined directory number.
;--------------------------------------------------------------------------------------------------------------------------------
exten => *64,1,Answer
exten => *64,n,Wait(1)
exten => *64,n,Macro(user-callerid)
exten => *64,n,Set(DB(SCA/${CALLERID(number)})=ENABLED)
exten => *64,n,Playback(selective-call-accept&activated)
exten => *64,n,Macro(hangupcall)
exten => _*64.,1,Macro(user-callerid)
exten => _*64.,n,Set(DB(SCA/${CALLERID(number)})=${EXTEN:3})
exten => _*64.,n,Answer
exten => _*64.,n,Wait(1)
exten => _*64.,n,Playback(selective-call-accept&for&extension)
exten => _*64.,n,SayDigits(${CALLERID(number)})
exten => _*64.,n,Playback(is-set-to)
exten => _*64.,n,SayDigits(${EXTEN:3})
exten => _*64.,n,Macro(hangupcall)
;
;--------------------------------------------------------------------------------------------------------------------------------
;Calling Number Delivery (*65 Activation, *85 Deactivation)
;Provides the subscriber with the directory number (DN) of the calling party during the ringing cycle.
;--------------------------------------------------------------------------------------------------------------------------------
exten => *65,1,Macro(user-callerid)
exten => *65,n,Set(DB(CIDB/${CALLERIDNUM}=YES)
exten => *65,n,Answer
exten => *65,n,Wait()
exten => *65,n,Playback(caller-id-blk&activated)
exten => *65,n,Macro(hangupcall)
;
;--------------------------------------------------------------------------------------------------------------------------------
;Automatic Callback (*66 Activation,)
;Allows a subscriber to automatically place a call to the last station called by the subscriber when that station becomes idle.
;--------------------------------------------------------------------------------------------------------------------------------
;
;--------------------------------------------------------------------------------------------------------------------------------
;Calling Number Delivery Blocking (*67)
;Allows the subscriber to temporarily change the permanent public/private status indicator of his/her directory number (DN) and 
;thus control its availability to the called party.
;--------------------------------------------------------------------------------------------------------------------------------
exten => *67,1,Answer
exten => *67,n,Wait(1)
exten => *67,n,Macro(user-callerid) 
exten => *67,1,Set(DB(CIDB/${CALLERIDNUM}=YES)
exten => *67,n,Answer
exten => *67,n,Wait(1)
exten => *67,n,Playback(caller-ib-blockin&activated)
exten => *67,n,Macro(hangupcall,)
;
;---------------------------------------------------------------------------------------------------------------------------------
;Call Forwarding Busy Line/Don't Answer (*68 Activation)
;Allows a subscriber to forward calls intended for the subscriber's busy line, or idle line after a predetermined number of rings, 
;to another directory number entered by the subscriber at the time of activation.
;---------------------------------------------------------------------------------------------------------------------------------
exten => *68,1,Answer
exten => *68,n,Wait(1)
exten => *68,n,Playback(call-fwd-on-busy&please-enter-your&extension)
exten => *68,n,Read(fromext,then-press-pound,,)
exten => *68,n,Set(fromext=$/{IF($["foo${fromext}"="foo"]?${CALLERID(number)}:${fromext})})
exten => *68,n,Wait(1)
exten => *68,n(startread),Playback(ent-target-attendant)
exten => *68,n,Read(toext,then-press-pound,,)
exten => *68,n,GotoIf($["foo${toext}"="foo"]?startread)
exten => *68,n,Wait(1)
exten => *68,n,Set(DB(CFBDA${fromext})=${toext})
exten => *68,n,Playback(call-fwd-on-busy&for&extension)
exten => *68,n,SayDigits(${fromext})
exten => *68,n,Playback(is-set-to)
exten => *68,n,SayDigits(${toext})
exten => *68,n,Macro(hangupcall,)
exten => _*68.,1,Answer
exten => _*68.,n,Wait(1)
exten => _*68.,n,Macro(user-callerid,)
exten => _*68.,n,Set(DB(CFBDA/${CALLERID(number)})=${EXTEN:3})
exten => _*68.,n,Playback(call-fwd-on-busy&for&extension)
exten => _*68.,n,SayDigits(${CALLERID(number)})
exten => _*68.,n,Playback(is-set-to)
exten => _*68.,n,SayDigits(${EXTEN:3})
exten => _*68.,n,Macro(hangupcall,)
;
;--------------------------------------------------------------------------------------------------------------------------------
;Automatic Recall (*69 Activation)
;Allows a subscriber to automatically place a call to the last station that called the subscriber, when that station becomes idle.
;--------------------------------------------------------------------------------------------------------------------------------
exten => *69,1,Macro(user-callerid,)
exten => *69,n,Answer
exten => *69,n,Wait(1)
exten => *69,n,Playback(info-about-last-call&telephone-number)
exten => *69,n,Set(lastcaller=${DB(CALLTRACE/${CALLERID(number)})})
exten => *69,n,GotoIf($[ $[ "${lastcaller}" = "" ] | $[ "${lastcaller}" = "unknown" ] ]?noinfo)
exten => *69,n,SayDigits(${lastcaller})
exten => *69,n,Set(TIMEOUT(digit)=3)
exten => *69,n,Set(TIMEOUT(response)=7)
exten => *69,n,Background(to-call-this-number&press-1)
exten => *69,n,Goto(fin)
exten => *69,n(noinfo),Playback(from-unknown-caller&unidentified-no-callback)
exten => *69,n,Macro(hangupcall,)
exten => *69,n(fin),Noop(Waiting for input)
exten => 1,1,Goto(from-internal,${lastcaller},1)
exten => i,1,Playback(vm-goodbye)
exten => i,n,Macro(hangupcall,)
exten => t,1,Playback(vm-goodbye)
exten => t,n,Macro(hangupcall,)
;
;--------------------------------------------------------------------------------------------------------------------------------
;Cancel Call Waiting (*70)
;Provides the subscriber the ability to enable the Call Waiting feature for the duration of a telephone call.
;--------------------------------------------------------------------------------------------------------------------------------
exten => *70,1,Answer
exten => *70,n,Wait(1)
exten => *70,n,Macro(user-callerid,)
exten => *70,n,Set(DB(CW/${CALLERID(number)})=ENABLED)
exten => *70,n,Playback(call-waiting&activated)
exten => *70,n,Macro(hangupcall,)
;
;--------------------------------------------------------------------------------------------------------------------------------
;Cancel Call Waiting (*71)
;Provides the subscriber the ability to disable the Call Waiting feature for the duration of a telephone call.
;--------------------------------------------------------------------------------------------------------------------------------
exten => *71,1,Answer
exten => *71,n,Wait(1)
exten => *71,n,Macro(user-callerid,)
exten => *71,n,dbDel(CW/${CALLERID(number)})
exten => *71,n,Playback(call-waiting&de-activated)
exten => *71,n,Macro(hangupcall,)
;
;--------------------------------------------------------------------------------------------------------------------------------
;Call Forwarding (*72 Activation)
;Allows a subscriber to redirect calls intended for his/her station (base station) to another station (remote station).
;--------------------------------------------------------------------------------------------------------------------------------
exten => *72,1,Answer
exten => *72,n,Wait(1)
exten => *72,n,Playback(call-fwd-unconditional)
exten => *72,n,Playback(please-enter-your&extension)
exten => *72,n,Read(fromext,then-press-pound,,)
exten => *72,n,Set(fromext=${IF($["foo${fromext}"="foo"]?${CALLERID(number)}:${fromext})})
exten => *72,n,Wait(1)
exten => *72,n(startread),Playback(ent-target-attendant)
exten => *72,n,Read(toext,then-press-pound,,)
exten => *72,n,GotoIf($["foo${toext}"="foo"]?startread)
exten => *72,n,Wait(1)
exten => *72,n,Set(DB(CF/${fromext})=${toext})
exten => *72,n,Playback(call-fwd-unconditional&for&extension)
exten => *72,n,SayDigits(${fromext})
exten => *72,n,Playback(is-set-to)
exten => *72,n,SayDigits(${toext})
exten => *72,n,Macro(hangupcall,)
exten => _*72.,1,Answer
exten => _*72.,n,Wait(1)
exten => _*72.,n,Macro(user-callerid,)
exten => _*72.,n,Set(DB(CF/${CALLERID(number)})=${EXTEN:3})
exten => _*72.,n,Playback(call-fwd-unconditional&for&extension)
exten => _*72.,n,SayDigits(${CALLERID(number)})
exten => _*72.,n,Playback(is-set-to)
exten => _*72.,n,SayDigits(${EXTEN:3})
exten => _*72.,n,Macro(hangupcall,)
;
;--------------------------------------------------------------------------------------------------------------------------------
;Call Forwarding (*73 Deactivation)
;Allows a subscriber to redirect calls intended for his/her station (base station) to another station (remote station).
;--------------------------------------------------------------------------------------------------------------------------------
exten => *73,1,Answer
exten => *73,n,Wait(1)
exten => *73,n,Macro(user-callerid,)
exten => *73,n,dbDel(CF/${CALLERID(number)})
exten => *73,n,Playback(call-fwd-unconditional&de-activated)
exten => *73,n,Macro(hangupcall,)
exten => _*73,1,Answer
exten => _*73,n,Wait(1)
exten => _*73,n,Set(fromext=${EXTEN:3})
exten => _*73,n,dbDel(CF/${fromext})
exten => _*73,n,Playback(call-fwd-unconditional&for&extension)
exten => _*73,n,SayDigits(${fromext})
exten => _*73,n,Playback(cancelled)
exten => _*73,n,Macro(hangupcall,)
;
exten => **73,1,Answer
exten => **73,n,Wait(1)
exten => **73,n,Playback(please-enter-your&extension)
exten => **73,n,Read(fromext,then-press-pound,,)
exten => **73,n,Wait(1)
exten => **73,n,dbDel(CF/${fromext})
exten => **73,n,Playback(call-fwd-unconditional&for&extension)
exten => **73,n,SayDigits(${fromext})
exten => **73,n,Playback(cancelled)
exten => **73,n,Macro(hangupcall,)
;
;--------------------------------------------------------------------------------------------------------------------------------
;Speed Calling (*74 Speed Calling 8-Change List)
;Allows a subscriber to assign his/her own speed calling codes directly and immediately from his/her own telephone by dialing 
;a change speed calling list access code, an abbreviated code, and a new telephone number.
;--------------------------------------------------------------------------------------------------------------------------------
;
;--------------------------------------------------------------------------------------------------------------------------------
;Speed Calling (*75 Speed Calling 30-Change List)
;Allows a subscriber to assign his/her own speed calling codes directly and immediately from his/her own telephone by dialing
;a change speed calling list access code, an abbreviated code, and a new telephone number.
;--------------------------------------------------------------------------------------------------------------------------------
;
;--------------------------------------------------------------------------------------------------------------------------------
;Advanced Call Waiting Deluxe (*76)
;Allows a subscriber to specify, in advance of incoming calls, the termination treatment on incoming calls that arrive while
;the subscriber is engaged in another conversation.
;--------------------------------------------------------------------------------------------------------------------------------
exten => *76,1,Answer
exten => *76,n,Wait(1)
exten => *76,n,Macro(user-callerid)
exten => *76,n,DBdel(ACW/${CALLERID(number)})
exten => *76,n,Playback(selective-call-waiting)
exten => *76,n,Playback(de-activated)
exten => *76,n,Macro(hangupcall)
exten => **76,1,Answer
exten => **76,n,Wait(1)
exten => **76,n,Playback(please-enter-your&extension)
exten => **76,n,Read(fromext,then-press-pound,,)
exten => **76,n,Wait(1)
exten => **76,n,dbDel(ACW/${fromext})
exten => **76,n,Playback(selective-call-waiting&for&extension)
exten => **76,n,SayDigits(${fromext})
exten => **76,n,Playback(cancelled)
exten => **76,n,Macro(hangupcall,)
;
;--------------------------------------------------------------------------------------------------------------------------------
;Anonymous Call Rejection (*77 Activation)
;Allows Customers to reject calls from parties who have a privacy feature that prevents the delivery of their calling 
;number to the called party.
;--------------------------------------------------------------------------------------------------------------------------------
exten => *77,1,Answer
exten => *77,n,Wait(1)
exten => *77,n,Macro(user-callerid)
exten => *77,n,Set(DB(ACR/${CALLERIDNUM}=>YES)
exten => *77,n,Playback(anon-call-rej&activated)
exten => *77.,n,Macro(hangupcall)
;
;--------------------------------------------------------------------------------------------------------------------------------
;Do Not Disturb (*78 Activation)
;Provides the subscriber the opportunity of having all calls intercepted by the CO switch whenever the line is programmed 
;for Do Not Disturb. The calling party will receive a message indicating the station is in Do Not Disturb condition.
;--------------------------------------------------------------------------------------------------------------------------------
exten => *78,1,Answer
exten => *78,n,Wait(1)
exten => *78,n,Macro(user-callerid,)
exten => *78,n,Set(DB(DND/${CALLERIDNUM})=YES)})
exten => *78,n,Playback(do-not-disturb&activated)
exten => _*82.,n,Macro(hangupcall)
;
;--------------------------------------------------------------------------------------------------------------------------------
;Do Not Disturb (*79 Deactivation)
;Provides the subscriber the opportunity of having all calls intercepted by the CO switch whenever the line is programmed for 
;Do Not Disturb. The calling party will receive a message indicating the station is in Do Not Disturb condition.
;--------------------------------------------------------------------------------------------------------------------------------
exten => *79,1,Answer
exten => *79,n,Wait(1)
exten => *79,n,Macro(user-callerid,)
exten => *79,n,DBdel(DND/${CALLERIDNUM})
exten => *79,n,Playback(do-not-disturb&de-activated)
exten => *79,n,Macro(hangupcall)
;
;--------------------------------------------------------------------------------------------------------------------------------
;Selective Call Rejection (*80 Deactivation)
;Allows the subscriber to have incoming calls from a limited number of calling parties rejected by the terminating switching system.
;--------------------------------------------------------------------------------------------------------------------------------
exten => _*80.,1,Answer
exten => _*80.,n,Wait(1)
exten => _*80.,n,Macro(user-callerid)
exten => _*80.,n,DBdel(BLACKLIST/${CALLERID(number)})
exten => _*80.,n,Playback(blacklist-remove)
exten => _*80.,n,Macro(hangupcall)
;
;--------------------------------------------------------------------------------------------------------------------------------
;Distinctive Ringing/Call Waiting (*81 Deactivation)
;Allows the subscriber to have incoming calls from a limited number of calling parties identified using distinctive alerting treatment.
;--------------------------------------------------------------------------------------------------------------------------------
;
;--------------------------------------------------------------------------------------------------------------------------------
;Line Blocking Deactivation (*82 Deactivation)
;Line Blocking Deactivation allows a caller to dial a delivery feature access code before dialing a complete telephone number to 
;temporarily override the presentation status of both the caller's directory number and the calling name. If the caller enters the 
;delivery code, then the calling identity presentation status will be shown as "public" for both caller directory number and 
;calling name.
;--------------------------------------------------------------------------------------------------------------------------------
;
;--------------------------------------------------------------------------------------------------------------------------------
;Selective Call Forwarding (*83 Deactivation)
;Allows the subscriber to have incoming calls from a limited number of calling parties forwarded to a prespecified remote station.
;--------------------------------------------------------------------------------------------------------------------------------
exten => *83,1,Answer
exten => *83,n,Wait(1)
exten => *83,n,DBdel(SCF/${CALLERIDNUM})
exten => *83,n,Playback(selective-call-fwd)
exten => *83,n,Wait(1)
exten => *83,n,Playback(deactivated)
exten => *83.,n,Macro(hangupcall)
;
;--------------------------------------------------------------------------------------------------------------------------------
;Selective Call Acceptance (*84 Deactivation)
;Provides the subscriber the ability to block calls from all but a predetermined list of directory numbers specified by the 
;subscriber. Unaccepted callers may receive an announcement or be routed to a predetermined directory number.
;--------------------------------------------------------------------------------------------------------------------------------
exten => *84,1,Answer
exten => *84,n,Wait(1)
exten => *84,n,Macro(user-callerid)
exten => *84,n,DBdel(SCA/${CALLERID(number)})
exten => *84,n,Playback(selective-call-accept)
exten => *84,n,Playback(de-activated)
exten => *84,n,Macro(hangupcall)
exten => **84,1,Answer
exten => **84,n,Wait(1)
exten => **84,n,Playback(please-enter-your&extension)
exten => **84,n,Read(fromext,then-press-pound,,)
exten => **84,n,Wait(1)
exten => **84,n,dbDel(SCA/${fromext})
exten => **84,n,Playback(selective-call-accept&for&extension)
exten => **84,n,SayDigits(${fromext})
exten => **84,n,Playback(cancelled)
exten => **84,n,Macro(hangupcall,)
;
;--------------------------------------------------------------------------------------------------------------------------------
;Calling Number Delivery (*85 Deactivation)
;Provides the subscriber with the directory number (DN) of the calling party during the ringing cycle.
;--------------------------------------------------------------------------------------------------------------------------------
exten => *85,1,Answer
exten => *85,n,Wait(1)
exten => *85,n,Macro(user-callerid)
exten => *85,1,DBdel(CIDB/${CALLERIDNUM})
exten => *85,n,Answer
exten => *85,n,Wait(1)
exten => *85,n,Playback(caller-id-blocking&de-activated)
exten => *85,n,Hangup
;
;--------------------------------------------------------------------------------------------------------------------------------
;Automatic Callback (*86 Deactivation)
;Allows a subscriber to automatically place a call to the last station called by the subscriber when that station becomes idle.
;--------------------------------------------------------------------------------------------------------------------------------
;
;--------------------------------------------------------------------------------------------------------------------------------
;Anonymous Call Rejection (*87 Deactivation)
;Allows Customers to reject calls from parties who have a privacy feature that prevents the delivery of their calling number 
;to the called party.
;--------------------------------------------------------------------------------------------------------------------------------
exten => *87,1,Answer
exten => *87,n,Wait(1)
exten => *87,n,Macro(user-callerid)
exten => *87,n,DBdel(ACR/${CALLERIDNUM})
exten => *87,n,Playback(anon-call-rej)
exten => *87,n,Playback(deactivated)
exten => *87,n,Hangup
;
;--------------------------------------------------------------------------------------------------------------------------------
;Call Forwarding Busy Line/Don't Answer (*88 Deactivation)
;Allows a subscriber to forward calls intended for the subscriber's busy line, or idle line after a predetermined number of rings, 
;to another directory number entered by the subscriber at the time of activation.
;--------------------------------------------------------------------------------------------------------------------------------
exten => *88,1,Answer
exten => *88,n,Wait(1)
exten => *88,n,Macro(user-callerid,)
exten => *88,n,dbDel(CFBDA/${CALLERID(number)})
exten => *88,n,Playback(call-fwd-on-busy&de-activated)
exten => *88,n,Macro(hangupcall,)
exten => _*88.,1,Answer
exten => _*88.,n,Wait(1)
exten => _*88.,n,Set(fromext=${EXTEN:3})
exten => _*88.,n,dbDel(CFB/${fromext})
exten => _*88.,n,Playback(call-fwd-on-busy&for&extension)
exten => _*88.,n,SayDigits(${fromext})
exten => _*88.,n,Playback(cancelled)
exten => _*88.,n,Macro(hangupcall,)
exten => **88,1,Answer
exten => **88,n,Wait(1)
exten => **88,n,Playback(please-enter-your&extension)
exten => **88,n,Read(fromext,then-press-pound,,)
exten => **88,n,Wait(1)
exten => **88,n,dbDel(CFBDA/${fromext})
exten => **88,n,Playback(call-fwd-on-busy&for&extension)
exten => **88,n,SayDigits(${fromext})
exten => **88,n,Playback(cancelled)
exten => **88,n,Macro(hangupcall,)
;
;--------------------------------------------------------------------------------------------------------------------------------
;Automatic Recall (*89 Deactivation)
;Allows a subscriber to automatically place a call to the last station that called the subscriber, when that station becomes idle.
;--------------------------------------------------------------------------------------------------------------------------------
;
;--------------------------------------------------------------------------------------------------------------------------------
;Customer Programmable Call Forwarding Busy Line (*90 Activation, *91 Deactivation)
;Allows subscriber of the feature to forward calls intended for the subscriber's busy line to another directory number entered 
;by the subscriber at the time of activation. Deactivation will clear the forwarded-to directory number.
;--------------------------------------------------------------------------------------------------------------------------------
exten => *90,1,Answer
exten => *90,n,Wait(1)
exten => *90,n,Playback(call-fwd-on-busy)
exten => *90,n,Playback(please-enter-your&extension)
exten => *90,n,Read(fromext,then-press-pound,,)
exten => *90,n,Set(fromext=$/{IF($["foo${fromext}"="foo"]?${CALLERID(number)}:${fromext})})
exten => *90,n,Wait(1)
exten => *90,n,(startread),Playback(ent-target-attendant)
exten => *90,n,Read(toext,then-press-pound,,)
exten => *90,n,GotoIf($["foo${toext}"="foo"]?startread)
exten => *90,n,Wait(1)
exten => *90,n,Set(DB(CPCFB/${fromext})=${toext})
exten => *90,n,Playback(call-fwd-on-busy&for&extension)
exten => *90,n,SayDigits(${fromext})
exten => *90,n,Playback(is-set-to)
exten => *90,n,SayDigits(${toext})
exten => *90,n,Macro(hangupcall,)
exten => _*90.,1,Answer
exten => _*90.,n,Wait(1)
exten => _*90.,n,Macro(user-callerid,)
exten => _*90.,n,Set(DB(CPCFB/${CALLERID(number)})=${EXTEN:3})
exten => _*90.,n,Playback(call-fwd-on-busy&for&extension)
exten => _*90.,n,SayDigits(${CALLERID(number)})
exten => _*90.,n,Playback(is-set-to)
exten => _*90.,n,SayDigits(${EXTEN:3})
exten => _*90.,n,Macro(hangupcall,)
;
;--------------------------------------------------------------------------------------------------------------------------------
;Customer Programmable Call Forwarding Busy Line (*90 Activation, *91 Deactivation)
;Allows subscriber of the feature to forward calls intended for the subscriber's busy line to another directory number entered 
;by the subscriber at the time of activation. Deactivation will clear the forwarded-to directory number.
;--------------------------------------------------------------------------------------------------------------------------------
exten => *91,1,Answer
exten => *91,n,Wait(1)
exten => *91,n,Macro(user-callerid,)
exten => *91,n,dbDel(CPCFB/${CALLERID(number)})
exten => *91,n,Playback(call-fwd-on-busy&de-activated)
exten => *91,n,Macro(hangupcall,)
exten => _*91.,1,Answer
exten => _*91.,n,Wait(1)
exten => _*91.,n,Set(fromext=${EXTEN:3})
exten => _*91.,n,dbDel(CPCFB/${fromext})
exten => _*91.,n,Playback(cust-call-fwd-on-busy&for&extension)
exten => _*91.,n,SayDigits(${fromext})
exten => _*91.,n,Playback(cancelled)
exten => _*91.,n,Macro(hangupcall,)
exten => **91,1,Answer
exten => **91,n,Wait(1)
exten => **91,n,Playback(please-enter-your&extension)
exten => **91,n,Read(fromext,then-press-pound,,)
exten => **91,n,Wait(1)
exten => **91,n,dbDel(CPCFB/${fromext})
exten => **91,n,Playback(cust-call-fwd-on-busy&for&extension)
exten => **91,n,SayDigits(${fromext})
exten => **91,n,Playback(cancelled)
exten => **91,n,Macro(hangupcall,)
;
;--------------------------------------------------------------------------------------------------------------------------------
;Customer Programmable Call Forwarding Don't Answer (*92 Activation)
;Allows subscriber of the feature to forward calls intended for the subscriber's idle line, after a predetermined number of rings,
;to another directory number entered by the subscriber at the time of activation. Deactivation will clear the forwarded-to directory number.
;--------------------------------------------------------------------------------------------------------------------------------
exten => *92,1,Answer
exten => *92,n,Wait(1)
exten => *92,n,Playback(cust-pro-call-fwd-no-ans)
exten => *92,n,Playback(please-enter-your&extension)
exten => *92,n,Read(fromext,then-press-pound,,)
exten => *92,n,Set(fromext=$/{IF($["foo${fromext}"="foo"]?${CALLERID(number)}:${fromext})})
exten => *92,n,Wait(1)
exten => *92,n(startread),Playback(ent-target-attendant)
exten => *92,n,Read(toext,then-press-pound,,)
exten => *92,n,GotoIf($["foo${toext}"="foo"]?startread)
exten => *92,n,Wait(1)
exten => *92,n,Set(DB(CPCFN/${fromext})=${toext})
exten => *92,n,Playback(call-fwd-no-ans&for&extension)
exten => *92,n,SayDigits(${fromext})
exten => *92,n,Playback(is-set-to)
exten => *92,n,SayDigits(${toext})
exten => *92,n,Macro(hangupcall,)
exten => _*92.,1,Answer
exten => _*92.,n,Wait(1)
exten => _*92.,n,Macro(user-callerid,)
exten => _*92.,n,Set(DB(CPCFNA/${CALLERID(number)})=${EXTEN:3})
exten => _*92.,n,Playback(call-fwd-no-ans&for&extension)
exten => _*92.,n,SayDigits(${CALLERID(number)})
exten => _*92.,n,Playback(is-set-to)
exten => _*92.,n,SayDigits(${EXTEN:3})
exten => _*92.,n,Macro(hangupcall,)
;
;--------------------------------------------------------------------------------------------------------------------------------
;Customer Programmable Call Forwarding Don't Answer (*93 Deactivation)
;Allows subscriber of the feature to forward calls intended for the subscriber's idle line, after a predetermined number of rings, 
;to another directory number entered by the subscriber at the time of activation. Deactivation will clear the forwarded-to directory number.
;--------------------------------------------------------------------------------------------------------------------------------
exten => *93,1,Answer
exten => *93,n,Wait(1)
exten => *93,n,Macro(user-callerid,)
exten => *93,n,dbDel(CPCFNA/${CALLERID(number)})
exten => *93,n,Playback(call-fwd-no-ans&de-activated)
exten => *93,n,Macro(hangupcall,)
exten => _*93.,1,Answer
exten => _*93.,n,Wait(1)
exten => _*93.,n,Set(fromext=${EXTEN:3})
exten => _*93.,n,dbDel(CPCFN/${fromext})
exten => _*93.,n,Playback(cust-pro-call-fwd-no-ans&for&extension)
exten => _*93.,n,SayDigits($/{fromext/})
exten => _*93.,n,Playback(cancelled)
exten => _*93.,n,Macro(hangupcall,)
exten => **93,1,Answer
exten => **93,n,Wait(1)
exten => **93,n,Playback(please-enter-your&extension)
exten => **93,n,Read(fromext,then-press-pound,,)
exten => **93,n,Wait(1)
exten => **93,n,dbDel(CPCFNA/${fromext})
exten => **93,n,Playback(cust-pro-call-fwd-unconditional&for&extension)
exten => **93,n,SayDigits(${fromext})
exten => **93,n,Playback(cancelled)
exten => **93,n,Macro(hangupcall,)
;
;-------------------------------------------------------------------------------
; *95 - Disable VoiceMail on a Line
;-------------------------------------------------------------------------------
;[vm-disable]
exten => *95,1,Answer
exten => *95,n,DBdel(VM/${CALLERIDNUM})
exten => *95,n,Wait(1)
exten => *95,n,Playback(deactivated)
exten => *95,n,Macro(hangupcall)
;
;-------------------------------------------------------------------------------
; *96 -  Enable VoiceMail on a Line
;-------------------------------------------------------------------------------
;[vm-enable]
exten => *96,1,Answer
exten => *96,n,Set(DB(VM/${CALLERIDNUM})=YES)
exten => *96,n,Wait(.5)
exten => *96,n,Playback(activated)
exten => *96,n,Macro(hangupcall)
;
;-------------------------------------------------------------------------------
; *97 - *98 Voicemail Checking / Retriving
;-------------------------------------------------------------------------------
;[voicemail]
;voice mailman Promts for mailbox nmbr and password
exten => *97,1,VoicemailMain
exten => *97,n,Macro(hangupcall)
;
;;voice mailman with exten/callerid checking. if callerid/exten match 
;prompts for password eslse prompts for mailbox/password
exten => *98,1,VoicemailMain(${CALLERIDNUM})
exten => *98,n,Macro(hangupcall)
;
;[messagecenter]
;exten => *97,1,Answer
;exten => *97,2,Wait(1)
;exten => *97,3,VoiceMailMain(default)
;exten => *97,4,Macro(Macro(hangupcall)call)
;exten => _*97X.,1,Answer			; can dial *98<exten> to skip 'mailbox' prompt.  Useful for speedial.
;exten => _*97X.,2,Wait(1)
;exten => _*97X.,3,VoiceMailMain(${EXTEN:3}@default)
;exten => _*97X.,4,Macro(Macro(hangupcall)call)
;exten => *98,1,Answer
;exten => *98,2,Wait(1)
;exten => *98,3,Macro(user-callerid)
;exten => *98,4,VoicemailMain(${CALLERIDNUM}@default)
;exten => *98,5,Macro(hangupcall)
;
;------------------------------------------------------------------
; **99 -Login and wait for calls while offhook  When calls arrive,
; You will hear a beeping tone and the caller will join automatically
;------------------------------------------------------------------
;[offhook]
exten => **99,1,Answer
exten => **99,n,SetMusicOnHold(default)
exten => **99,n,Wait,1
exten => **99,n,AgentLogin
;
;---------------------------------------------------------
; */#100 - */#199 -Queue Agents Login
; Turn on=*1xx  Turn off=#1xx
;----------------------------------------------------------
;[agentlogin]
exten => *100,1,AddQueueMember(sales|SIP/${CALLERIDNUM})
exten => *100,n,Playback(agent-loginok)
exten => *100,n,Hangup
exten => #100,1,RemoveQueueMember(sales|SIP/${CALLERIDNUM})
exten => #100,n,Playback(agent-loggedoff)
exten => #100,n,Hangup
;
exten => *101,1,AddQueueMember(billing|SIP/${CALLERIDNUM})
exten => *101,n,Playback(agent-loginok)
exten => *101,n,Hangup
exten => #101,1,RemoveQueueMember(billing|SIP/${CALLERIDNUM})
exten => #101,n,Playback(agent-loggedoff)
exten => #101,n,Hangup
;
exten => *102,1,AddQueueMember(techsupport|SIP/${CALLERIDNUM})
exten => *102,n,Playback(agent-loginok)
exten => *102,n,Hangup
exten => #102,1,RemoveQueueMember(techsupport|SIP/${CALLERIDNUM})
exten => #102,n,Playback(agent-loggedoff)
exten => #102,n,Hangup
;
exten => *103,1,AddQueueMember(techsupport-611|SIP/${CALLERIDNUM})
exten => *103,n,Playback(agent-loginok)
exten => *103,n,Hangup
exten => #103,1,RemoveQueueMember(techsupport-611|SIP/${CALLERIDNUM})
exten => #103,n,Playback(agent-loggedoff)
exten => #103,n,Hangup
;
;---------------------------------------------------
; *200 - *203 Basic Call Queue's 200-203
;---------------------------------------------------
;[queues]
exten => *200,1,Answer
exten => *200,n,Queue(sale|TtH)
exten => *200,n,WaitMusicOnHold(45)
exten => *200,n,Voicemail(u200)
exten => *200,n,Playback(vm-goodbye)
exten => *200,n,Hangup
;
exten => *201,1,Answer
exten => *201,n,Queue(billing|TtH)
exten => *201,n,WaitMusicOnHold(45)
exten => *201,n,Voicemail(u201)
exten => *201,n,Playback(vm-goodbye)
exten => *201,n,Hangup
;
exten => *202,1,Answer
exten => *202,n,Queue(techsupport|TtH)
exten => *202,n,WaitMusicOnHold(45)
exten => *202,n,Voicemail(u202)
exten => *202,n,Playback(vm-goodbye)
exten => *202,n,Hangup
;
exten => *203,1,Answer
exten => *203,n,Queue(techsupport-611|TtH)
exten => *203,n,WaitMusicOnHold(45)
exten => *203,n,Voicemail(u202)
exten => *203,n,Playback(vm-goodbye)
exten => *203,n,Hangup
;
;--------------------------------------------------------
;211 Community Information and Referral Services 
; Available for Reassignment
;--------------------------------------------------------
;[211]
exten => 211,1,Macro(user-callerid,)
exten => 211,n,Playback(ss-noservice)
exten => 211,n,Congestion
exten => 211,n,Macro(hangupcall)
;
;-------------------------------------------
;311 - non-emerg not yet setup for Non Emerg
;-------------------------------------------
[311]
exten => 311,1,Macro(user-callerid,)
;exten => 311,n,Dial(LOCAL/local non emergancy nmbr here)
;exten => 311,n,Congestion
exten => 311,n,Playback(ss-noservice)
exten => 311,n,Congestion
exten => 311,n,Macro(hangupcall)
;
;---------------------------
; 411 - Information services
;---------------------------
;[411]
;exten => 411,1,Macro(user-callerid,)
;exten => 411,n,Dial(Local/SIP/ZAP/IAX2/411,30,r)
;exten => 411,n,Congestion
;exten => 411,n,Playback(ss-noservice)
;exten => 411,n,Macro(hangupcall)
;
exten => *411,1,Answer
exten => *411,n,Wait(1)
exten => *411,n,Goto(pbdirectory,1)
exten => pbdirectory,1,AGI(pbdirectory)
exten => pbdirectory,n,GotoIf($["${dialnumber}"=""]?hangup,1)
exten => pbdirectory,n,Noop(Got number to dial: ${dialnumber})
exten => pbdirectory,n,Dial(Local/${dialnumber}@from-internal/n,)
exten => hangup,1,Hangup
;
exten => #,1,Answer
exten => #,n,Wait(1)
exten => #,n,AGI(directory,${DIR-CONTEXT},from-did-direct,${DIRECTORY:0:1}${DIRECTORY_OPTS})
exten => #,n,Playback(vm-goodbye)
exten => #,n,Hangup
exten => i,1,Playback(privacy-incorrect)
;
;---------------------------------------------------------------------------
;511 Traffic and Transportation Information (US); Available for Reassignment
;---------------------------------------------------------------------------
;[511]
exten => 511,1,Macro(user-callerid,)
exten => 511,n,Answer
exten => 511,n,Playback(ss-noservice)
exten => 511,n,Macro(hangupcall)
;
;-------------------------------------
; 611 - [Repair Service / TechSupport]
;-------------------------------------
;[611]
exten => 611,1,Macro(user-callerid)
exten => 611,n,Answer
exten => 611,n,GotoIfTime(*|*|1|jan?611|HOLIDAY1)
exten => 611,n,GotoIfTime(*|*|4|jul?611|HOLIDAY2)
exten => 611,n,GotoIfTime(*|*|11|nov?611|HOLIDAY3)
exten => 611,n,GotoIfTime(*|*|22|nov?611|HOLIDAY4)
exten => 611,n,GotoIfTime(*|*|25|dec?611|HOLIDAY5)
exten => 611,n,Goto(611,START)
exten => 611,n(HOLIDAY1),Playback(office-closed&newyears)
exten => 611,n,Goto(611,HOURS))
exten => 611,n(HOLIDAY2),Playback(office-closed&4th-july)
exten => 611,n,Goto(611,HOURS))
exten => 611,n(HOLIDAY3),Playback(office-closed&vetrans)
exten => 611,n,Goto(611,HOURS)
exten => 611,n(HOLIDAY4),Playback(office-closed&thanksgiving)
exten => 611,n,Goto(611,HOURS)
exten => 611,n(HOLIDAY5),Playback(office-closed&x-mas)
exten => 611,n(HOURS),Playback(office-hours&vm-goodbye))
exten => 611,n,Macro(hangupcall))
exten => 611,n(CLOSED),Playback(office-closed&our-business-hours-are&office-hours)
exten => 611,n,Voicemail(u611)
exten => 611,n,Macro(hangupcall)
exten => 611,n(START),GotoIfTime(22:00-08:00|*|*|*?611|CLOSED)
exten => 611,n,Set(TIMEOUT(digit)=7)
exten => 611,n,Set(TIMEOUT(response)=10)
exten => 611,n,SayDigits(611)
exten => 611,n,Playback(repair&and&technical-support&for-quality-purposes&this-call-may-be&recorded)
exten => 611,n(ID),Playback(pls-enter-your-acct-nbr)
exten => 611,n,Read(acct,then-press-pound,)
exten => 611,n,SayDigits(${acct})
exten => 611,n,Background(if-correct-press)
exten => 611,n,SayDigits(1)
exten => 611,n,Background(if-incorrect-press)
exten => 611,n,SayDigits(2)
exten => 611,n,Read(res,then-press-pound,)
exten => 611,n,GotoIf($["${res}"="1"]?ACCT:ID)
exten => 611,n(ACCT),Set(CALLERID(name)=${CALLERIDNAME})
exten => 611,n,Set(CALLERID(number)=${acct})
exten => 611,n,Set(MONITOR_FILENAME=/var/spool/asterisk/monitor/q${EXTEN}-${TIMESTAMP}-${UNIQUEID})
exten => 611,n,SetMusicOnHold(default)
exten => 611,n,GotoIfTime(08:00-17:00|mon-fri|*|*?611|DAY)
exten => 611,n,GotoIfTime(17:00-22:00|mon-fri|*|*?611|NIGHT)
exten => 611,n,GotoIfTime(09:00-13:00|sat|*|*?611|NIGHT)
exten => 611,n,Goto(611,closed)
exten => 611,n(DAY),Queue(techsupport|t|||300)
exten => 611,n(VM),Voicemail(u611)
exten => 611,n,Macro(hangupcall)
exten => 611,n(NIGHT),Queue(techsuppoert-611|t|||300)
exten => 611,n,Goto(611,VM)
;
;----------------------------------------------------------------------------------------
;711 is the national number to access relay services from anywhere in the United States. 
;Dial 711 to be connected with a Relay Colorado operator.
;----------------------------------------------------------------------------------------
; 711 - [State Relay TTY/TDD/Voice Service]
;------------------------------------------
exten => 711,1,Macro(user-callerid,)
;exten => 711,n,Dial(SIP/711)
;exten => 711,n,Congestion
exten => 711,n,Playback(ss-noservice)
exten => 711,n,Congestion
exten => 711,n,Macro(hangupcall) 
;
;-----------------------------------------------------------------------------
;Access to One Call Services to Protect Pipeline and Utilities from Excavation
;Damage (US); Available for Reassignment
;-----------------------------------------------------------------------------
;811 - Reassigned to [Quick-dial TollFree Directory]
;---------------------------------------------------
exten => 811,1,Macro(user-callerid,)
exten => 811,n,Dial(SIP or IAX2/user@provider/8005551212,30,r)
exten => 811,n,Hangup
;
;---------------------------------------------
; 911 Emergancy
;---------------------------------------------
exten => 911,1,Macro(user-callerid,)
;exten => 911,n,Dial(SIP/${EXTEN})
;exten => 911,n,Congestion
exten => 911,n,Playback(no-911-1)
exten => 911,n,Congestion
exten => 911,n,Macro(hangupcall)