configs/basic-pbx - Super Awesome Company example configs Phase 1, Patch 1
authorRusty Newton <rnewton@digium.com>
Wed, 25 Feb 2015 23:49:21 +0000 (23:49 +0000)
committerRusty Newton <rnewton@digium.com>
Wed, 25 Feb 2015 23:49:21 +0000 (23:49 +0000)
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

configs/basic-pbx/README [new file with mode: 0644]
configs/basic-pbx/asterisk.conf [new file with mode: 0644]
configs/basic-pbx/extensions.conf [new file with mode: 0644]
configs/basic-pbx/indications.conf [new file with mode: 0644]
configs/basic-pbx/logger.conf [new file with mode: 0644]
configs/basic-pbx/modules.conf [new file with mode: 0644]
configs/basic-pbx/musiconhold.conf [new file with mode: 0644]
configs/basic-pbx/pjsip.conf [new file with mode: 0644]
configs/basic-pbx/voicemail.conf [new file with mode: 0644]

diff --git a/configs/basic-pbx/README b/configs/basic-pbx/README
new file mode 100644 (file)
index 0000000..0f57ad6
--- /dev/null
@@ -0,0 +1,15 @@
+The included Asterisk configuration files are intended to be an example
+implementation for a fictitious company, Super Awesome Company.
+
+It can serve as a handy reference for understanding a simple Asterisk
+configuration in an approximate real-world environment.
+
+If you intend to use this configuration as a template for your own, then
+you will need to change many values in the various configuration files to
+match your own devices, network, SIP ITSP accounts and more.
+
+For further documentation on this configuration see the Asterisk wiki:
+https://wiki.asterisk.org/wiki/display/AST/Reference+Use+Cases+for+Asterisk.
+
+Please report bugs or errors in configuration on the Asterisk issue tracker:
+https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines
diff --git a/configs/basic-pbx/asterisk.conf b/configs/basic-pbx/asterisk.conf
new file mode 100644 (file)
index 0000000..3ee7b99
--- /dev/null
@@ -0,0 +1,26 @@
+[directories]
+astetcdir = /etc/asterisk
+astmoddir = /usr/lib/asterisk/modules
+astvarlibdir = /var/lib/asterisk
+astdbdir = /var/lib/asterisk
+astkeydir = /var/lib/asterisk
+astdatadir = /var/lib/asterisk
+astagidir = /var/lib/asterisk/agi-bin
+astspooldir = /var/spool/asterisk
+astrundir = /var/run/asterisk
+astlogdir = /var/log/asterisk
+astsbindir = /usr/sbin
+
+[options]
+; If we want to start Asterisk with a default verbosity for the verbose
+; or debug logger channel types, then we use these settings.
+;verbose = 5
+;debug = 5
+
+; User and group to run asterisk as. NOTE: This will require changes to
+; directory and device permissions.
+;runuser = asterisk            ; The user to run as.
+;rungroup = asterisk           ; The group to run as.
+
+defaultlanguage = en
+documentation_language = en_US
diff --git a/configs/basic-pbx/extensions.conf b/configs/basic-pbx/extensions.conf
new file mode 100644 (file)
index 0000000..ec4b0bd
--- /dev/null
@@ -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()
diff --git a/configs/basic-pbx/indications.conf b/configs/basic-pbx/indications.conf
new file mode 100644 (file)
index 0000000..115cddd
--- /dev/null
@@ -0,0 +1,19 @@
+[general]
+country = us           ; We are in Waldo, Al, USA so the US is our default.
+
+[us]
+description = United States / North America
+ringcadence = 2000,4000
+dial = 350+440
+busy = 480+620/500,0/500
+ring = 440+480/2000,0/4000
+congestion = 480+620/250,0/250
+callwaiting = 440/300,0/10000
+dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440
+record = 1400/500,0/15000
+info = !950/330,!1400/330,!1800/330,0
+stutter = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440
+
+; Additional country configurations can be found in the Asterisk source
+; at /configs/samples/indications.conf.sample
+
diff --git a/configs/basic-pbx/logger.conf b/configs/basic-pbx/logger.conf
new file mode 100644 (file)
index 0000000..13290a2
--- /dev/null
@@ -0,0 +1,9 @@
+[general]
+
+[logfiles]
+
+console = verbose,notice,warning,error
+
+;messages = notice,warning,error
+;full = verbose,debug,notice,warning,error
+;security = security
diff --git a/configs/basic-pbx/modules.conf b/configs/basic-pbx/modules.conf
new file mode 100644 (file)
index 0000000..082bdde
--- /dev/null
@@ -0,0 +1,102 @@
+[modules]
+autoload = no
+
+; Applications
+
+load = app_bridgewait.so
+load = app_dial.so
+load = app_playback.so
+load = app_stack.so
+load = app_verbose.so
+load = app_voicemail.so
+
+; Bridging
+
+load = bridge_builtin_features.so
+load = bridge_builtin_interval_features.so
+load = bridge_holding.so
+load = bridge_native_rtp.so
+load = bridge_simple.so
+load = bridge_softmix.so
+
+; Channel Drivers
+
+load = chan_bridge_media.so
+load = chan_pjsip.so
+
+; Codecs
+
+load = codec_gsm.so
+load = codec_resample.so
+load = codec_ulaw.so
+load = codec_g722.so
+
+; Formats
+
+load = format_gsm.so
+load = format_pcm.so
+load = format_wav_gsm.so
+load = format_wav.so
+
+; Functions
+
+load = func_callerid.so
+load = func_pjsip_endpoint.so
+load = func_sorcery.so
+load = func_devstate.so
+
+; Core/PBX
+
+load = pbx_config.so
+load = pbx_functions.so
+
+; Resources
+
+load = res_hep_pjsip.so
+load = res_musiconhold.so
+load = res_pjsip_acl.so
+load = res_pjsip_authenticator_digest.so
+load = res_pjsip_caller_id.so
+load = res_pjsip_dialog_info_body_generator.so
+load = res_pjsip_diversion.so
+load = res_pjsip_dtmf_info.so
+load = res_pjsip_endpoint_identifier_anonymous.so
+load = res_pjsip_endpoint_identifier_ip.so
+load = res_pjsip_endpoint_identifier_user.so
+load = res_pjsip_exten_state.so
+load = res_pjsip_header_funcs.so
+load = res_pjsip_log_forwarder.so
+load = res_pjsip_logger.so
+load = res_pjsip_messaging.so
+load = res_pjsip_multihomed.so
+load = res_pjsip_mwi_body_generator.so
+load = res_pjsip_mwi.so
+load = res_pjsip_nat.so
+load = res_pjsip_notify.so
+load = res_pjsip_one_touch_record_info.so
+load = res_pjsip_outbound_authenticator_digest.so
+load = res_pjsip_outbound_publish.so
+load = res_pjsip_outbound_registration.so
+load = res_pjsip_path.so
+load = res_pjsip_phoneprov_provider.so
+load = res_pjsip_pidf_body_generator.so
+load = res_pjsip_pidf_digium_body_supplement.so
+load = res_pjsip_pidf_eyebeam_body_supplement.so
+load = res_pjsip_publish_asterisk.so
+load = res_pjsip_pubsub.so
+load = res_pjsip_refer.so
+load = res_pjsip_registrar_expire.so
+load = res_pjsip_registrar.so
+load = res_pjsip_rfc3326.so
+load = res_pjsip_sdp_rtp.so
+load = res_pjsip_send_to_voicemail.so
+load = res_pjsip_session.so
+load = res_pjsip.so
+load = res_pjsip_t38.so
+load = res_pjsip_transport_websocket.so
+load = res_pjsip_xpidf_body_generator.so
+load = res_rtp_asterisk.so
+load = res_sorcery_astdb.so
+load = res_sorcery_config.so
+load = res_sorcery_memory.so
+load = res_sorcery_realtime.so
diff --git a/configs/basic-pbx/musiconhold.conf b/configs/basic-pbx/musiconhold.conf
new file mode 100644 (file)
index 0000000..bc3ba21
--- /dev/null
@@ -0,0 +1,5 @@
+[general]
+
+[default]
+mode = files
+directory = moh
diff --git a/configs/basic-pbx/pjsip.conf b/configs/basic-pbx/pjsip.conf
new file mode 100644 (file)
index 0000000..3d9805c
--- /dev/null
@@ -0,0 +1,287 @@
+;================================ TRANSPORTS ==
+; Our primary transport definition for UDP communication behind NAT.
+[transport-udp-nat]
+type = transport
+protocol = udp
+bind = 0.0.0.0
+; NAT settings
+;local_net = 10.0.0.0/8
+;external_media_address = 203.0.113.1
+;external_signaling_address = 203.0.113.1
+
+
+;================================ ENDPOINT TEMPLATES ==
+; Our primary endpoint template for internal desk phones.
+[endpoint-internal-d70](!)
+type = endpoint
+transport = transport-udp-nat
+context = Internal
+allow = !all,g722,ulaw
+direct_media = no
+trust_id_outbound = yes
+device_state_busy_at = 1
+dtmf_mode = rfc4733
+
+[auth-userpass](!)
+type = auth
+auth_type = userpass
+
+[aor-single-reg](!)
+type = aor
+max_contacts = 1
+
+;================================ ENDPOINT DEFINITIONS ==
+; Below are the definitions for all staff devices, listed by department.
+;
+; Super Awesome Company uses the MAC address of their devices for the auth
+; username and the extension number for the name of the endpoint, auth and
+; aor objects. If your phones must use the same user ID and auth name then
+; you will need to customize the endpoints accordingly.
+
+;================================ MANAGEMENT ==
+
+;Lindsey Freddie
+;President for Life
+
+[1107](endpoint-internal-d70)
+auth = 1107
+aors = 1107
+callerid = Lindsey Freddie <1107>
+
+[1107](auth-userpass)
+password = 4webrEtHupHewu4
+username = 0019159BF771
+
+[1107](aor-single-reg)
+mailboxes = 1107@example
+
+;================================
+;Temple Morgan
+;Life Assistant to the President for Life
+
+[1111](endpoint-internal-d70)
+auth = 1111
+aors = 1111
+callerid = Temple Morgan <1111>
+
+[1111](auth-userpass)
+password = be4eberEkUsUMaF
+username = 000FD3012445
+
+[1111](aor-single-reg)
+mailboxes = 1111@example
+
+;================================
+;Terry Jules
+;Director of Sales
+
+[1109](endpoint-internal-d70)
+auth = 1109
+aors = 1109
+callerid = Terry Jules <1109>
+
+[1109](auth-userpass)
+password = sPeFaChe7ruxarE
+username = 00094558B29E
+
+[1109](aor-single-reg)
+mailboxes = 1109@example
+
+;================================
+;Maria Berny
+;Director of Customer Experience
+
+[1101](endpoint-internal-d70)
+auth = 1101
+aors = 1101
+callerid = Maria Berny <1101>
+
+[1101](auth-userpass)
+password = SW2fur7facrarac
+username = 3605657CFB45
+
+[1101](aor-single-reg)
+mailboxes = 1101@example
+
+;================================
+;Penelope Bronte
+;Director of Engineering
+
+[1103](endpoint-internal-d70)
+auth = 1103
+aors = 1103
+callerid = Penelope Bronte <103>
+
+[1103](auth-userpass)
+password = zutAnacHe8ewuWr
+username = D5F646797302
+
+[1103](aor-single-reg)
+mailboxes = 103@example
+
+;================================
+;Aaron Courtney
+;Accounting and Records
+
+[1106](endpoint-internal-d70)
+auth = 1106
+aors = 1106
+callerid = Aaron Courtney <1106>
+
+[1106](auth-userpass)
+password = tecrUBUs3u7uTab
+username = EAFB2F4319C4
+
+[1106](aor-single-reg)
+mailboxes = 1106@example
+
+;================================ SALES STAFF ==
+
+;================================
+;Garnet Claude
+;Sales Associate
+
+[1105](endpoint-internal-d70)
+auth = 1105
+aors = 1105
+callerid = Garnet Claude <1105>
+
+[1105](auth-userpass)
+password = Q7rAphatRusteSW
+username = 5187E6D311BE
+
+[1105](aor-single-reg)
+mailboxes = 1105@example
+
+;================================
+;Franny Ocean
+;Sales Associate
+
+[1112](endpoint-internal-d70)
+auth = 1112
+aors = 1112
+callerid = Franny Ocean <1112>
+
+[1112](auth-userpass)
+password = nefReSTAq8phaph
+username = ACC6BC73A990
+
+[1112](aor-single-reg)
+mailboxes = 1112@example
+
+;================================ CUSTOMER SERVICE STAFF =
+
+;================================
+;Dusty Williams
+;Customer Advocate
+
+[1115](endpoint-internal-d70)
+auth = 1115
+aors = 1115
+callerid = Dusty Williams <1115>
+
+[1115](auth-userpass)
+password = cEBraN2trezaqEt
+username = 2C61DA1AA74B
+
+[1115](aor-single-reg)
+mailboxes = 1115@example
+
+;================================
+;Tommie Briar
+;Customer Advocate
+
+[1102](endpoint-internal-d70)
+auth = 1102
+aors = 1102
+callerid = Tommie Briar <1102>
+
+[1102](auth-userpass)
+password = 6EBu8egespUwuth
+username = 558EF2645DC7
+
+[1102](aor-single-reg)
+mailboxes = 1102@example
+
+;================================ ENGINEERING STAFF ==
+
+;================================
+;Hollis Justy
+;Software Engineer
+
+[1110](endpoint-internal-d70)
+auth = 1110
+aors = 1110
+callerid = Hollis Justy <1110>
+
+[1110](auth-userpass)
+password = vust6spuFereThA
+username = D3D55712AED0
+
+[1110](aor-single-reg)
+mailboxes = 1110@example
+
+;================================
+;Richard Casey
+;Software Engineer
+
+[1104](endpoint-internal-d70)
+auth = 1104
+aors = 1104
+callerid = Richard Casey <1104>
+
+[1104](auth-userpass)
+password = fU8puzuzEpRuSTa
+username = 13B29A457ED5
+
+[1104](aor-single-reg)
+mailboxes = 1104@example
+
+;================================
+;Sal Smith
+;Software Engineer
+
+[1114](endpoint-internal-d70)
+auth = 1114
+aors = 1114
+callerid = Sal Smith <1114>
+
+[1114](auth-userpass)
+password = XapR4munEcadrub
+username = C369192006EA
+
+[1114](aor-single-reg)
+mailboxes = 1114@example
+
+;================================
+;Laverne Roberts
+;Software Engineer
+
+[1113](endpoint-internal-d70)
+auth = 1113
+aors = 1113
+callerid = Laverne Roberts <1113>
+
+[1113](auth-userpass)
+password = mu8aPr4daJAQaDE
+username = B07FF579AAC8
+
+[1113](aor-single-reg)
+mailboxes = 1113@example
+
+;================================
+;Colby Hildred
+;IT Systems
+
+[1108](endpoint-internal-d70)
+auth = 1108
+aors = 1108
+callerid = Colby Hildred <1108>
+
+[1108](auth-userpass)
+password = KAthufrudE6uyAs
+username = DB589C0875AB
+
+[1108](aor-single-reg)
+mailboxes = 1108@example
+
diff --git a/configs/basic-pbx/voicemail.conf b/configs/basic-pbx/voicemail.conf
new file mode 100644 (file)
index 0000000..8ef72d4
--- /dev/null
@@ -0,0 +1,23 @@
+[general]
+format = wav49|gsm|wav
+
+[default]
+
+
+[example]
+; Voicemail context for all internal users in the example.com domain.
+1101 = 0717,Maria Berny
+1102 = 7085,Tommie Briar
+1103 = 1809,Penelope Bronte
+1104 = 0039,Richard Casey
+1105 = 6618,Garnet Claude
+1106 = 9805,Aaron Courtney
+1107 = 7484,Lindsey Freddie
+1108 = 7788,Colby Hildred
+1109 = 5750,Terry Jules
+1110 = 3702,Hollis Justy
+1111 = 1878,Temple Morgan
+1112 = 5497,Franny Ocean
+1113 = 1637,Laverne Roberts
+1114 = 3717,Sal Smith
+1115 = 3088,Dusty Williams