<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Michael,<br>
    <br>
    thanks for taking the time to reply.<br>
    You're right, I hadn't realised that sched_del was api only :)<br>
    <br>
    I have tested sched_cancel and it works, but it removes all
    scheduled broadcasts that have been set.<br>
    This is visible by calling "show tasks" from the fs_cli before and
    after the sched_cancel is called.<br>
    <br>
    Do you think there is a way of passing a task id to the application
    to cancel a specific broadcast?<br>
    <br>
    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 :)&nbsp; <br>
    <br>
    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.<br>
    <br>
    Again thanks for your time :)<br>
    <br>
    thanks<br>
    Matt<br>
    <br>
    <div class="moz-cite-prefix">On 24/07/2013 23:35, Michael Collins
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAKzWOxWpsj_EQuu2OamCQP+qwaWnUu5apb8UxcUUTFGV4WeaMQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>
                <div>
                  <div>
                    <div>
                      <div>Hi Matt,<br>
                        <br>
                      </div>
                      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:<br>
                    </div>
                    sched_broadcast<br>
                  </div>
                  sched_hangup<br>
                  sched_transfer<br>
                  <br>
                </div>
                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.<br>
                <br>
              </div>
              To remove the scheduled broadcast try this:<br>
            </div>
            session.execute("sched_cancel")<br>
            <br>
          </div>
          If it works then you can maybe add sched_cancel to the <a
            moz-do-not-send="true"
            href="https://wiki.freeswitch.org/wiki/Mod_dptools#S">dptools
            wiki page</a>. :)<br>
          <br>
        </div>
        <div>Let us know how it goes,<br>
        </div>
        <div>Michael<br>
          <br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On Wed, Jul 24, 2013 at 6:50 AM, Matt
          Broad <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:matt@inveroak.com" target="_blank">matt@inveroak.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
            <br>
            is it possible to remove a sheduled broadcast within
            javascript?<br>
            <br>
            I have:<br>
            session.execute("sched_broadcast", "+60 /tmp/test.mp3
            both");<br>
            <br>
            But if for some reason I no longer need the broadcast to
            occur I need to<br>
            delete it. &nbsp;Looking on the Wiki I have found "sched_del" but
            cannot see<br>
            how to get the task id for the broadcast to implement it.<br>
            <br>
            Any help would be appreciated.<br>
            <br>
            thanks<br>
            Matt<br>
            <br>
            <br>
_________________________________________________________________________<br>
            Professional FreeSWITCH Consulting Services:<br>
            <a moz-do-not-send="true"
              href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
            <a moz-do-not-send="true"
              href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
            <br>
            FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
            <a moz-do-not-send="true" href="http://www.cudatel.com"
              target="_blank">http://www.cudatel.com</a><br>
            <br>
            Official FreeSWITCH Sites<br>
            <a moz-do-not-send="true" href="http://www.freeswitch.org"
              target="_blank">http://www.freeswitch.org</a><br>
            <a moz-do-not-send="true" href="http://wiki.freeswitch.org"
              target="_blank">http://wiki.freeswitch.org</a><br>
            <a moz-do-not-send="true" href="http://www.cluecon.com"
              target="_blank">http://www.cluecon.com</a><br>
            <br>
            FreeSWITCH-users mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
            <a moz-do-not-send="true"
              href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
              target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
            UNSUBSCRIBE:<a moz-do-not-send="true"
              href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
              target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
            <a moz-do-not-send="true" href="http://www.freeswitch.org"
              target="_blank">http://www.freeswitch.org</a><br>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <br>
        -- <br>
        Michael S Collins<br>
        Twitter: @mercutioviz<br>
        <a moz-do-not-send="true" href="http://www.FreeSWITCH.org"
          target="_blank">http://www.FreeSWITCH.org</a><br>
        <a moz-do-not-send="true" href="http://www.ClueCon.com"
          target="_blank">http://www.ClueCon.com</a><br>
        <a moz-do-not-send="true" href="http://www.OSTAG.org"
          target="_blank">http://www.OSTAG.org</a><br>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
<a class="moz-txt-link-abbreviated" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a>

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
<a class="moz-txt-link-freetext" href="http://www.cudatel.com">http://www.cudatel.com</a>

Official FreeSWITCH Sites
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.cluecon.com">http://www.cluecon.com</a>

FreeSWITCH-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>