<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>I am calling cidlookup in my dial plan like this:</p>
    <p><action application="set" data="effective_caller_id_number=$1"
      inline="true"/></p>
    <p>And in my log I see:</p>
    <p>a6a3d389-245d-4705-9a1e-91d74d491dd1 Dialplan:
      <a class="moz-txt-link-abbreviated" href="mailto:sofia/external/+12297960236@4.59.156.121:5060">sofia/external/+12297960236@4.59.156.121:5060</a> Action
      set(effective_caller_id_name=${cidlookup(${caller_id_number})}) <br>
    </p>
    <p>I'm trying to use it in an lua script that is called right after
      the above action line but the log seems to indicate that it
      doesn't actually get executed until some time later.</p>
    <pre><font size="-1">a6a3d389-245d-4705-9a1e-91d74d491dd1 Dialplan: <a class="moz-txt-link-abbreviated" href="mailto:sofia/external/+12297960236@4.59.156.121:5060">sofia/external/+12297960236@4.59.156.121:5060</a> Action info()
a6a3d389-245d-4705-9a1e-91d74d491dd1 Dialplan: <a class="moz-txt-link-abbreviated" href="mailto:sofia/external/+12297960236@4.59.156.121:5060">sofia/external/+12297960236@4.59.156.121:5060</a> Action lua(cid.lua ${caller_id_number} ${effective_caller_id_name}) INLINE
a6a3d389-245d-4705-9a1e-91d74d491dd1 EXECUTE <a class="moz-txt-link-abbreviated" href="mailto:sofia/external/+12297960236@4.59.156.121:5060">sofia/external/+12297960236@4.59.156.121:5060</a> lua(cid.lua +12297960236 )
2018-05-09 20:28:02.349228 [DEBUG] freeswitch_lua.cpp:365 DBH handle 0x7fefd0092e70 Connected.
a6a3d389-245d-4705-9a1e-91d74d491dd1 2018-05-09 20:28:02.349228 [DEBUG] switch_cpp.cpp:745 CoreSession::setVariable(effective_caller_id_name, ALL LOCATION CZ)

</font></pre>
    <font size="-1">How can I get the data into my lua script?<br>
      <br>
      Thanks,<br>
      Jim.<br>
    </font>
  </body>
</html>