]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
guess nobody has actually tried this before
authorBrian West <brian@freeswitch.org>
Mon, 15 Feb 2010 21:25:49 +0000 (21:25 +0000)
committerBrian West <brian@freeswitch.org>
Mon, 15 Feb 2010 21:25:49 +0000 (21:25 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16650 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/esl/lua/Makefile
libs/esl/lua/single_command.lua [new file with mode: 0755]

index f77a2b143196f1ede7d1366cb7ce66ba7efd585c..c33853bfa73e074b85c3decc66367071d3dedbe4 100644 (file)
@@ -1,5 +1,5 @@
 LOCAL_CFLAGS=
-LOCAL_LDFLAGS=-llua
+LOCAL_LDFLAGS=-llua -lpthread
 WRAP_GCC_WARNING_SILENCE=-Wno-unused-function
 
 all: ESL.so
diff --git a/libs/esl/lua/single_command.lua b/libs/esl/lua/single_command.lua
new file mode 100755 (executable)
index 0000000..bff4b32
--- /dev/null
@@ -0,0 +1,10 @@
+#!/usr/local/bin/lua 
+require("ESL") 
+
+local command = arg[1];
+table.remove(arg, 1);
+local args = table.concat(arg, " ");
+
+local con = ESL.ESLconnection("localhost", "8021", "ClueCon");
+local e = con:api(command, args);
+print(e:getBody());