summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-pbx/root
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-pbx/root')
-rwxr-xr-xapplications/luci-pbx/root/etc/init.d/pbx-asterisk24
-rw-r--r--applications/luci-pbx/root/etc/pbx-asterisk/sounds/agent-alreadyon.gsmbin0 -> 8943 bytes
-rw-r--r--applications/luci-pbx/root/etc/pbx-asterisk/sounds/auth-thankyou.gsmbin0 -> 1353 bytes
3 files changed, 23 insertions, 1 deletions
diff --git a/applications/luci-pbx/root/etc/init.d/pbx-asterisk b/applications/luci-pbx/root/etc/init.d/pbx-asterisk
index 5812b3a73..0c41833cf 100755
--- a/applications/luci-pbx/root/etc/init.d/pbx-asterisk
+++ b/applications/luci-pbx/root/etc/init.d/pbx-asterisk
@@ -31,9 +31,12 @@ ASTUSER=nobody
ASTGROUP=nogroup
ASTDIRSRECURSIVE="/var/run/asterisk /var/log/asterisk /var/spool/asterisk"
ASTDIRS="/usr/lib/asterisk"
+ASTSOUNDSDIR="/usr/lib/asterisk/sounds"
TEMPLATEDIR=/etc/${MODULENAME}-asterisk
+PBXSOUNDSDIR=$TEMPLATEDIR/sounds
VMTEMPLATEDIR=/etc/${MODULENAME}-voicemail
+VMSOUNDSDIR=$VMTEMPLATEDIR/sounds
ASTERISKDIR=/etc/asterisk
WORKDIR=/tmp/$MODULENAME.$$
MD5SUMSFILE=/tmp/$MODULENAME-sums.$$
@@ -575,6 +578,22 @@ pbx_cook_rtp_template()
sed "s/|RTPEND|/$rtpend/" > $WORKDIR/rtp.conf
}
+# Links any sound files found in $PBXSOUNDSDIR and $VMSOUNDSDIR
+# into $ASTSOUNDSDIR for use by Asterisk. Does not overwrite files.
+pbx_link_sounds()
+{
+ mkdir -p $ASTSOUNDSDIR
+
+ for dir in $PBXSOUNDSDIR $VMSOUNDSDIR ; do
+ if [ -d $dir ] ; then
+ for f in $dir/* ; do
+ ln -s $f $ASTSOUNDSDIR 2>/dev/null
+ done
+ fi
+ done
+}
+
+
# Makes sure the ownership of specified directories is proper.
pbx_fix_ownership()
{
@@ -667,13 +686,16 @@ start() {
# Prepare voicemail config.
config_unset
config_load ${MODULENAME}-voicemail
- pbx_configure_voicemail
+ pbx_configure_voicemail
# Assemble the configuration, and copy changed files over.
config_unset
config_load ${MODULENAME}-advanced
pbx_assemble_and_copy_config
+ # Link sound files
+ pbx_link_sounds
+
# Enforce ownership of specified files and directories.
pbx_fix_ownership
}
diff --git a/applications/luci-pbx/root/etc/pbx-asterisk/sounds/agent-alreadyon.gsm b/applications/luci-pbx/root/etc/pbx-asterisk/sounds/agent-alreadyon.gsm
new file mode 100644
index 000000000..83fe27ecf
--- /dev/null
+++ b/applications/luci-pbx/root/etc/pbx-asterisk/sounds/agent-alreadyon.gsm
Binary files differ
diff --git a/applications/luci-pbx/root/etc/pbx-asterisk/sounds/auth-thankyou.gsm b/applications/luci-pbx/root/etc/pbx-asterisk/sounds/auth-thankyou.gsm
new file mode 100644
index 000000000..93f936d1a
--- /dev/null
+++ b/applications/luci-pbx/root/etc/pbx-asterisk/sounds/auth-thankyou.gsm
Binary files differ