[Freeswitch-users] Lua script
Joli Martinez
mrjoli021 at gmail.com
Tue Dec 10 19:14:17 MSK 2013
Hello,
I am writing a Lua script that will get the callerId info. I need 1 to be able to get the callerID and also to print any messages to the FS_CLI for debugging purpose. By itself the session:execute does transfer to the correct conference, but it does not work with the callerID. And the consoleLog doesnt work it give me an error on the screen.
#!/usr/bin/lua
session:answer();
callerID = session:getVariable("caller_id_number");
freeswitch.consoleLog("Hello World");
--session:execute("conference","4567");
--while (session:ready() == true) do
--session:setAutoHangup(false);
if (callerID == 1234567890) then
session:execute("conference","4567");
--else
-- session:execute("transfer","7890");
end
-- end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20131210/61a5336e/attachment.html
Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users
mailing list