[Asterisk-Users] Voicemail => SMS

David Woodhouse dwmw2 at infradead.org
Mon Jul 11 05:43:12 MST 2005


On Thu, 2005-06-30 at 23:34 -0700, snacktime wrote:
> The manager action MailboxCount gives the number of old and new
> messages in a mailbox.  You would have to call the manager via an agi
> but it would give you the info you want.

The count is given as an argument to the voicemailnotify program. I just
have this in voicemail.conf...

	externnotify=/etc/asterisk/voicemailnotify.sh

... and a trivial shell script which does something like this...

	#!/bin/sh

	logger voicemail $@

	MOBILE_NR=07976xxxxxxx

	if [ "$3" = "0" ]; then
	        smsq --dcs=0xc0 $MOBILE_NR ""
	else
	        smsq --dcs=0xc8 $MOBILE_NR ""
	fi

I've hardcoded the phone number but the mailbox identity is in $2 when
the script is invoked, so it wouldn't be hard to look it up from a
table.

-- 
dwmw2




More information about the asterisk-users mailing list