<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">You are doing this on a call to the
      originate application in ESL, so try adding the headers by adding
      them to the {} segment.&nbsp; The set application requires an existing
      session object to work upon, and I don't believe you have any here
      (though I'm not an ESL lua expert).<br>
      <br>
      So you would have
      {ignore_early_media=true,originate_timeout=60,sip_h_X-Token=abc123,....}
      in your origination.&nbsp; For further information, see
      <a class="moz-txt-link-freetext" href="http://wiki.freeswitch.org/wiki/Mod_commands#originate">http://wiki.freeswitch.org/wiki/Mod_commands#originate</a><br>
      <br>
      -Yossi<br>
      <br>
      On 12/23/2013 01:44 AM, Sayyed Mohammad Emami Razavi wrote:<br>
    </div>
    <blockquote
cite="mid:CAJEstwO8dQ+MUE9UxOp977tL-MF=cXsN_SvCUT_6=3oEQ-qS3A@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>Hello Alex,<br>
            </div>
            I used your guide in my lua script but in tcpdump and
            fs_cli, i can find no new headers set.<br>
          </div>
          This is my lua code:<br>
          <br>
          #!/usr/bin/lua <br>
          require("ESL")<br>
          local command = 'originate
          {ignore_early_media=true,originate_timeout=60}user/<a
            moz-do-not-send="true" href="mailto:1000@192.168.1.5">1000@192.168.1.5</a>
          &amp;playback(/usr/local/freeswitch/scripts/HelloWorld.wav)';<br>
          local args = table.concat({}, " ");<br>
          local con = ESL.ESLconnection("localhost", "8021", "ClueCon");<br>
          con:execute("set", "sip_h_X-Token=abc123");<br>
          con:execute("set", "X-Token=abc123");<br>
          con:execute("set",
"&lt;![CDATA[sip_h_P-Charge-Info=&lt;sip:${caller_id_number}@${domain_name}&gt;;npi=0;noa=3]]&gt;");<br>
          local e = con:bgapi(command, args);<br>
          print(e:getBody());<br>
          <br>
        </div>
        Can you help me more?!<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>
  </body>
</html>