For playback it's also possible to set your own local variables, which will be available on the PLAYBACK_STOP event. It's also possible to use the scoped variables, they are visible in CHANNEL_EXECUTE and CHANNEL_EXECUTE_COMPLETE - for that specific execution only. See http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_playback#Example_for_sp... and http://wiki.freeswitch.org/wiki/Channel_Variables#Scoped_Variables for more information. With the help of this you can make sure you only handle the right events, and not events created from other applications. /Peter ________________________________________ Från: freeswitch-users-bounces@lists.freeswitch.org [freeswitch-users-bounces@lists.freeswitch.org] för Michael Lutz [mytemike72@gmail.com] Skickat: den 1 april 2012 15:16 Till: 'FreeSWITCH Users Help' Ämne: Re: [Freeswitch-users] Api function to check if media is currently being played Peter, Thanks, yes I know how to handle the events, I was just wondering as I would expect such function to exist. Because I can imagine situations where the media which is being played is initiated by an (other) external connection (or the session) and does not always knows what or how many PLAYBACK_STOPS it should wait for... But for now, for me this will do!, Thanks for your response. Regards, Mike. -----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Peter Olsson Sent: zondag 1 april 2012 15:01 To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Api function to check if media is currently being played You will need to poll the events coming in. When the file playback is finished it will return an event. To make it easy, just log all events coming in to start with, and after that try to handle it accordingly. /Peter ________________________________ Från: freeswitch-users-bounces@lists.freeswitch.org [freeswitch-users-bounces@lists.freeswitch.org] för Michael Lutz [mytemike72@gmail.com] Skickat: den 1 april 2012 14:05 Till: 'FreeSWITCH Users Help' Ämne: [Freeswitch-users] Api function to check if media is currently being played Hi All, I am using an remote host to control my parked call using an inbound socket connection. I am sending “uuid_broadcast” to play an audio file to the call. Before it is being bridged. Everything works ok. The problem is I need to continue my code (ESL) to instruct the bridge etc, but I need to do that when the audio file being played is finished. Is there an api function for this? I tried “uuid_buglist” to check if that would return me some useful data, but that doesn’t seem to be working (at least for what I need ..) Is the something like “uuid_mediaReady” ? show api didn’t show me something similar.. Thanks!, Mike. Ps. I believe tricking with checking file length of al wavs and calculating the duration upfront would not be the way doing this… ;-) _________________________________________________________________________ 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 _________________________________________________________________________ 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 !DSPAM:4f7854a532765776788417!