summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-pbx-voicemail/root/etc/pbx-voicemail
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-pbx-voicemail/root/etc/pbx-voicemail')
-rwxr-xr-xapplications/luci-pbx-voicemail/root/etc/pbx-voicemail/pbx-move-greeting6
-rwxr-xr-xapplications/luci-pbx-voicemail/root/etc/pbx-voicemail/pbx-send-voicemail10
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 000000000..21fe69414
--- /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 adfded231..ba639d01a 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.