How to execute another lua script when channel enter the REPORTING state?<div><br></div><div>What are the channel variable names?</div><div><br></div><div>Thanks</div><div>Lloyd<br><br><div class="gmail_quote">On Mon, Mar 15, 2010 at 9:56 AM, Sergey Okhapkin <span dir="ltr">&lt;<a href="mailto:sos@sokhapkin.dyndns.org">sos@sokhapkin.dyndns.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Unfortunately all &quot;interesting&quot; billing-related channel variables are set<br>
after the lua script execution, when channel enters REPORTING state. To access<br>
those variables I execute separate lua script using mod_cdr_csv, it allows to<br>
invoke lua script.<br>
<div><div></div><div class="h5"><br>
On Monday 15 March 2010, Aloysius Lloyd wrote:<br>
&gt; Hi All,<br>
&gt;<br>
&gt; I have the following simple Lua script answer a inbound call then dial<br>
&gt; another number and bridge the call.<br>
&gt;<br>
&gt; Is there any way to get the  call duration or billing sec using the<br>
&gt;<br>
&gt; session:getVariable(  );<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; -- answer the call<br>
&gt; session:answer();<br>
&gt;<br>
&gt; -- sleep a second<br>
&gt; session:sleep(1000);<br>
&gt;<br>
&gt; -- Initiate an outbound call<br>
&gt; obSession = freeswitch.Session(&quot;sofia/gateway/voipms/14165555555&quot;,session)<br>
&gt;<br>
&gt; obSession:execute(&quot;sched_hangup&quot;,&quot;+60 alloted_timeout&quot;);<br>
&gt;<br>
&gt; -- bride the call<br>
&gt;     freeswitch.bridge(session, obSession);<br>
&gt;<br>
&gt; -- hangup<br>
&gt; session:hangup();<br>
&gt;<br>
&gt;<br>
&gt; Thank you<br>
&gt; Lloyd<br>
&gt;<br>
<br>
<br>
</div></div><div><div></div><div class="h5">_______________________________________________<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>
</div></div></blockquote></div><br></div>