summaryrefslogtreecommitdiff
path: root/configs/basic-pbx/extensions.conf
diff options
context:
space:
mode:
authorRusty Newton <rnewton@digium.com>2015-02-25 23:48:15 +0000
committerRusty Newton <rnewton@digium.com>2015-02-25 23:48:15 +0000
commit53aec7a969cc9f99fafe3ceeb912ec6b5d50bdcb (patch)
treeeb529f37853b1a344e8475c163427db5e27e4bfe /configs/basic-pbx/extensions.conf
parent474fec4f92eb71e0bfa27cacac3281690b8ccf32 (diff)
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
Diffstat (limited to 'configs/basic-pbx/extensions.conf')
-rw-r--r--configs/basic-pbx/extensions.conf58
1 files changed, 58 insertions, 0 deletions
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()