Asterisk PBX
Asterisk PBX Knowledge Base

Asterisk PBX



Join Our Newsletter

Join our newsletter and receive FREE, the latest information regarding Asterisk PBX and the VOIP industry. Enter your email address below and click "Subscribe".



Related Resources

Cisco IP Phones
Buy Sell Used Cisco
Buy Sell Used Foundry
Cisco CP-7940 Phone

 
 

extensions.conf

[general]
static=yes
writeprotect=yes

; --------------------------------------------------
; [globals] - Defines variables for ease of use later
; --------------------------------------------------
[globals]
; Trunk Info for inbound calls via PSTN - See the zapata.conf file in /etc/asterisk
TRUNK=ZAP/G1 ;Trunk Interface
; Trunk Info for outbound calls via PSTN - See the zapata.conf file in /etc/asterisk
OUTTRUNK=ZAP/G2 ;Trunk Interface
;MSD digits to strip (usually 1 or 0), 1 = remove a leading 9
TRUNKMSD=1

; ADMIN/EXECUTIVE TEAM 1000-1099
OPERATORVM=1000
EXT1001=SIP/1001
EXT1001VM=1001
EXT1002=SIP/1002
EXT1002VM=1002
EXT1003=SIP/1003
EXT1003VM=1003
EXT1004=SIP/1004
EXT1004VM=1004

; SALES TEAM 1100-1199
SALESVM=1100
EXT1101=SIP/1101
EXT1101VM=1101
EXT1102=SIP/1102
EXT1102VM=1102
EXT1103=SIP/1103
EXT1103VM=1103
EXT1104=SIP/1104
EXT1104VM=1104
EXT1105=SIP/1105
EXT1105VM=1105

; ACQUISITIONS TEAM 1200-1299
ACQUISITIONSVM=1200
EXT1201=SIP/1201
EXT1201VM=1201
EXT1202=SIP/1202
EXT1202VM=1202
EXT1203=SIP/1203
EXT1203VM=1203
EXT1204=SIP/1204
EXT1204VM=1204
EXT1205=SIP/1205
EXT1205VM=1205

; TECHNICAL TEAM 1400-1499
TECHNICALVM=1400
EXT1401=SIP/1401
EXT1401VM=1401
EXT1402=SIP/1402
EXT1402VM=1402
EXT1403=SIP/1403
EXT1403VM=1403
EXT1404=SIP/1404
EXT1404VM=1404
EXT1405=SIP/1405
EXT1405VM=1405


; TEAM EXTENSIONS
EVERYONE=${EXT1001}&${EXT1002}&${EXT1003}&${EXT1004}&${EXT1101}&${EXT1102}&${EXT1103}&${EXT1104}&${EXT1105}&${EXT1201}&${EXT1202}&${EXT1203}&${EXT1204}&${EXT1205}&${EXT1401}&${EXT1402}&${EXT1403}&${EXT1404}&${EXT1405}
SALESTEAM=${EXT1001}&${EXT1101}&${EXT1102}&${EXT1103}&${EXT1104}&${EXT1105}

; --------------------------------------------------
; END [globals]
; --------------------------------------------------

; --------------------------------------------------
; [trunkint] - Defines extension for international long distance through trunk
; --------------------------------------------------
[trunkint]
exten => _9011.,1,Dial(${OUTTRUNK}/www${EXTEN:${TRUNKMSD}})
exten => _9011.,102,Dial($/{OUTTRUNK}/www${EXTEN:${TRUNKMSD}})
exten => _9011.,203,Congestion

;exten => _8011.,1,Dial(${TRUNK}/www${EXTEN:${TRUNKMSD}})
;exten => _8011.,102,Dial($/{TRUNK}/www${EXTEN:${TRUNKMSD}})
;exten => _8011.,203,Congestion

; --------------------------------------------------
; END [trunkint]
; --------------------------------------------------

; --------------------------------------------------
; [trunkld] - Defines extension for long distance through trunk
; --------------------------------------------------
[trunkld]
exten => _81NXXNXXXXXX,1,Dial(IAX2/voicepulse-out-01/${EXTEN:${TRUNKMSD}})
exten => _81NXXNXXXXXX,102,Dial(IAX2/voicepulse-out-02/${EXTEN:${TRUNKMSD}})
exten => _81NXXNXXXXXX,203,Congestion

exten => _91NXXNXXXXXX,1,Dial(${OUTTRUNK}/www${EXTEN:${TRUNKMSD}})
exten => _91NXXNXXXXXX,2,Congestion

; --------------------------------------------------
; END [trunkld]
; --------------------------------------------------

; --------------------------------------------------
; [trunklocal] - Defines extension for local calls through trunk
; --------------------------------------------------
[trunklocal]
exten => _9NXXXXXX,1,Dial(${OUTTRUNK}/www${EXTEN:${TRUNKMSD}})
exten => _9NXXXXXX,2,Congestion

exten => _9512NXXXXXX,1,Dial(${OUTTRUNK}/www${EXTEN:${TRUNKMSD}})
exten => _9512NXXXXXX,2,Congestion
; --------------------------------------------------
; END [trunklocal]
; --------------------------------------------------

; --------------------------------------------------
; [trunktollfree] - Defines extension for toll free calls through trunk
; --------------------------------------------------
[trunktollfree]
exten => _91800NXXXXXX,1,Dial(${OUTTRUNK}/www${EXTEN:${TRUNKMSD}})
exten => _91800NXXXXXX,2,Congestion
exten => _91888NXXXXXX,1,Dial(${OUTTRUNK}/www${EXTEN:${TRUNKMSD}})
exten => _91888NXXXXXX,2,Congestion
exten => _91866NXXXXXX,1,Dial(${OUTTRUNK}/www${EXTEN:${TRUNKMSD}})
exten => _91866NXXXXXX,2,Congestion
exten => _91877NXXXXXX,1,Dial(${OUTTRUNK}/www${EXTEN:${TRUNKMSD}})
exten => _91877NXXXXXX,2,Congestion

; --------------------------------------------------
; END [trunktollfree]
; --------------------------------------------------

; --------------------------------------------------
; [macro-vmessage] Macro for voicemail access
; --------------------------------------------------
[macro-vmessage]
exten => s,1,VoiceMail(u${ARG1})
exten => s,2,Hangup
; --------------------------------------------------
; END [macro-vmessage]
; --------------------------------------------------

; --------------------------------------------------
; DIRECTORY - Defines 411 Directory Extension
; --------------------------------------------------
[directory]
exten => 411,1,Answer
exten => 411,2,Directory(from-sip)
exten => 411,3,Hangup
; --------------------------------------------------
; END - DIRECTORY
; --------------------------------------------------

; --------------------------------------------------
; MEETINGROOMS - Defines MeetingRoom Extensions
; --------------------------------------------------
;[meetingrooms]
;exten => 330,1,Meetme(4000)
;exten => 330,2,Hangup
;exten => 331,1,Meetme(4001)
;exten => 331,2,Hangup
;exten => 332,1,Meetme(4002)
;exten => 332,2,Hangup
;exten => 333,1,Meetme(4003)
;exten => 333,2,Hangup
; --------------------------------------------------
; END - MEETINGROOMS
; --------------------------------------------------

; --------------------------------------------------
; IVR RECORDER - Defines recording extension for greetings, etc..
; --------------------------------------------------
[ivrrecord]
exten => 205,1,Wait(2)
exten => 205,2,Record(/tmp/asterisk-recording:wav)
exten => 205,3,Wait(2)
exten => 205,4,Playback(/tmp/asterisk-recording)
exten => 205,5,Wait(2)
exten => 205,6,Hangup
; --------------------------------------------------
; END - IVR RECORDER
; --------------------------------------------------
; --------------------------------------------------
; IVR RECORDER - Defines recording extension for greetings, etc..
; --------------------------------------------------
[ivrrecord-incoming]
exten => 705,1,Wait(2)
exten => 705,2,Record(/tmp/asterisk-recording:gsm)
exten => 705,3,Wait(2)
exten => 705,4,Playback(/tmp/asterisk-recording)
exten => 705,5,Wait(2)
exten => 705,6,Hangup
; --------------------------------------------------
; END - IVR RECORDER
; --------------------------------------------------

; --------------------------------------------------
; VOICEMAIL ENTRY - Defines extension voicemail entry
; --------------------------------------------------
[entervm]
exten => 8,1,Answer
exten => 8,2,Wait(1)
exten => 8,3,VoicemailMain(${CALLERIDNUM})
exten => 8,4,Hangup
exten => 81,1,VoicemailMain()
exten => 81,2,Hangup

[entervm-incoming]
exten => 81,1,VoicemailMain()
exten => 81,2,Hangup

; --------------------------------------------------
; END - VOICEMAIL ENTRY
; --------------------------------------------------

; --------------------------------------------------
; MUSICONHOLD TEST - Defines MusicOnHold Extension for Testing
; --------------------------------------------------
;[musiconholdtest]
;exten => 6000,1,Answer
;exten => 6000,2,SetMusicOnHold(default)
;exten => 6000,3,MusicOnHold()
;exten => 6000,4,Hangup
; --------------------------------------------------
; END - MUSICONHOLD
; --------------------------------------------------

; --------------------------------------------------
; RINGEVERYONE - Defines Ringeveryone Extension
; --------------------------------------------------
[ringeveryone]
exten => 6001,1,Dial(${EVERYONE},20,trf)
exten => 6001,2,Hangup
; --------------------------------------------------
; END - RINGEVERYONE
; --------------------------------------------------

; --------------------------------------------------
; MAINMENU - Defines menu presented when calls come in
; --------------------------------------------------
[mainmenu]
exten => 500,1,Answer
exten => 500,2,DigitTimeout(3)
exten => 500,3,Background(ivr-welcome)
exten => 500,4,Background(ivr-ifyouknow)
exten => 500,5,Background(ivr-forsales)
exten => 500,6,Background(ivr-foracquisitions)
exten => 500,7,Background(ivr-fordirectory)
exten => 500,8,Background(ivr-foroper)
exten => 500,9,WaitExten(2)
exten => 500,10,Background(ivr-tooper)
exten => 500,11,Goto(1000,1)

; IVR - CHOICE 1 - SALES
; PRESS 1
exten => 1,1,Dial(${SALESTEAM},30,trf)
exten => 1,2,Macro(vmessage,${EXT1101VM})

; IVR - CHOICE 2 - ACQUISITIONS
; PRESS 2
exten => 2,1,Dial(${EXT1201}&${EXT1202}&${EXT1203}&${EXT1204}&${EXT1205}&${EXT1001},15,trf)
exten => 2,2,Macro(vmessage,${EXT1200VM})

exten => 8,1,Directory(from-sip)
exten => 8,2,Goto(500,4)

;exten => 0,1,Goto(1001,1)
exten => 0,1,Dial(${EXT1001},15,trf)
exten => 0,2,Macro(vmessage,${OPERATORVM})
exten => 0,3,Hangup

exten => o,1,Dial(${EXT1001},15,trf)
exten => o,2,Macro(vmessage,${OPERATORVM})
exten => o,3,Hangup

exten => s,1,Wait,2
exten => s,2,Goto(500,1)

exten => i,1,Playback(ivr-badsel)
exten => i,2,Goto(500,5)
exten => i,3,Hangup


; --------------------------------------------------
; END - MAINMENU
; --------------------------------------------------

; --------------------------------------------------
; [sip-phones] - Defines SIP Phone Extensions
; --------------------------------------------------
[sip-phones]
exten => 1000,1,Dial(${EXT1001},20,trf)
exten => 1000,2,Macro(vmessage,${OPERATORVM})
exten => 1000,3,Hangup

exten => 1001,1,Dial(${EXT1001},20,trf)
exten => 1001,2,Macro(vmessage,${EXT1001VM})
exten => 1001,3,Hangup

exten => 1002,1,Dial(${EXT1002},20,t)
exten => 1002,2,Macro(vmessage,${EXT1002VM})
exten => 1002,3,Hangup

exten => 1003,1,Dial(${EXT1003},20,trf)
exten => 1003,2,Macro(vmessage,${EXT1003VM})
exten => 1003,3,Hangup

exten => 1004,1,Dial(${EXT1004},20,trf)
exten => 1004,2,Macro(vmessage,${EXT1004VM})
exten => 1004,3,Hangup

exten => 1100,1,Dial(${EXT1101},20,trf)
exten => 1100,2,Macro(vmessage,${SALESVM})
exten => 1100,3,Hangup

exten => 1101,1,Dial(${EXT1101},20,trf)
exten => 1101,2,Macro(vmessage,${EXT1101VM})
exten => 1101,3,Hangup

exten => 1102,1,Dial(${EXT1102},20,trf)
exten => 1102,2,Macro(vmessage,${EXT1102VM})
exten => 1102,3,Hangup

exten => 1103,1,Dial(${EXT1103},20,trf)
exten => 1103,2,Macro(vmessage,${EXT1103VM})
exten => 1103,3,Hangup

exten => 1104,1,Dial(${EXT1104},20,trf)
exten => 1104,2,Macro(vmessage,${EXT1104VM})
exten => 1104,3,Hangup

exten => 1105,1,Dial(${EXT1105},20,trf)
exten => 1105,2,Macro(vmessage,${EXT1105VM})
exten => 1105,3,Hangup

exten => 1200,1,Dial(${EXT1201},20,trf)
exten => 1200,2,Macro(vmessage,${ACQUISITIONSVM})
exten => 1200,3,Hangup

exten => 1201,1,Dial(${EXT1201},20,trf)
exten => 1201,2,Macro(vmessage,${EXT1201VM})
exten => 1201,3,Hangup

exten => 1202,1,Dial(${EXT1202},20,trf)
exten => 1202,2,Macro(vmessage,${EXT1202VM})
exten => 1202,3,Hangup

exten => 1203,1,Dial(${EXT1203},20,trf)
exten => 1203,2,Macro(vmessage,${EXT1203VM})
exten => 1203,3,Hangup

exten => 1204,1,Dial(${EXT1204},20,trf)
exten => 1204,2,Macro(vmessage,${EXT1204VM})
exten => 1204,3,Hangup

exten => 1205,1,Dial(${EXT1205},20,trf)
exten => 1205,2,Macro(vmessage,${EXT1205VM})
exten => 1205,3,Hangup

exten => 1400,1,Dial(${EXT1401},20,trf)
exten => 1400,2,Macro(vmessage,${CUSTOMERSERVICEVM})
exten => 1400,3,Hangup

exten => 1401,1,Dial(${EXT1401},20,trf)
exten => 1401,2,Macro(vmessage,${EXT1401VM})
exten => 1401,3,Hangup

exten => 1402,1,Dial(${EXT1402},20,trf)
exten => 1402,2,Macro(vmessage,${EXT1402VM})
exten => 1402,3,Hangup

exten => 1403,1,Dial(${EXT1403},20,trf)
exten => 1403,2,Macro(vmessage,${EXT1403VM})
exten => 1403,3,Hangup

exten => 1404,1,Dial(${EXT1404},20,trf)
exten => 1404,2,Macro(vmessage,${EXT1404VM})
exten => 1404,3,Hangup

exten => 1405,1,Dial(${EXT1405},20,trf)
exten => 1405,2,Macro(vmessage,${EXT1405VM})
exten => 1405,3,Hangup
; --------------------------------------------------
; END [sip-phones]
; --------------------------------------------------

; --------------------------------------------------
; [incoming] - Referenced in zapata.conf
;
; Defines how incoming calls via Zap hardware are handled
; --------------------------------------------------
[incoming]
include => mainmenu
include => sip-phones
include => entervm-incoming
include => ivrrecord-incoming
;include => operator
; --------------------------------------------------
; END - CONTEXT (incoming)
; --------------------------------------------------

; --------------------------------------------------
; [from-sip] - Referenced in sip.conf
;
; Defines how calls within the local SIP phones are handled
; --------------------------------------------------
[from-sip]
include => parkedcalls
include => trunklocal
include => trunktollfree
include => trunkld
include => trunkint
include => directory
;include => meetingrooms
include => ivrrecord
include => entervm
;include => musiconholdtest
include => ringeveryone
;include => mainmenu
include => sip-phones
;include => operator

; do this if timeout occurs
exten => t,1,Playback(vm-goodbye)
exten => t,2,Hangup

exten => T,1,Playback(vm-goodbye)
exten => T,2,Hangup

; --------------------------------------------------
; END [from-sip]
; --------------------------------------------------

  Privacy Policy | Articles © 2005 Asterisk PBX