bkruse: trunk r1097 - in /trunk/config: scripts/astman.js setup/1.html

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Mon Jun 18 19:51:10 CDT 2007


Author: bkruse
Date: Mon Jun 18 19:51:09 2007
New Revision: 1097

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1097
Log:
Wow, this will fix alot of problems. Instead of doing the ghetto way of naming a variable then executing a system command, we just call a local channel that answers and hangs up, and the oppisite application: is system. I am not sure if this makes things faster, but now nothing is hanging and all the system calls are ALOT smoother, and you can actually tell from the responseText if the command was successfull (instead of it always returning false like it used to).  I think this will help alot of things. Check it over for me pari. The last problem had to do with us reloading WHILE we were calling for a config file or system call. Since we do not use callbacks there, it would execute right after executing the reload. But its fixed now, yay

Modified:
    trunk/config/scripts/astman.js
    trunk/config/setup/1.html

Modified: trunk/config/scripts/astman.js
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/scripts/astman.js?view=diff&rev=1097&r1=1096&r2=1097
==============================================================================
--- trunk/config/scripts/astman.js (original)
+++ trunk/config/scripts/astman.js Mon Jun 18 19:51:09 2007
@@ -1092,7 +1092,7 @@
 			}
 		};
 		var tmp;
-		opt.parameters="action=originate&channel=" + encodeURIComponent("Local/executecommand@"+asterisk_guitools ) + "&Variable=command%3d"+ encodeURIComponent(tool) + "&application=noop&timeout=60000";
+		opt.parameters="action=originate&channel=" + encodeURIComponent("Local/executecommand@"+asterisk_guitools ) + "&application=command&data="+ encodeURIComponent(tool) + "timeout=60000";
 		tmp = new Ajax.Request(this.url, opt);
 	};
 

Modified: trunk/config/setup/1.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/setup/1.html?view=diff&rev=1097&r1=1096&r2=1097
==============================================================================
--- trunk/config/setup/1.html (original)
+++ trunk/config/setup/1.html Mon Jun 18 19:51:09 2007
@@ -100,6 +100,16 @@
 	installguitools();
 }
 
+function actionreload() {
+	var opt = {
+		method: 'get',
+		asynchornous: true,
+		onComplete: scan_zapteldevices
+	};
+	opt.paramaters="action=command&command=dialplan%20reload";
+
+	var tmp = new Ajax.Request(rawman_url, opt);
+}
 
 function installguitools(){
 	var opt = {
@@ -107,12 +117,12 @@
 		asynchronous: true,
 		onComplete: scan_zapteldevices
 	};
-	opt.parameters="action=updateconfig&reload=yes&srcfilename=extensions.conf&dstfilename=extensions.conf&"  +
+	opt.parameters="action=updateconfig&srcfilename=extensions.conf&dstfilename=extensions.conf&"  +
 
 	"Action-000000=newcat&Cat-000000=" + asterisk_guitools + "&Var-000000=&Value-000000=" + "&" + 
 	
 	"Action-000001=append&Cat-000001=" + asterisk_guitools + "&Var-000001=exten&Value-000001=" +
-	encodeURI(		'executecommand,1,System(${command})' 	) + "&" + 
+	encodeURI(		'executecommand,1,Answer()' 	) + "&" + 
 
 	"Action-000002=append&Cat-000002=" + asterisk_guitools + "&Var-000002=exten&Value-000002=" +
 	encodeURI(		'executecommand,n,Hangup()' 	) + "&" + 




More information about the asterisk-gui-commits mailing list