Asterisk message notifacation
#1
Posted 25 September 2005 - 12:23 AM
I'm asking for a little bit of help with this.
What I want to do is, everytime I recieve a new Voicemail on my asterisk server I want to have a email or sms sent to my cellphone.
So it would probally be something like
exten => 4,1,Voicemail
exten => 4,2,Sendemail (heh)
The reason being is my cellphone is hotlinked with the HLR so I can't send sms messages with my phone or make/recieve calls but I can recieve SMS and emails
to my handset for free. So I want to utilize this since I have no phone at home for the time being.
What I want to do is after the vm is left I want the calling party number sent to my phone. I figure I would have to use the DBput and DBget commands but I can't get it done right. Anyone have the time to help..? It might be easier just to run an AGI but I dunno.
late
#2
Posted 25 September 2005 - 12:52 AM
#4
Posted 25 September 2005 - 02:24 AM
Ok yo, my computer is still down and I don't have very much time these days online. What I want to do is very simple but I'm having a bit of trouble getting it done.
I'm asking for a little bit of help with this.
What I want to do is, everytime I recieve a new Voicemail on my asterisk server I want to have a email or sms sent to my cellphone.
So it would probally be something like
exten => 4,1,Voicemail
exten => 4,2,Sendemail (heh)
The reason being is my cellphone is hotlinked with the HLR so I can't send sms messages with my phone or make/recieve calls but I can recieve SMS and emails
to my handset for free. So I want to utilize this since I have no phone at home for the time being.
What I want to do is after the vm is left I want the calling party number sent to my phone. I figure I would have to use the DBput and DBget commands but I can't get it done right. Anyone have the time to help..? It might be easier just to run an AGI but I dunno.
late
no no guys, just trying to send a email or sms to my celly for notification of recieving a vm on my asterisk server, and my celly doesnt recieve incoming calls, using either a cron job to send the email or using an asterisk app.
heh strom you think that sentence was a run on..? :)
...
#5
Posted 25 September 2005 - 02:24 AM
exten => s,1,system(sendmail ${EMAILTO}, ${CALLERIDNUM})
exten => s,2,VoicemailMain
Of course, you need sendmail installed.
This will only tell you when people call though, not if they leave a message.
Edit: I just found this http://mikecathey.com/code/vmnotify/
Edited by darkslider, 25 September 2005 - 02:27 AM.
#6
Posted 25 September 2005 - 02:30 AM
what your asking is a good question and i would like to know how to do this with asterisk as well. im guessing the system command is really the way to go as you could execute sendmail or mail or whatever command line email prog you want.
#7
Posted 25 September 2005 - 02:50 AM
EMAILTO=7005554141@verizonsucks.edu
exten => s,1,system(sendmail ${EMAILTO}, ${CALLERIDNUM})
exten => s,2,VoicemailMain
Of course, you need sendmail installed.
This will only tell you when people call though, not if they leave a message.
Edit: I just found this http://mikecathey.com/code/vmnotify/
Thank you sir
fjear
#8
Posted 25 September 2005 - 04:29 AM
So this might be a better way to do it.
exten => s,1,system(echo hey, ${CALLERIDNUM} just called you >> sendme.txt)
exten => s,2,system(less sendme.txt | sendmail 7005554141@verizonsucks.net)
exten => s,2,VoicemailMain
Edited by darkslider, 25 September 2005 - 04:29 AM.
#9
Posted 25 September 2005 - 04:34 AM
2000 => xxxxx,Strom,stromcarlson@gmail.com,tz=pacific,attach=yes
Then, in your extensions.conf:
exten => 3115552368,1,Voicemail(2000)
EASY AS PIE.
#10
Posted 25 September 2005 - 05:12 AM
you can set this up in the voicemail.conf as follows so it will actually send you the recorded voicemail as an attachment:
2000 => xxxxx,Strom,stromcarlson@gmail.com,tz=pacific,attach=yes
Then, in your extensions.conf:
exten => 3115552368,1,Voicemail(2000)
EASY AS PIE.
heh I reconize that number strom
from one of the doorbell tapes when he was in canada calling bill with the call intercept that was forwarded to pass the CPN shown above, but... bill didnt see it.
I'm doing this now I wonder if it will send the CPN of the caller..? /me finding out.
#11
Posted 25 September 2005 - 05:20 AM
heh I reconize that number strom
from one of the doorbell tapes when he was in canada calling bill with the call intercept that was forwarded to pass the CPN shown above, but... bill didnt see it.
I'm doing this now I wonder if it will send the CPN of the caller..? /me finding out.
(311) 555-2368 is the fake number that AT&T used in its ads from at least 1953 through 1984. There are ads dating back to at least the 1940s that have numbers which end "2368." The use of it by us phreaks is merely an inside joke
And yes, that should pass the CPN in the e-mail message.
#12
Posted 25 September 2005 - 10:13 AM
#13
Posted 25 September 2005 - 10:41 AM
If it's a conversation you want, I could see two possibilities. The first is to modify the code for app voicemail() so that it (your new asterisk app) records both sides of the conversation and emails the resulting file just like app voicemail() does now. The second possibility is to use app monitor() to record the call, then email that file. A couple problems with this would be that app monitor() records both sides of the conversation separately, so you would have to combine the files before emailing. The other problem is making the email message.hey does anyone know how you could record a conversation and then once the call is through, have the conversation emailed to you? ive never attached anything to an email sent through the command line before.
From sendmail.org:
Most of the MUAs listed there are graphical, user-driven environments...Subject: Q4.15 -- How do I create attachments with sendmail?
You don't. Sendmail is a mail transfer agent (MTA). Creating e-mail messages, including adding attachments or signatures, is the function of a mail user agent (MUA). Some popular MUAs include mutt, elm, exmh, Netscape, Eudora and Pine. Some specialized packages (metamail, some Perl modules, etc.) can also be used to create messages with attachments.
Edit:
So that solves one of the problems...If flags contains the letter m, then when recording finishes, Asterisk will execute a unix program to combine the two sound files into a single sound file.
Then I found this app, I think it's only in CVS. Basically it records both sides to only one specified file...
http://bugs.digium.c...iew.php?id=4735
That would be handy because you can specify the filename so your MUA can always find the file.[Description]
MuxMon(<file>.<ext>[|<options>[|<command>]])
Ok last edit I promise
Check this MUA out:
http://www.mutt.org/doc/man_page.html
Edited by BlakeOPS, 25 September 2005 - 10:53 AM.
#14
Posted 25 September 2005 - 11:42 AM
edit: got it. $ mutt -s "subject" -a whatever.wav all@friends.org \
< body.txt
so you could easily have a box send you an email (forwarded to a cell phone so it works like an sms) everytime you got an incoming call or something by using the system command.
i want to figure out how to convert gsms and wavs to mp3s using sox now!
#15
Posted 25 September 2005 - 12:37 PM
Convert the file you want attached to a UUENCODEd file.
uuencode input.JPG dummy.file >> output.TXT
or
exten => s,1,system(uuencode input.JPG dummy.file >> ${CALLERIDNUM}.TXT)So it makes the attachment have the callers number.Which will put the encoded JPG in (callersnumberhere).TXT. It will look something like this:
begin 644 800-555-8355.TXT
M4DE&1E)[``!7059%9FUT(!`````!``$`P!(``,`2```!``@`9F%C=`0```#8
M>@``9&%T8=AZ``"`?X"`?W]_?X"!@8&!@H*"@H.!@(&!@8&"@8"`@("`?X"`
M?W]_?W]_?W^`?X"`@("`?WY_?GY]>WIZ>WMZ>GUZ>WIZ>GIZ>7EY>7IZ>GMZ
M>GI[>WMZ>GM[?7Y]?7Y]?GY_?W]_?X"`?X!_@("`@8&!@8&"@H*!@("!@(!_
A($-R86EG+"!H='1P.B\O=W=W+F=O;&1W879E+F-O;0``
`
end
Then, send it using a system call to sendmail.
#16
Posted 25 September 2005 - 12:53 PM
#17
Posted 25 September 2005 - 04:10 PM
#18
Posted 25 September 2005 - 04:54 PM
#19
Posted 26 September 2005 - 04:03 AM
you can set this up in the voicemail.conf as follows so it will actually send you the recorded voicemail as an attachment:
2000 => xxxxx,Strom,stromcarlson@gmail.com,tz=pacific,attach=yes
Then, in your extensions.conf:
exten => 3115552368,1,Voicemail(2000)
EASY AS PIE.
hmm... It still isn't sending anything at all?
I wonder is there any other config files I need to touch?
I'm using qmail for the mail server on gentoo.
thanks again for everyones responses.
late
Oh and strom I like j0r shirt but mine is still cooler
BinRev is hosted by the great people at Lunarpages!












