summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-pbx/root/etc/pbx-asterisk
diff options
context:
space:
mode:
authorIordan Iordanov <iiordanov@gmail.com>2011-11-22 04:21:57 +0000
committerIordan Iordanov <iiordanov@gmail.com>2011-11-22 04:21:57 +0000
commit6663c0a935684e7caabdbae17185ed056287038e (patch)
tree9b4fac2c6c63d9b82115b8a783b953f3e3e13f27 /applications/luci-pbx/root/etc/pbx-asterisk
parent3face708593d3de417b93472b827d05a8a5813fb (diff)
1) Checking in all necessary changes to acommodate the new luci-pbx-voicemail package.
- Creating configuration with pbx-asterisk - TEMPLATE files - Including record voicemail greeting context in user extensions. - Redirecting incoming calls which were not picked up through the voicemail recording context. - Putting a configurable timeout before either hanging up if voicemail is disabled or redirecting to voicemail if it is enabled. 2) Improved DISA by setting longer timeouts for start of input and digits.
Diffstat (limited to 'applications/luci-pbx/root/etc/pbx-asterisk')
-rw-r--r--applications/luci-pbx/root/etc/pbx-asterisk/extensions.conf.TEMPLATE12
-rw-r--r--applications/luci-pbx/root/etc/pbx-asterisk/extensions_default.conf.TEMPLATE9
-rw-r--r--applications/luci-pbx/root/etc/pbx-asterisk/extensions_default_user.conf.TEMPLATE1
-rw-r--r--applications/luci-pbx/root/etc/pbx-asterisk/extensions_disa.conf.TEMPLATE2
-rw-r--r--applications/luci-pbx/root/etc/pbx-asterisk/extensions_incoming_context_gtalk.conf.TEMPLATE4
-rw-r--r--applications/luci-pbx/root/etc/pbx-asterisk/extensions_incoming_context_sip.conf.TEMPLATE3
-rw-r--r--applications/luci-pbx/root/etc/pbx-asterisk/extensions_outgoing_dial_local_user.conf.TEMPLATE2
-rw-r--r--applications/luci-pbx/root/etc/pbx-asterisk/extensions_user_context_footer.conf.TEMPLATE1
-rw-r--r--applications/luci-pbx/root/etc/pbx-asterisk/extensions_voicemail_disabled.conf.TEMPLATE4
-rw-r--r--applications/luci-pbx/root/etc/pbx-asterisk/extensions_voicemail_enabled.conf.TEMPLATE15
-rw-r--r--applications/luci-pbx/root/etc/pbx-asterisk/modules.conf.TEMPLATE2
11 files changed, 43 insertions, 12 deletions
diff --git a/applications/luci-pbx/root/etc/pbx-asterisk/extensions.conf.TEMPLATE b/applications/luci-pbx/root/etc/pbx-asterisk/extensions.conf.TEMPLATE
index f3edac384b..a01a22fa31 100644
--- a/applications/luci-pbx/root/etc/pbx-asterisk/extensions.conf.TEMPLATE
+++ b/applications/luci-pbx/root/etc/pbx-asterisk/extensions.conf.TEMPLATE
@@ -4,6 +4,7 @@ writeprotect = yes
clearglobalvars = no
[globals]
+RINGTIME => |RINGTIME|
[default]
@@ -14,15 +15,8 @@ exten => _X.,1,Hangup()
[context-catch-all]
exten => _[!-~].,1,Dial(SIP/${EXTEN},60,r)
-[default-incoming-call-context]
-exten => s,1,NoOp(${CALLERID})
-exten => s,n,Set(SOURCECONTEXT=default-incoming-call-context)
-exten => s,n,Set(SOURCEEXTEN=s)
-exten => s,n,Goto(blacklist-call-context,s,1)
-exten => s,n(doneblacklist),NoOp()
-exten => s,n,Goto(disa-check-call-context,s,1)
-exten => s,n(donedisacheck),Dial(|LOCALUSERS|,60,r)
-
+#include extensions_default.conf
+#include extensions_voicemail.conf
#include extensions_incoming.conf
#include extensions_incoming_gtalk.conf
#include extensions_blacklist.conf
diff --git a/applications/luci-pbx/root/etc/pbx-asterisk/extensions_default.conf.TEMPLATE b/applications/luci-pbx/root/etc/pbx-asterisk/extensions_default.conf.TEMPLATE
new file mode 100644
index 0000000000..8d37ddccb2
--- /dev/null
+++ b/applications/luci-pbx/root/etc/pbx-asterisk/extensions_default.conf.TEMPLATE
@@ -0,0 +1,9 @@
+[default-incoming-call-context]
+exten => s,1,NoOp(${CALLERID})
+exten => s,n,Set(SOURCECONTEXT=default-incoming-call-context)
+exten => s,n,Set(SOURCEEXTEN=s)
+exten => s,n,Goto(blacklist-call-context,s,1)
+exten => s,n(doneblacklist),NoOp()
+exten => s,n,Goto(disa-check-call-context,s,1)
+exten => s,n(donedisacheck),Dial(|LOCALUSERS|,${RINGTIME},r)
+exten => s,n,Goto(context-voicemail,s,1)
diff --git a/applications/luci-pbx/root/etc/pbx-asterisk/extensions_default_user.conf.TEMPLATE b/applications/luci-pbx/root/etc/pbx-asterisk/extensions_default_user.conf.TEMPLATE
new file mode 100644
index 0000000000..1910ff4d96
--- /dev/null
+++ b/applications/luci-pbx/root/etc/pbx-asterisk/extensions_default_user.conf.TEMPLATE
@@ -0,0 +1 @@
+exten => |DEFAULTUSER|,1,Goto(default-incoming-call-context,s,1)
diff --git a/applications/luci-pbx/root/etc/pbx-asterisk/extensions_disa.conf.TEMPLATE b/applications/luci-pbx/root/etc/pbx-asterisk/extensions_disa.conf.TEMPLATE
index e799d52100..3dd8fa35c9 100644
--- a/applications/luci-pbx/root/etc/pbx-asterisk/extensions_disa.conf.TEMPLATE
+++ b/applications/luci-pbx/root/etc/pbx-asterisk/extensions_disa.conf.TEMPLATE
@@ -1,4 +1,6 @@
exten => |NUMBER|,1,Noop()
+exten => |NUMBER|,n,Set(TIMEOUT(digit)=7)
+exten => |NUMBER|,n,Set(TIMEOUT(response)=21)
exten => |NUMBER|,n,Authenticate(|PIN|)
exten => |NUMBER|,n,DISA(no-password,context-user-|DEFAULTUSER|)
diff --git a/applications/luci-pbx/root/etc/pbx-asterisk/extensions_incoming_context_gtalk.conf.TEMPLATE b/applications/luci-pbx/root/etc/pbx-asterisk/extensions_incoming_context_gtalk.conf.TEMPLATE
index dc0c68addc..f0ca37209e 100644
--- a/applications/luci-pbx/root/etc/pbx-asterisk/extensions_incoming_context_gtalk.conf.TEMPLATE
+++ b/applications/luci-pbx/root/etc/pbx-asterisk/extensions_incoming_context_gtalk.conf.TEMPLATE
@@ -8,4 +8,6 @@ same => n,Set(SOURCEEXTEN=|USERNAME|)
same => n,Goto(blacklist-call-context,s,1)
same => n(doneblacklist),NoOp()
same => n,Goto(disa-check-call-context,s,1)
-same => n(donedisacheck),Dial(|LOCALUSERS|,60,D(:w11111111))
+same => n(donedisacheck),Dial(|LOCALUSERS|,${RINGTIME},D(:w11111111))
+same => n,Goto(context-voicemail,s,1)
+
diff --git a/applications/luci-pbx/root/etc/pbx-asterisk/extensions_incoming_context_sip.conf.TEMPLATE b/applications/luci-pbx/root/etc/pbx-asterisk/extensions_incoming_context_sip.conf.TEMPLATE
index 12ecefc80f..1956007542 100644
--- a/applications/luci-pbx/root/etc/pbx-asterisk/extensions_incoming_context_sip.conf.TEMPLATE
+++ b/applications/luci-pbx/root/etc/pbx-asterisk/extensions_incoming_context_sip.conf.TEMPLATE
@@ -6,4 +6,5 @@ exten => s,n,Set(SOURCEEXTEN=s)
exten => s,n,Goto(blacklist-call-context,s,1)
exten => s,n(doneblacklist),NoOp()
exten => s,n,Goto(disa-check-call-context,s,1)
-exten => s,n(donedisacheck),Dial(|LOCALUSERS|,60,r)
+exten => s,n(donedisacheck),Dial(|LOCALUSERS|,${RINGTIME},r)
+exten => s,n,Goto(context-voicemail,s,1)
diff --git a/applications/luci-pbx/root/etc/pbx-asterisk/extensions_outgoing_dial_local_user.conf.TEMPLATE b/applications/luci-pbx/root/etc/pbx-asterisk/extensions_outgoing_dial_local_user.conf.TEMPLATE
index b81da9eab3..45e8758846 100644
--- a/applications/luci-pbx/root/etc/pbx-asterisk/extensions_outgoing_dial_local_user.conf.TEMPLATE
+++ b/applications/luci-pbx/root/etc/pbx-asterisk/extensions_outgoing_dial_local_user.conf.TEMPLATE
@@ -1 +1 @@
-exten => |DEFAULTUSER|,1,Dial(SIP/|DEFAULTUSER|,60,r)
+exten => |DEFAULTUSER|,1,Dial(SIP/|DEFAULTUSER|,${RINGTIME},r)
diff --git a/applications/luci-pbx/root/etc/pbx-asterisk/extensions_user_context_footer.conf.TEMPLATE b/applications/luci-pbx/root/etc/pbx-asterisk/extensions_user_context_footer.conf.TEMPLATE
index 7ce1060dc2..a2ba28c055 100644
--- a/applications/luci-pbx/root/etc/pbx-asterisk/extensions_user_context_footer.conf.TEMPLATE
+++ b/applications/luci-pbx/root/etc/pbx-asterisk/extensions_user_context_footer.conf.TEMPLATE
@@ -1 +1,2 @@
+include => context-voicemail-record-greeting
include => context-catch-all
diff --git a/applications/luci-pbx/root/etc/pbx-asterisk/extensions_voicemail_disabled.conf.TEMPLATE b/applications/luci-pbx/root/etc/pbx-asterisk/extensions_voicemail_disabled.conf.TEMPLATE
new file mode 100644
index 0000000000..be23c294df
--- /dev/null
+++ b/applications/luci-pbx/root/etc/pbx-asterisk/extensions_voicemail_disabled.conf.TEMPLATE
@@ -0,0 +1,4 @@
+[context-voicemail-record-greeting]
+
+[context-voicemail]
+exten => s,1,Hangup()
diff --git a/applications/luci-pbx/root/etc/pbx-asterisk/extensions_voicemail_enabled.conf.TEMPLATE b/applications/luci-pbx/root/etc/pbx-asterisk/extensions_voicemail_enabled.conf.TEMPLATE
new file mode 100644
index 0000000000..e4b34b5b0d
--- /dev/null
+++ b/applications/luci-pbx/root/etc/pbx-asterisk/extensions_voicemail_enabled.conf.TEMPLATE
@@ -0,0 +1,15 @@
+[context-voicemail-record-greeting]
+exten => *789,1,Wait(2)
+exten => *789,n,Playback(/etc/pbx-voicemail/greeting)
+exten => *789,n,Wait(5)
+exten => *789,n,Record(/etc/pbx-voicemail/greeting:WAV,20,90,k)
+exten => *789,n,Wait(2)
+exten => *789,n,Playback(/etc/pbx-voicemail/greeting)
+
+[context-voicemail]
+exten => s,1,Wait(2)
+exten => s,2,Playback(/etc/pbx-voicemail/greeting)
+exten => s,3,Wait(2)
+exten => s,n,Record(/tmp/voicemail%d:WAV,20,180,k)
+
+exten => h,1,System(/etc/pbx-voicemail/pbx-send-voicemail '${RECORDED_FILE}.WAV' '${CALLERID(all)}' &)
diff --git a/applications/luci-pbx/root/etc/pbx-asterisk/modules.conf.TEMPLATE b/applications/luci-pbx/root/etc/pbx-asterisk/modules.conf.TEMPLATE
index 3594dad433..899e330dd1 100644
--- a/applications/luci-pbx/root/etc/pbx-asterisk/modules.conf.TEMPLATE
+++ b/applications/luci-pbx/root/etc/pbx-asterisk/modules.conf.TEMPLATE
@@ -18,9 +18,11 @@ load => codec_gsm.so ; GSM/PCM16 (signed linear) Codec Translat - Requires N/A
load => codec_ulaw.so ; Mu-law Coder/Decoder - Requires N/A
load => format_gsm.so ; Raw GSM data - Requires N/A
load => format_pcm.so ; Raw uLaw 8khz Audio support (PCM) - Requires N/A
+load => format_wav_gsm.so
load => app_dial.so ; Dialing Application - Requires res_features.so, res_musiconhold.so
load => app_parkandannounce.so ; Call Parking and Announce Application - Requires res_features.so
load => app_playback.so ; Sound File Playback Application - Requires N/A
+load => app_record.so ; Sound File Record Application - Requires N/A
load => app_system.so ; Execute a system command - Requires N/A
load => app_disa.so ; Direct Inward System Access
load => app_authenticate.so ; Authenticate via pin