From f932acab1040123bbf782c687023f307567883ae Mon Sep 17 00:00:00 2001 From: Iordan Iordanov Date: Thu, 1 Dec 2011 22:14:14 +0000 Subject: 1) Added sounds needed for authentication app. 2) Added license and attribution for sounds 3) Added linking sounds into the asterisk sounds directory. --- applications/luci-pbx/root/etc/init.d/pbx-asterisk | 24 ++++++++++++++++++++- .../etc/pbx-asterisk/sounds/agent-alreadyon.gsm | Bin 0 -> 8943 bytes .../root/etc/pbx-asterisk/sounds/auth-thankyou.gsm | Bin 0 -> 1353 bytes 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 applications/luci-pbx/root/etc/pbx-asterisk/sounds/agent-alreadyon.gsm create mode 100644 applications/luci-pbx/root/etc/pbx-asterisk/sounds/auth-thankyou.gsm (limited to 'applications/luci-pbx/root') 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 Binary files /dev/null and b/applications/luci-pbx/root/etc/pbx-asterisk/sounds/agent-alreadyon.gsm 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 Binary files /dev/null and b/applications/luci-pbx/root/etc/pbx-asterisk/sounds/auth-thankyou.gsm differ -- cgit v1.2.3