[Freeswitch-users] How to stop and replay an audio from thebeginning?

Kris kris at livecall.com
Sat Apr 9 05:27:25 MSD 2011


After the PlayAndGetDigits()  terminates on the *, loop around and play 
again with PlayAndGetDigits() . don't use displace.

----- Original Message ----- 
From: "Michael Collins" <msc at freeswitch.org>
To: "FreeSWITCH Users Help" <freeswitch-users at lists.freeswitch.org>
Sent: Friday, April 08, 2011 12:58 PM
Subject: Re: [Freeswitch-users] How to stop and replay an audio from 
thebeginning?


>I don't know if what you're doing is the optimal way or not, but I'm pretty
> sure that if you are playing a second file then you need to break out of
> playing the first file. Look at the uuid_break API for ideas on how to do
> that.
>
> -MC
>
> On Fri, Apr 8, 2011 at 11:51 AM, Frankie Yiu 
> <frankie.k.yiu at gmail.com>wrote:
>
>> Hi there,
>>
>> I would like to know what is the preferred way to do the following.
>> My application is this:  Make a phone call to a person, after the person
>> picks up the phone an message would play.  If he presses the * key, the
>> message would stop and start from the beginning again.  I am using C# to
>> start the call and play an audio using  PlayAndGetDigits() while in my 
>> C++
>> code would check the DTMF event.  If it finds a * key pressed, it will 
>> call
>> the uuid_displace with the same file (but for testing purpose, I am using
>> different file).  This is not working right because I can hear that the 
>> new
>> audio file is playing on top of the original audio instead of stopping 
>> the
>> original audio and play the new audio.
>>
>> Anyone has an idea how I should do this?
>>
>> Thanks in advance.
>>
>> Frankie
>>
>> _______________________________________________
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>>
> 




More information about the FreeSWITCH-users mailing list