[Freeswitch-svn] [commit] r5439 - freeswitch/trunk/scripts

Freeswitch SVN anthm at freeswitch.org
Fri Jun 22 13:38:32 EDT 2007


Author: anthm
Date: Fri Jun 22 13:38:32 2007
New Revision: 5439

Modified:
   freeswitch/trunk/scripts/api.js

Log:
update example

Modified: freeswitch/trunk/scripts/api.js
==============================================================================
--- freeswitch/trunk/scripts/api.js	(original)
+++ freeswitch/trunk/scripts/api.js	Fri Jun 22 13:38:32 2007
@@ -53,10 +53,12 @@
 request.write("</form><hr noshade size=1><br>");
 
 if ((command = request.getHeader("command"))) {
-	cmd_list = command.split(" ", 2);
+	cmd_list = command.split(" ");
+    cmd = cmd_list.shift();
+    args = cmd_list.join(" ");
 
-	if ((reply = apiExecute(cmd_list[0], cmd_list[1]))) {
-		request.write("<B>Command Result</b><br><pre>" + reply + "\n</pre>");
+	if ((reply = apiExecute(cmd, args))) {
+		request.write("<br><B>Command Result</b><br><pre>" + reply + "\n</pre>");
 	}
 }
 



More information about the Freeswitch-svn mailing list