<div dir="ltr">On Mon, Oct 21, 2013 at 2:21 PM, Ali Pey <span dir="ltr"><<a href="mailto:alipey@gmail.com" target="_blank">alipey@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div>I need to send a customized voicemail notification based on certain condition once a voicemail is recorded.<br></div></div></blockquote><div><br></div><div>I did this externally to FreeSWITCH by sending the vm-notify to a perl script.</div>
<div><br></div><div>We run FreeSWITCH on CentOS, so it was easy to set up an email address that I called "vm-page". For this notification, I didn't need the audio file, so I used vm-notify instead of vm-mailto. In my directory file, I used this:</div>
<div><br></div><div><div> <param name="vm-notify-mailto" value="vm-page"/></div><div> <param name="vm-notify-email-all-messages" value="true"/></div></div><div>
<br></div><div>In /etc/aliases, I have this:</div><div><br></div><div><div># Paging notify from phone system</div><div>vm-page: "|/etc/smrsh/vm-page"</div></div><div><br></div><div>And /etc/smrsh/vm-page is a perl script that parses the message, looking for the 'From' line (which contains the caller-ID info), the 'Return-Path' header (which contains the voice mailbox number), the 'X-Priority' line (which can identify an urgent message), and the 'X-Voicemail-Length' header.</div>
<div><br></div><div>In our system, this script parses this stuff, reformats it, and then sends it through an email-to-SMS gateway at <a href="http://vtext.com">vtext.com</a>.</div><div><br></div><div>-- </div><div>Steve</div>
</div><br></div></div>