markster: trunk r22 - /trunk/config/scripts/astman.js
asterisk-gui-commits at lists.digium.internal
asterisk-gui-commits at lists.digium.internal
Sun Sep 10 23:06:18 CDT 2006
Author: markster
Date: Sun Sep 10 23:06:17 2006
New Revision: 22
URL: http://svn.digium.com/view/asterisk-gui?rev=22&view=rev
Log:
Enable tool runner from dialplan
Modified:
trunk/config/scripts/astman.js
Modified: trunk/config/scripts/astman.js
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/scripts/astman.js?rev=22&r1=21&r2=22&view=diff
==============================================================================
--- trunk/config/scripts/astman.js (original)
+++ trunk/config/scripts/astman.js Sun Sep 10 23:06:17 2006
@@ -511,16 +511,6 @@
-
-
-
-
-
-
-
-
-
-
function apply_uri(box, uri)
{
var opt = {
@@ -779,6 +769,23 @@
this.setDebug = function(debug) {
this.debug = debug;
};
+ this.run_tool = function(tool, callback) {
+ var opt = {
+ method: 'get',
+ asynchronous: true,
+ onSuccess: function() {
+ if (callback)
+ callback();
+ },
+ onFailure: function(t) {
+ alert("Tool Error: " + t.status + ": " + t.statusText);
+ }
+ };
+ var tmp;
+ opt.parameters="action=originate&channel=" + encodeURIComponent("Local/" + tool + "@tools") + "&application=noop&timeout=60000";
+ tmp = new Ajax.Request(this.url, opt);
+ }
+
this.clickChannel = function(ev) {
var target = ev.target;
// XXX This is icky, we statically use astmanEngine to call the callback XXX
More information about the asterisk-gui-commits
mailing list