<div dir="ltr">yes just now tried that but result is same. I tried to do it in lua just to utilize freewitch.dbh otherwise there are some straight forward modules. In Lua I can also use luarun to avoid blocking of call thread in case of DB related locks.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 6, 2015 at 8:29 AM, I put the Who? in Mishehu <span dir="ltr">&lt;<a href="mailto:mishehu@freeswitch.org" target="_blank">mishehu@freeswitch.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>Did you try using instead
      api_reporting_hook instead ?  You really want to do your CDR
      logging in the CS_REPORTING state, not CS_HANGUP.<br>
      <br>
      <pre cols="72">-- 
Yossi Neiman

On 02/05/2015 08:29 PM, John Nash wrote:
</pre>
    </div>
    <blockquote type="cite"><div><div class="h5">
      <div dir="ltr">
        <div>
          <div>
            <div>I am trying to insert CDR using a lua script.<br>
            </div>
          </div>
          <br>
           &lt;action application=&quot;export&quot;
          data=&quot;nolocal:api_hangup_hook=luarun cdr2.lua  ${start_stamp}
          ${created_time} ${progress_time}  ${progress_media_time}
          ${answer_stamp} ${end_stamp} ${duration} ${billsec}.....&quot;<br>
          <br>
        </div>
        But when this executes many of the parameters passed to script
        as nil like billsec , How can I get all parameters related to
        CDR (Like other CDR modules)<br>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>_________________________________________________________________________
Professional FreeSWITCH Consulting Services: 
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a>

Official FreeSWITCH Sites
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a>

FreeSWITCH-users mailing list
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></pre>
    </blockquote>
    <br>
  </div>

<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div>