<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hello,<div><br></div><div>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. </div><div><br></div><div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(77, 44, 220); background-color: rgb(254, 244, 156);">#!/usr/bin/lua</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; background-color: rgb(254, 244, 156); min-height: 13px;"><br></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; background-color: rgb(254, 244, 156);">session:answer();</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; background-color: rgb(254, 244, 156); min-height: 13px;"><br></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; background-color: rgb(254, 244, 156);">callerID = session:getVariable(<span style="color: #bc321c">"caller_id_number"</span>);</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; background-color: rgb(254, 244, 156); min-height: 13px;"><br></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; background-color: rgb(254, 244, 156); min-height: 13px;"><br></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; background-color: rgb(254, 244, 156);">freeswitch.consoleLog(<span style="color: #bc321c">"Hello World"</span>);</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; background-color: rgb(254, 244, 156);"><span style="color: rgb(77, 44, 220);">--session:execute("conference","</span>4567<font color="#4d2cdc">");</font></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(77, 44, 220); background-color: rgb(254, 244, 156);">--while (session:ready() == true) do </div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(77, 44, 220); background-color: rgb(254, 244, 156);"><span style="color: #000000"> </span>--session:setAutoHangup(false);</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; background-color: rgb(254, 244, 156); min-height: 13px;"><br></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; background-color: rgb(254, 244, 156);"><span style="color: #a6a519">if</span> (callerID == <font color="#bc321c">1234567890</font>) <span style="color: #a6a519">then</span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; background-color: rgb(254, 244, 156);"> session:execute(<span style="color: #bc321c">"conference"</span>,<span style="color: #bc321c">"</span>4567<span style="color: #bc321c">"</span>);</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(77, 44, 220); background-color: rgb(254, 244, 156);">--else</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; background-color: rgb(254, 244, 156);"><span style="color: rgb(77, 44, 220);"><span style="color: #000000"> </span>-- session:execute("transfer","</span>7890<font color="#4d2cdc">");</font></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(166, 165, 25); background-color: rgb(254, 244, 156);">end</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(77, 44, 220); background-color: rgb(254, 244, 156);">-- end</div></div><div><br></div></body></html>