[Freeswitch-users] Passing user variables to mod_voicemail

Mark Campbell-Smith mcampbellsmith at gmail.com
Thu Dec 10 20:10:26 PST 2009


Hi!

My voip provider provides a SOAP interface to be able to send SMS's,
so after a voicemail is left, I want to execute a 'send sms' script.
I don't want a separate statement in the dialplan after the voicemail
statement because I only want to send sms's when a voicemail is
actually left.

The way I was going to do this was to modify the mailer-app to point
to a shell script and modify the mailer-app-args to include some user
defined variables (in conf/directory/default/*.xml).

    <param name="mailer-app" value="/usr/local/freeswitch/scripts/emailvm.sh"/>
    <param name="mailer-app-args" value="${smsaccount} ${smspassword}
${smsnumber}"/>

The shell script would do the following:

emailvm.sh

#$1 $2 $3 = smsaccount smspassword textmessage
tee /tmp/vmmail | /usr/sbin/sendmail -t
exec /usr/local/freeswitch/scripts/sendsms.pl $1 $2 $3
#echo $1 $2 $3 $4 $5 $6 >> /usr/local/freeswitch/scripts/log.log

However, if I uncomment the last line, I never see the user variables
being passed to the shell script.  The email is sucessfully sent, but
the sms script doesnt work.  If fact, the output of log.log is (for
example):

-f 1001 at 192.168.1.120 email_address at domain.com

Any ideas if it is possible to pass user variables via mod_voicemail
in this way?

Thanks




More information about the FreeSWITCH-users mailing list