header image
Home arrow Technical Notes arrow Tech Notes arrow Tweet your Asterisk Voicemail notification
Tweet your Asterisk Voicemail notification PDF Print E-mail

UPDATED

You cant get away from it, Twitter that is, Everyone is either tweeting or writing about tweeting, Just sticking twitter into search on the BBC website and you will get over 500 unique results from the BBC alone. Stephen Fry has over a million followers ! .

So I thought that there must be something else that this could be used for, And it came to me "Asterisk Voicemail Notification" Obviously you don't want everyone to know you have a voicemail (Well I hope not) but this is easily solved by creating a private account for the server that only selected followers can see, and then send the notifications as "Direct Messages", Easy I thought and to be honest it was.

Then Twitter up'd their game by introducing oauth, This added a extra level of complication.

but now I am posting details of a way to Tweet notifications using Oauth

Firstly you need a some bits of code to post the tweets and authenticate using oauth. This is well documented and the version we have used is here.


Thanks to Scott Wilcox < > http://dor.ky  for the oauth libraries


Next we need the code for Asterisk to say it has a message, We have added this to our 'h' extension of the of the std-exten-macro you could add it where you want. The user that the tweet is sent to is stored in the ASTDB and recalled and assigned to the variable ${destacc}


Asterisk Dialplan:-

System(/var/www/.webcall/twitter/apps/astertweet.sh  ${destacc} "You have Voicemail number ${nvmcount}, from ${CALLERID(num)} on ${STRFTIME(${EPOCH},,%d/%m at %H:%M)}")


astertweet.sh :-


#!/bin/sh
PATH=//var/www/html/twitter/apps
MYUSER=$1
MYMESSAGE=$2
CALLERIDNUM=$3
cd $PATH
./cli-status-update.php "d $MYUSER $MYMESSAGE"

 

 

 

 

 

 

 

 

 

 

 





This does rely on using a compatible dialplan, which on request I can make available, We already had it in place as we already notify new voicemails by SMS

There are many other uses for this and your imagination is the only hurdle now to getting your Asterisk Tweeting, For example we are also tweeting Missed calls and callback requests.

Copies of teh other required files are avalible here

Sip attacks are on the increase, Read or article on Sip security and look at the ITSPA document as well to make sure you are secure

images/stories/gaplogoweb.jpg

Skype Me™!

EFM Broadband
Number Porting
Asterisk
Technical Notes
User Guides
Case studies
System Monitoring
Suppliers
Blog