On Mon, Oct 21, 2013 at 2:21 PM, Ali Pey <alipey@gmail.com> wrote:
I need to send a customized voicemail notification based on certain condition once a voicemail is recorded.
I did this externally to FreeSWITCH by sending the vm-notify to a perl script.
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:
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.
In our system, this script parses this stuff, reformats it, and then sends it through an email-to-SMS gateway at vtext.com.