[Freeswitch-users] Remove scheduled broadcast in javascript
Matt Broad
matt at inveroak.com
Tue Jul 30 11:32:11 MSD 2013
Thanks Michael, I'll take a look and give it a try.
thanks
Matt
On 29/07/2013 16:45, Michael Collins wrote:
>
>
>
> On Mon, Jul 29, 2013 at 6:11 AM, Matt Broad <matt at inveroak.com
> <mailto:matt at inveroak.com>> wrote:
>
> Hi Anthony,
> just an update to say that the change you made works perfectly!
>
> Just to outline, Using javascript I first set a scheduled
> broadcast for x seconds time (which in this case will also end the
> call). If something occurs before this broadcast, the broadcast
> should be canceled.
>
> To do this I used the following javascript:
>
> //set the broadcast to play and then end the call
> session.execute("sched_broadcast", "+60
> playback!normal_clearing::/sounds/callending.mp3 both");
>
> //I now need to get the task ID for this broadcast
> var endCallBroadcastTaskID = session.getVariable("last_sched_id");
>
> //now check for something. if something happend then cancel the
> broadcast using the taskid collected previously
> if (somethingHappened == true)
> {
> session.execute("sched_cancel",endCallBroadcastTaskID);
> }
>
> I will happily add to the wiki to include this change/addition,
> but will need a few pointers in doing so. Is there a page on the
> wiki explaining how to do this?
>
>
> We have an introduction page here:
> https://wiki.freeswitch.org/wiki/Documentation_Guidelines
>
> We use Mediawiki which is the same software used by Wikipedia. In your
> case it looks like you just need to update an existing page which is
> easier than trying to create a new one from scratch. Be sure to
> request a wiki account from the login screen if you don't already have
> one.
>
> -MC
>
>
> thanks
> Matt
>
>
> --
> Michael S Collins
> Twitter: @mercutioviz
> http://www.FreeSWITCH.org
> http://www.ClueCon.com
> http://www.OSTAG.org
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
>
>
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130730/ca7e1912/attachment-0001.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list