Calling an external program after a voicemail is left...

aaelghat
Posts: 75
Member Since:
2007-01-15

I'd like to use the VAD (voice audio detection) feature of SoX after a voicemail is left to delete silence, touch tones, hang-up clicks etc. from the beginning and end of the voicemail recordings.

I know that I can reference the variable VM_MESSAGEFILE to get the path to the messagefile left by the caller and that I can call SoX using the system command, but where in the dialplan would I do that? Do I have dialplan control right after a voicemail is left? I also read about the externotify option in voicemail.conf to call an external program, but it doesn't look like it references the VM_MESSAGEFILE variable.

Any thoughts on how I can call SoX after a voicemail is left?

Thanks.



b14ck
Posts: 773
Member Since:
2009-03-03
There's actually something

There's actually something which can do exactly what you want easily. In your voicemail.conf file you can add the line:

externnotify=/path/to/some/script/blah.sh

or whatever, and whenever a voicemail is CHECKED or ADDED, that script will be ran. It'll pass in 3 paramaters (documented on voip-info.org), to help you along.

--

Randall Degges
Lead Developer, RCI Telecommunications
projectb14ck - http://projectb14ck.org/ - Weblog



aaelghat
Posts: 75
Member Since:
2007-01-15
Thanks for the response. I

Thanks for the response.

I had mentioned externnotify in my original post. The problem (I think) is that the three parameters that are passed are context,extension and number of messages. What I'd really like to pass is the VM_MESSAGEFILE parameter which provides the path of the recording which I need so that SoX knows which recording to act on.

Are there any other thoughts?



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.