#! /bin/sh ## ## vboxmail v2.0.0BETA5 (17-NOV-98) #----------------------------------------------------------------------------# # Script to notify a user about new incoming voice message. This is only a # # *example* - you can modify it if you like! If you do, copy it to # # /etc/isdn/vboxmail and edit it there. # # # # Usage: vboxmail MESSAGENAME CALLERNAME CALLERID MAIL-TO-ADDRESS # #----------------------------------------------------------------------------# if [ "$0" != /etc/isdn/vboxmail -a -x /etc/isdn/vboxmail ]; then exec /etc/isdn/vboxmail "$@" echo "Can't execute /etc/isdn/vboxmail" fi MSNAME="${1}" CALLER="${2}" CALLID="${3}" MAILTO="${4}" if (test -f "${MSNAME}") then ( MIMEBOUNDARY="NextPart$$" echo "Mime-Version: 1.0" echo "Content-Type: multipart/mixed; Boundary=\"$MIMEBOUNDARY\"" echo "From: vboxmail <`/usr/bin/id -un`>" echo "To: ${MAILTO}" echo "Subject: New message from ${CALLER} (${CALLID})" echo "" echo "" echo "--$MIMEBOUNDARY" echo "Content-Type: text/plain" echo "Content-Disposition: inline" echo "Content-Transfer-Encoding: 7bit" echo "" /usr/bin/vboxmode $MSNAME echo "" echo "--$MIMEBOUNDARY" echo "Content-Type: audio/mp3" echo "Content-Transfer-Encoding: base64" echo "Content-Disposition: attachment; filename=\"message.mp3\"" echo "" /usr/bin/vboxtoau <$MSNAME | sox -t au - -t wav -r 44100 - | /usr/local/bin/lame - - | mimencode echo "" echo "" echo "--$MIMEBOUNDARY--" ) | /usr/sbin/sendmail -oi -t fi