[Freeswitch-users] AVMD

Michael Collins msc at freeswitch.org
Tue Jul 17 00:38:33 MSD 2012


On Mon, Jul 16, 2012 at 1:26 PM, Henry Huang <red.rain.seven at gmail.com>wrote:

> Michael,
>
> I have also been looking into AVMD. The point being that I want to play
> some pre-recorded message once the phone is answered and start AVMD at the
> same time, and if the 'beep' is detected later during the call(say 10 sec.
> later). I want to be able to stop the original Playback and start a new
> Playback. Is there a way to do that?
>
Yes, but "some assembly required" as the saying goes. AVMD only throws
events, so whatever solution you are using must be able to consume and
react to those events. The OP is using Lua which definitely allows you to
consume the events. There's even a really simple example on the wiki about
using the setInputCallback function to look for "events" and then do
something once the event comes in. It's a really sparse example but it
demonstrates how to catch an event. From there you'd need to put in your
commands. I'm assuming you'll need a break app or uuid_break API to stop
the current playback and then you'll need to queue up another playback.
It's also good to turn off avmd at this point as well. I'm just throwing
this out there off the top of my head, so I highly recommend some hands on
tinkering.

Please let us know what you end up doing. :)

-MC

>
> Henry
>
> On Mon, Jul 16, 2012 at 11:32 AM, Michael Collins <msc at freeswitch.org>wrote:
>
>> Hi Ian,
>>
>> Just curious - at what point during the call are you currently launching
>> AVMD? In any case, this sounds like a perfect job for "execute_on_answer":
>> http://wiki.freeswitch.org/wiki/Channel_Variables#execute_on_answer
>>
>> Just be nice and don't abuse your new found powers! :)
>>
>> -MC
>>
>> P.S. - Welcome to the FreeSWITCH community.
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120716/12dc898b/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list