<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hi Joli<br>
      <br>
      The answer are already in your hands... in: <br>
      &nbsp;&nbsp;&nbsp; <a class="moz-txt-link-freetext" href="https://wiki.freeswitch.org/wiki/Mod_lua">https://wiki.freeswitch.org/wiki/Mod_lua</a> <br>
      &nbsp;&nbsp;&nbsp; <a class="moz-txt-link-freetext" href="http://phrogz.net/lua/LearningLua_FromJS.html">http://phrogz.net/lua/LearningLua_FromJS.html</a><br>
      &nbsp;&nbsp;&nbsp; <a class="moz-txt-link-freetext" href="http://www.lua.org/">http://www.lua.org/</a><br>
      <br>
      With "freeswitch.consoleLog" you get info in the console. You
      should change your code to:<br>
      <br>
      freeswitch.consoleLog("info", "Got
      -------------------------------&gt; caller_id_number<span
        style="color: #bc321c"></span>: " .. callerID .. "\n");<br>
      <br>
      Also, try:<br>
      <br>
      <span style="color: #a6a519">if</span> (callerID == "<font
        color="#bc321c">1234567890</font>")<br>
      <br>
      <br>
      <br>
      On 12/10/2013 11:44 AM, Joli Martinez wrote:<br>
    </div>
    <blockquote
      cite="mid:461E1D38-CB91-4849-8A15-EA97DFD09DFD@gmail.com"
      type="cite">Hello,
      <div><br>
      </div>
      <div>I am writing a Lua script that will get the callerId info. &nbsp;I
        need 1 to be able to get the callerID and also to print any
        messages to the FS_CLI for debugging purpose. &nbsp; By itself the
        session:execute does transfer to the correct conference, but it
        does not work with the callerID. &nbsp;And the consoleLog doesnt work
        it give me an error on the screen.&nbsp;</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&nbsp;</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">&nbsp; </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>)&nbsp;
          <span style="color: #a6a519">then</span></div>
        <div style="margin: 0px; font-size: 11px; font-family: Menlo;
          background-color: rgb(254, 244, 156);">&nbsp; &nbsp; 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">&nbsp; </span>--&nbsp;
            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>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
<a class="moz-txt-link-abbreviated" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a>

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
<a class="moz-txt-link-freetext" href="http://www.cudatel.com">http://www.cudatel.com</a>

Official FreeSWITCH Sites
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.cluecon.com">http://www.cluecon.com</a>

FreeSWITCH-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
</pre>
    </blockquote>
    <br>
    <br>
    <div class="moz-signature">-- <br>
      Atentamente,
      <br>
      <b>Dario Garc&iacute;a</b>
      <br>
      Consultor.
      <br>
      <br>
      CCCT, Nivel C2, Sector Yarey, Mz, <br>
      Ofc. MZ03a. <br>
      Caracas-Venezuela.
      <br>
      Tel&eacute;fono: +58 212 9081842
      <br>
      Cel: +58 412 2221515
      <br>
      <a class="moz-txt-link-abbreviated" href="mailto:dgarcia@anew.com.ve">dgarcia@anew.com.ve</a>
      <br>
      <a class="moz-txt-link-freetext" href="http://www.anew.com.ve">http://www.anew.com.ve</a></div>
  </body>
</html>