I've never tried exactly this scenario but I think you can use uuid_break to stop the playback of the current call. Use the "all" flag to discard the playback of all sound files that are currently queued up to be played to the channel.

http://wiki.freeswitch.org/wiki/Mod_commands#uuid_break

Let us know if that works... and welcome to FreeSWITCH, btw! Oh, and be sure to send future questions like this to the freeswitch-users list because you'll have a wider audience and will probably get a quicker response. The -dev list is more for digging deeper into the code, like the C code, etc. :)

-MC

On Mon, Jul 2, 2012 at 12:55 PM, Leonardo <leonardo@daitangroup.com> wrote:
Hi.
I'm newbie in FreeSwitch and I'm trying to develop an application using mod_socket interface.
First, I configured the FreeSwitch to answer any call coming from my gateway:

    (dialplan/public.xml)
    <include>
        <extension name="from_my_gateway">
            <condition field="network_addr" expression="192\.231\.7\.123" >
                <action application="answer"/>
                <action application="sleep" data="50000"/>
            </condition>
        </extension>
    </include>

After that I could play an audio in a call via mod_socket interface:

    api uuid_broadcast b5bd30fb-cd3e-4f13-a975-5be0aef6a0f7 /usr/local/freeswitch/sounds/music/8000/danza-espanola-op-37-h-142-xii-arabesca.wav both
 
So far so good ...
Than I would like to stop the current audio file and play something else.
How could I do that?

I already tried to play another audio file before the first one stop. Nothing happened.
I tried to stop the current audio using:
    api uuid_fileman b5bd30fb-cd3e-4f13-a975-5be0aef6a0f7 stop
but the call was HANGUP

Thanks in advance,
Leo