Files
asterisk/configs/basic-pbx/extensions.conf
Rusty Newton e484140aed configs/basic-pbx - Super Awesome Company example configs Phase 1, Patch 1
Example configuration files for a "basic PBX" deployment for the fictitious
Super Awesome Company. Details at https://reviewboard.asterisk.org/r/4379/
and https://wiki.asterisk.org/wiki/display/AST/Super+Awesome+Company

Reported by: Malcolm Davenport
Tested by: Rusty Newton

Review: https://reviewboard.asterisk.org/r/4379/
........

Merged revisions 432301 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@432302 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-02-25 23:49:21 +00:00

59 lines
1.7 KiB
Plaintext

[globals]
; General internal dialing options used in context Internal at
; extension dial_internal_exten. See the Dial app documentation for options.
INTERNAL_DIAL_OPT=,10
[Hints]
;Allow dynamic hint creation for every extension.
exten = _11XX,hint,PJSIP/${EXTEN}
[Features]
;Extension to check user voicemail.
exten = 8000,1,Verbose(1, "User ${CALLERID(num)} dialed the voicemail feature.")
same = n,VoiceMailMain(${CALLERID(num)}@example,s)
same = n,Hangup()
[DialingErrors]
; Handle any extensions dialed that don't otherwise exist.
; Comment out or remove this extension if you would rather have the calls
; ignored.
exten = _X.,1,Verbose(1, "User ${CALLERID(num)} dialed an invalid number.")
same = n,Playback(pbx-invalid)
same = n,Hangup()
[Internal]
; Include other contexts providing specific functionality for internal users.
include = Hints
include = Features
include = DialingErrors
; Handle internal calling between user extensions.
exten = _11XX,1,Verbose(1, "User ${CALLERID(num)} dialed internally to ${EXTEN}.")
same = n,Gosub(Internal,dial_internal_exten,1(${EXTEN}))
same = n,Hangup()
; Internal Dialing Subroutine
;
; ARG1 will be the extension number dialed.
exten = dial_internal_exten,1,Verbose(1, "Entering internal dialing gosub.")
same = n,Gotoif($[${DEVICE_STATE(PJSIP/${ARG1})} = BUSY]?dialed-BUSY,1:)
same = n,Dial(PJSIP/${ARG1}${INTERNAL_DIAL_OPT})
same = n,Goto(dialed-${DIALSTATUS},1)
exten = dialed-NOANSWER,1,NoOp()
same = n,Voicemail(${ARG1}@example,u)
same = n,Return()
exten = dialed-BUSY,1,NoOp()
same = n,Voicemail(${ARG1}@example,b)
same = n,Return()
exten = dialed-CHANUNAVAIL,1,NoOp()
same = n,Playback(pbx-invalid)
same = n,Return()
exten = _dialed-.,1,Goto(dialed-NOANSWER,1)
exten = h,1,Hangup()