From 53aec7a969cc9f99fafe3ceeb912ec6b5d50bdcb Mon Sep 17 00:00:00 2001 From: Rusty Newton Date: Wed, 25 Feb 2015 23:48:15 +0000 Subject: 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/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432301 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- configs/basic-pbx/extensions.conf | 58 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 configs/basic-pbx/extensions.conf (limited to 'configs/basic-pbx/extensions.conf') diff --git a/configs/basic-pbx/extensions.conf b/configs/basic-pbx/extensions.conf new file mode 100644 index 000000000..ec4b0bd94 --- /dev/null +++ b/configs/basic-pbx/extensions.conf @@ -0,0 +1,58 @@ +[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() -- cgit v1.2.3