Hello Steve,

Thank you for the response.

My problem is that I can't find the file name in anyway. I use api_hangup_hook and can see all the relevant information but don't know how to find the filename.

I am also able to set custom variables to the channel so I can see them in api_hangup_hook, but I can't find the voicemail filename anywhere.

Regards,
Ali Pey


On Tue, Oct 22, 2013 at 4:07 PM, Steven Schoch <schoch+freeswitch.org@xwin32.com> wrote:
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:

      <param name="vm-notify-mailto" value="vm-page"/>
      <param name="vm-notify-email-all-messages" value="true"/>

In /etc/aliases, I have this:

# Paging notify from phone system
vm-page:        "|/etc/smrsh/vm-page"

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.

-- 
Steve


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org