[asterisk-users] Custom Voicemail emails

Steve Edwards asterisk.org at sedwards.com
Mon Sep 22 13:30:00 CDT 2008


On Thu, 18 Sep 2008, Steve Anness wrote:

> So here is the deal. I have an Asterisk server here at work that I
> have recently taken over and the boss is wanting the server to do a
> lot of things that it didn't do before. I have already configured much
> of what he wanted including a voice messaging line where anyone can
> call in and leave a message and then he would get that message in his
> email. However, the boss wants his email subject to read something
> like "This is an urgent message through the HISG voice messaging
> system" so he knows that that message came through that number as
> opposed to his voicemail box that already gets forwarded there. The
> default is the "[PBX]: New Message 10 in mailbox 0307". At second
> glance he would know which voicemail box is his line but he wants
> things to be different and so I am trying to make that happen.
>
> I know there is the 'emailsubject' option. I haven't tried this yet
> but my concern is that it will set the subject the same on every
> single box (obviously what the command is designed for). I can I
> customize a voicemail message so that if something comes in on our
> 0307 line it has a certain message and then we might get a message on
> 1942 line that we want a different subject.

The text file that accompanies the voicemail 
(/var/spool/asterisk/voicemail/default/xxxx/INBOX/msg0000.txt) contains a 
bunch of useful stuff:

 	[message]
 	origmailbox=xxxx
 	context=macro-stdexten
 	macrocontext=from-xxxxxxxx.net
 	exten=s-NOANSWER
 	priority=1
 	callerchan=SIP/sedwards-08d04618
 	callerid="xxxxxxxxxx" <xxxxxxxxxx>
 	origdate=Mon Sep 22 11:22:26 AM PDT 2008
 	origtime=1222107746
 	category=
 	duration=6

Could you invoke a "wrapper script" using mailcmd (in voicemail.conf) to 
extract "origmailbox" and base your "custom" subject header based on that?

I've never done this, but would like to know if it worked :)

Thanks in advance,
------------------------------------------------------------------------
Steve Edwards      sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                             Fax: +1-760-731-3000



More information about the asterisk-users mailing list