Hi Michael, thanks for taking the time to reply. You're right, I hadn't realised that sched_del was api only :) I have tested sched_cancel and it works, but it removes all scheduled broadcasts that have been set. This is visible by calling "show tasks" from the fs_cli before and after the sched_cancel is called. Do you think there is a way of passing a task id to the application to cancel a specific broadcast? I can work around the issue by re-adding the other broadcasts, by calculating the duration of the call and subtracting that from the time passed to the sched_broadcast, but would be nicer to be able to cancel the one schedule :) I will be happy to update the wiki, though I may need a little guidance in doing so as I've not done so before. Again thanks for your time :) thanks Matt On 24/07/2013 23:35, Michael Collins wrote:
Hi Matt,
I hope you're willing to try a few things and report back. You're using session.execute to execute a dialplan application (sched_boradcast). However, sched_del is actually an API, not a dialplan application (i.e. you type sched_api blah blah at fs_cli). It just so happens that there are some dialplan apps that perform the same function as their API counterparts: sched_broadcast sched_hangup sched_transfer
However, there are some that are different: sched_del (API) vs. sched_cancel (dialplan app). If you're confused don't worry - it happens to everyone until they firmly grasp the difference between an API command and a dialplan application.
To remove the scheduled broadcast try this: session.execute("sched_cancel")
If it works then you can maybe add sched_cancel to the dptools wiki page <https://wiki.freeswitch.org/wiki/Mod_dptools#S>. :)
Let us know how it goes, Michael
On Wed, Jul 24, 2013 at 6:50 AM, Matt Broad <matt@inveroak.com <mailto:matt@inveroak.com>> wrote:
Hi,
is it possible to remove a sheduled broadcast within javascript?
I have: session.execute("sched_broadcast", "+60 /tmp/test.mp3 both");
But if for some reason I no longer need the broadcast to occur I need to delete it. Looking on the Wiki I have found "sched_del" but cannot see how to get the task id for the broadcast to implement it.
Any help would be appreciated.
thanks Matt
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto: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 <mailto: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
-- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.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