diff options
author | Iordan Iordanov <iiordanov@gmail.com> | 2013-03-09 22:52:53 +0000 |
---|---|---|
committer | Iordan Iordanov <iiordanov@gmail.com> | 2013-03-09 22:52:53 +0000 |
commit | a0183b2f75a772366336671a818707df3dc04e79 (patch) | |
tree | a93c028a0b361fd1181a5c4b3ce9d3afbbae8d6d /applications/luci-pbx-voicemail/root/etc | |
parent | 7021120936575df16a3af6606399504d42e73531 (diff) |
- added beep.gsm
- now escaping special characters in pbx-asterisk
- changed location of voicemail temp stuff and log file
- changed pbx-send-voicemail to use base64 instead of uuencode
- added many missing dependencies
- now allowing ip addresses as well as hostnames for external host
- constrained # seconds to ring to positive integers
- specifying externrefresh in sip.conf template
- fixed voicemail (sending recordings, recording new greeting, instructions)
- Implemented callback
Diffstat (limited to 'applications/luci-pbx-voicemail/root/etc')
-rwxr-xr-x | applications/luci-pbx-voicemail/root/etc/pbx-voicemail/pbx-move-greeting | 6 | ||||
-rwxr-xr-x | applications/luci-pbx-voicemail/root/etc/pbx-voicemail/pbx-send-voicemail | 10 |
2 files changed, 11 insertions, 5 deletions
diff --git a/applications/luci-pbx-voicemail/root/etc/pbx-voicemail/pbx-move-greeting b/applications/luci-pbx-voicemail/root/etc/pbx-voicemail/pbx-move-greeting new file mode 100755 index 0000000000..21fe69414b --- /dev/null +++ b/applications/luci-pbx-voicemail/root/etc/pbx-voicemail/pbx-move-greeting @@ -0,0 +1,6 @@ +#!/bin/sh + +if [ -f "/tmp/voicemail/greeting.gsm" ] +then + mv /tmp/voicemail/greeting.gsm /etc/pbx-voicemail/recordings/ +fi diff --git a/applications/luci-pbx-voicemail/root/etc/pbx-voicemail/pbx-send-voicemail b/applications/luci-pbx-voicemail/root/etc/pbx-voicemail/pbx-send-voicemail index adfded231a..ba639d01a9 100755 --- a/applications/luci-pbx-voicemail/root/etc/pbx-voicemail/pbx-send-voicemail +++ b/applications/luci-pbx-voicemail/root/etc/pbx-voicemail/pbx-send-voicemail @@ -19,10 +19,10 @@ # # # Thanks to http://www.zedwood.com for providing an excellent example of how to -# properly assemble an email message with a uuencoded attachment. +# properly assemble an email message with a base64 encoded attachment. # -LOGFILE=/tmp/last_sent_voicemail.log +LOGFILE=/tmp/voicemail/last_sent_voicemail.log # Redirect standard error and standard output to a log file. rm -f "$LOGFILE" @@ -58,8 +58,8 @@ REPLY="do-not-reply@pbx" SUBJECT="Voicemail from $CALLERID, $DATE, $TIME" MSGBODY="$CALLERID has left voicemail for you on $DATE at $TIME." MIMETYPE="audio/wav" -TMP1="/tmp/tmpemail1.$$"; -TMP2="/tmp/tmpemail2.$$"; +TMP1="/tmp/voicemail/tmpemail1.$$"; +TMP2="/tmp/voicemail/tmpemail2.$$"; BOUNDARY="`date +%s | md5sum | awk '{print $1}'`" FILENAME="voicemail-$DATE-$TIME.WAV" @@ -97,7 +97,7 @@ append_to_file $TMP2 "" # Cat everything together and pass to msmtprc to send out. ( cat $TMP1 - cat "$ATTACHMENT" | uuencode --base64 /dev/stdout | sed -e '1,1d' -e '$d' + cat "$ATTACHMENT" | base64 cat $TMP2 ) | msmtp -t -C /etc/pbx-msmtprc # Clean up email temp files. |