-- extensions.conf
[general]
static=yes
writeprotect=no
autofallthrough=no
clearglobalvars=no
priorityjumping=no
;
;
[globals]
;#############################################################
;Global Variables
;
; Hospitality specific functions / features
;
; Hospitality Features IP Address and Port number
; The AGI functions need to have access to the HFI
; communications port for the PMS interface. This
; data could reside in the database for the future, however
; at this point in time the ip addr and port reside here.
;
HFI_IPADDR=127.0.0.1
HFI_IPPORT=21592
;
;
; SIG_NIGHTMODE indicates if we are in night mode for the
; time being....0 - day, 1 - night... when asterisk restarts
; the system will default to the settings below.
;
SIG_NIGHTMODE=0
;
;
; SIG_ATTx indicates the primary day-time attendants
; The current configuration allows up to two attendants
; ATT1 must always be assigned, ATT2 can be blank or may
; contain an additional station number for an attendant;
;
SIG_ATT1=SIP/6000
SIG_ATT2=
;
;
; SIG_NTTATT indicates the primary night attendant. For
; the current configuration, the night attendant must
; be of the same phone type as the day attendants. An
; access code allows the night location to be redefined.
; NOTE that the NTATT always defaults to the value provided
; below upon asterisk restart.
; The Night attendant may be one of the day attendants. For
; example, the property may want the front desk and a back
; office telephone to ring during the day as the attendant.
; during the night, perhaps only the front desk telephone should
; ring, thus the night attendant will be set to the SIG_ATTx
; station that represents the front desk.
;
SIG_NTATT=SIP/6001
;
;
; Guest Callerid System Setting
; This global specifies how the system should present
; callerid information to guest phones for calls placed
; from guest context extensions.
; Examples of Callerid Info:
; GUEST_CALLERID=1 CALLERIDNAME="ROOM 100" CALLERIDNUMBER=7100
; GUEST_CALLERID=2 CALLERIDNAME="GUEST ROOM" CALLERIDNUMBER=UNKNOWN
; GUEST_CALLERID=3 CALLERIDNAME="PRIVATE" CALLERIDNUMBER=UNKNOWN
;
GUEST_CALLERID=1
;
;
; Guest Room to Room Blocking
; This global specifies if the pbx should allow guest rooms to call
; other guest rooms. This feature is programmed via an access code
; Values: 0, calls permitted; 1, calls diverted to voicemail
;
RMRM_BLOCKING=0
;
;
; Admin Do Not Disturb Override
; This flag allows admin stations to override DND settings for guest
; extensions by pressing * during call processing. The admin user is
; presented with the message "do not disturb is enabled, press * to
; override or press #". The * key will connect the user, any other key
; will redirect to voicemail.
; ADMIN_DND_OVERRIDE => 0-No override ability....straight to vm
; 1=Override ok
;
ADMIN_DND_OVERRIDE=0
;
;End of Global Variables
;#############################################################
;
;
; admin context macro for admin extensions
;
[macro-tl-stdexten-default]
exten => s,1,Set(DB_EXTEN=${ARG2})
exten => s,2,AGI(readCallerInfo)
exten => s,3,DBget(fwdexten=CF/${MACRO_EXTEN}/CFU)
exten => s,104,Goto(s|6)
exten => s,4,Setvar(fwdcontext=from-inside)
exten => s,5,Goto(${fwdcontext}|${fwdexten}|1)
exten => s,6,Dial(${ARG1},15,rtT)
exten => s,107,Goto(s|205)
exten => s,7,DBget(fwdexten=CF/${MACRO_EXTEN}/CFNA)
exten => s,108,Goto(s|10)
exten => s,8,Setvar(fwdcontext=from-inside)
exten => s,9,Goto(${fwdcontext}|${fwdexten}|1)
exten => s,10,Answer
exten => s,11,Voicemail(u${ARG2})
exten => s,12,Hangup
exten => s,205,DBget(fwdexten=CF/${MACRO_EXTEN}/CFB)
exten => s,306,Goto(s|208)
exten => s,206,Setvar(fwdcontext=from-inside)
exten => s,207,Goto(${fwdcontext}|${fwdexten}|1)
exten => s,208,Answer
exten => s,209,Voicemail(b${ARG2})
exten => s,210,Hangup
;
;
; Guest Extension Macro
;
; This macro builds the dialplan for guest extensions.
; Guest extensions use readDbInfo to determine checkin/out
; status as well as dont disturb and other features...
; Autowakeup calls also come to guest stations, these calls
; should bypass voicemail... The macro also takes into account
; the group ring capability, thus, a call to readCallDest will
; actually re-route the call to the various circuits within a
; room based upon busy status.
; A significant delay in call processing is realized in the
; readCallDest function, this will be cleared up in a future
; release.
;
;
[macro-tl-simple-standard]
exten => s,1,Set(DB_EXTEN=${ARG1})
exten => s,n,AGI(readDbInfo)
;
; check if autowakeup.. this call type
; should bypass dnd checks
;
exten => s,n,GotoIf($[ "${CALLERIDNAME}" : "Autowakeup" ]?noDnd:guestCheck)
;
; now check if call is from guest
;
exten => s,n(guestCheck),GotoIf($[ ${GUESTTOGUEST} = 1 ]?yesGuest:yesAdmin)
;
; is rmrm_blocking on for guest calls?
;
exten => s,n(yesGuest),GotoIf($[ ${RMRM_BLOCKING} = 1 ]?yesDnd:dndCheck)
;
; now check if the guest has dnd on
;
exten => s,n(dndCheck),GotoIf($[ ${DONOTDISTURB} = 1 ]?yesDnd:noDnd)
;
; if DND, send noanswer condition and
; go to voicemail. will need an admin
; check in next phase to allow admins to override
;
exten => s,n(yesDnd),Goto(s-NOANSWER,1)
;
; if we're an admin station, we want to
; alert the user to a possible dnd condition...to
; allow them to override.
;
; check flag ADMIN_DND_OVERRIDE to see if this
; site allows admin override.
;
exten => s,n(yesAdmin),GotoIf($[ ${ADMIN_DND_OVERRIDE} = 1 ]?allowOverride:dndCheck)
; now check the DND flag for the admin station
;
exten => s,n(allowOverride),GotoIf($[ ${DONOTDISTURB} = 1 ]?adminDnd:noDnd)
;
; allow the admin station to override..
;
exten => s,n(adminDnd),Playback(do-not-disturb)
exten => s,n,Playback(enabled)
exten => s,n,Playback(to-call-num-press)
exten => s,n,Playback(star)
exten => s,n,Playback(otherwise-press)
exten => s,n,Playback(pound)
exten => s,n,Read(NUMBER,,1,skip,1,2)
exten => s,n,GotoIf($[ "${NUMBER}" = "*" ]?noDnd:yesDnd)
;
; Otherwise, we should be able to ring the extension
; call readCallDest to determine who to ring
;
exten => s,n(noDnd),AGI(readCallDest)
exten => s,n,Noop(Calldest=${CALLDEST})
;
; if DESTSTATE = 1 we can allow the call and have
; a destination in CALLDEST
;
exten => s,n,GotoIf($[ ${DESTSTATE} = 1 ]?lineidle:linebusy)
;
; call the extension(s) from the ringing group tbl
;
exten => s,n(lineidle),Dial(${CALLDEST},20,rt)
;
; if we made it here, no answer, we need to be sure
; that autowakeup isn't the caller... no voice mail...
;
exten => s,n,GotoIf($[ "${CALLERIDNAME}" : "Autowakeup" ]?usenovms:vmok)
;
; not wakeup, so we can give vms support
;
exten => s,n(vmok),Goto(s-${DIALSTATUS},1) ; we dialed... handle exceptions
;
; if no ringing groups are available, give busy
;
exten => s,n(linebusy),Goto(s-BUSY,1) ; line is busy
;
; no vms system hangs up... autowake only....
exten => s,n(usenovms),Hangup
;
; busy condition for voicemail notification
;
exten => s-BUSY,1,Voicemail(b${ARG1})
exten => s-BUSY,2,Hangup
;
; no answer condition for voicemail
exten => s-NOANSWER,1,Voicemail(u${ARG1})
exten => s-NOANSWER,2,Hangup
;
; all other cases... go to no-answer case.
exten => _s-.,1,Goto(s-NOANSWER,1)
;
; END OF MACRO
[sigpro-dialout]
use=inbound,user,feature,outbound
friendlyname=sigpro dialout
description=
args=
body=
exten => _91NXXNXXXXXX,1,goto(outbound-long-distance-guest)
[local-admin-stations]
exten => 400,1,Dial(SIP/401a-1&SIP/402a-1,30,g)
exten => 400,2,Hangup
exten => 401,1,Dial(SIP/401a-1,30,g)
exten => 401,2,Hangup
exten => 402,1,Dial(SIP/402a-1,30,g)
exten => 402,2,Hangup
; Station 301; Music on Hold Number
exten => 301,1,MusicOnHold
[local-hold]
exten => 3000,1,ParkAndAnnouce(,60,Console/dsp)
[local-guest-stations]
; Room 100
exten => 71001,hint,SIP/7100a-1&SIP/7100b-1
exten => 71002,hint,SIP/7100a-2&SIP/7100b-2
exten => 7100,1,Dial,SIP/7100a-1
exten => 7101,1,Dial,SIP/7101a-1
exten => 7102,1,Dial,SIP/7102a-1
; exten => 7100,1,Macro(tl-simple-standard,7100)
; Room 101
exten => 71011,hint,SIP/7101a-1&SIP/7101b-1
exten => 71012,hint,SIP/7101a-2&SIP/7101b-2
; exten => 7101,1,Macro(tl-simple-standard,7101)
; Room 102
exten => 71021,hint,SIP/7102a-1&SIP/7102b-1
exten => 71022,hint,SIP/7102a-2&SIP/7102b-2
; exten => 7102,1,Macro(tl-simple-standard,7102)
; Room 200
exten => 72001,hint,SIP/7200a-1&SIP/7200b-1
exten => 72002,hint,SIP/7200a-2&SIP/7200b-2
exten => 7200,1,Macro(tl-simple-standard,7200)
; Room 201
exten => 72011,hint,SIP/7201a-1&SIP/7201b-1
exten => 72012,hint,SIP/7201a-2&SIP/7201b-2
; exten => 7201,1,Macro(tl-simple-standard,7201)
exten => 72021,hint,SIP/7202a-1
; exten => 7202,1,Macro(tl-simple-standard,7202)
[voicemail-access]
exten => 300,1,VoiceMailMain(${CALLERIDNUM}@default)
[transfer-context]
exten => _7XXX,1,Set(TRANSEXT=${EXTEN})
exten => _7XXX,n,NoOp(Transferring to extension ${TRANSEXT})
exten => _7XXX,n,Dial(SIP/${TRANSEXT}a-1&SIP/${TRANSEXT}b-1)
exten => _7XXX,n,Hangup
[autowakeup-context]
exten => s,1,Answer
exten => s,n,AGI(AutoWuCallAnswered)
exten => s,n,Wait(2)
exten => s,n,Playback(AutoWakeupCallMessage)
exten => s,n,Playback(vm-goodbye)
exten => s,n,Hangup
exten => t,1,Agi(dumpAgiInfo)
exten => i,1,Agi(dumpAgiInfo)
exten => failed,1,Agi(AutoWuCallFails)
[att-rcl-queue-access]
exten => 7997,1,Queue(att-rcl)
[att-E911-alarm-queue-access]
exten => 7998,1,Queue(att-e911)
[att-wakeupalarm-queue-access]
exten => 7999,1,Queue(att-wal)
[att-autowakeup-alarm]
exten => s,1,Answer
exten => s,n,AGI(AutoWuAlmCallAnswered)
exten => s,n,Wait(2)
exten => s,n,Playback(wakeup-call)
exten => s,n,Playback(warning)
exten => s,n,Playback(on-no-answer)
exten => s,n,Playback(extension)
exten => s,n,SayDigits(${ACCOUNTCODE})
exten => s,n,Wait(.5)
exten => s,n,Playback(to-call-num-press)
exten => s,n,Playback(star)
exten => s,n,Playback(otherwise-press)
exten => s,n,Playback(pound)
exten => s,n,Read(NUMBER,,1,skip,1,2)
exten => s,n,GotoIf($[ "${NUMBER}" = "*" ]?callem:disc)
exten => s,n(disc),Playback(vm-goodbye)
exten => s,n,Hangup
exten => s,n(callem),Dial(Local/${ACCOUNTCODE}@admin)
exten => s,n,Hangup
exten => t,1,Hangup
exten => i,1,Hangup
exten => failed,1,Agi(AutoWuAlmCallFails)
[att-e911-alarm]
exten => s,1,Answer
exten => s,n,AGI(Auto911AlmCallAnswered)
exten => s,n,Wait(2)
exten => s,n,Playback(emergency)
exten => s,n,Wait(.5)
exten => s,n,Playback(extension)
exten => s,n,SayDigits(${ACCOUNTCODE})
exten => s,n,Wait(.5)
exten => s,n(loop),Background(e911-attendant-options)
exten => s,n,Wait(30)
exten => s,n,Goto(loop)
exten => s,n,Hangup
exten => 1,1,AGI(Auto911CallExtension|${ACCOUNTCODE})
exten => 1,2,Dial(Local/${ACCOUNTCODE}@admin)
exten => 1,3,Wait(30)
exten => 1,4,Goto(loop)
exten => 2,1,AGI(Auto911BargeExtension|${ACCOUNTCODE})
exten => 2,2,Wait(30)
exten => 2,3,Goto(loop)
exten => t,1,Playback(vm-goodbye)
exten => t,2,Hangup
exten => failed,1,Agi(Auto911AlmCallFails)
#include extensions.conf.additions
[barge-meetme-conference]
exten => 8675309,1,MeetMe(911|mqr|911)
exten => 8675309,2,Hangup
----------------- extensions.conf.additions
; Guest Phone context....
;
[guest]
exten => s,1,Dial,SIP/7102a-1
;
; Included contexts for the guest context
;
include => local-hold
include => local-guest-stations
include => hotel-fac-guest
include => outbound-local-guest
include => outbound-e911-guest
include => outbound-long-distance-guest
include => call-attendant-direct
include => att-call-to-queue
include => att-rcl-queue-access
include => voicemail-access
include => meetme-barge
include => meetme-admin
;parked calls
include => parkedcalls
exten => t,1,Hangup
exten => h,1,Hangup
exten => i,1,Playback(invalid)
exten => i,2,Hangup