How to trigger this template from the main script ? or Does this automatically trigger when finish the first script complete?<div><br>
Thanks</div><div>Lloyd<br><br><div class="gmail_quote">On Mon, Mar 15, 2010 at 10:48 AM, Sergey Okhapkin <span dir="ltr"><<a href="mailto:sos@sokhapkin.dyndns.org">sos@sokhapkin.dyndns.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
cdr_csv.conf.xml:<br>
<br>
<param name="default-template" value="lua"/><br>
<templates><br>
<template name="lua">${lua(onhangup.lua)}</template><br>
<br>
All variables described at <a href="http://wiki.freeswitch.org/wiki/Mod_cdr_csv" target="_blank">http://wiki.freeswitch.org/wiki/Mod_cdr_csv</a> are<br>
accessible from that lua script.<br>
<div><div></div><div class="h5"><br>
On Monday 15 March 2010, Aloysius Lloyd wrote:<br>
> How to execute another lua script when channel enter the REPORTING state?<br>
><br>
> What are the channel variable names?<br>
><br>
> Thanks<br>
> Lloyd<br>
><br>
> On Mon, Mar 15, 2010 at 9:56 AM, Sergey Okhapkin<br>
><br>
> <<a href="mailto:sos@sokhapkin.dyndns.org">sos@sokhapkin.dyndns.org</a>>wrote:<br>
> > Unfortunately all "interesting" billing-related channel variables are set<br>
> > after the lua script execution, when channel enters REPORTING state. To<br>
> > access<br>
> > those variables I execute separate lua script using mod_cdr_csv, it<br>
> > allows to<br>
> > invoke lua script.<br>
> ><br>
> > On Monday 15 March 2010, Aloysius Lloyd wrote:<br>
> > > Hi All,<br>
> > ><br>
> > > I have the following simple Lua script answer a inbound call then dial<br>
> > > another number and bridge the call.<br>
> > ><br>
> > > Is there any way to get the call duration or billing sec using the<br>
> > ><br>
> > > session:getVariable( );<br>
> > ><br>
> > ><br>
> > ><br>
> > > -- answer the call<br>
> > > session:answer();<br>
> > ><br>
> > > -- sleep a second<br>
> > > session:sleep(1000);<br>
> > ><br>
> > > -- Initiate an outbound call<br>
> > > obSession =<br>
> ><br>
> > freeswitch.Session("sofia/gateway/voipms/14165555555",session)<br>
> ><br>
> > > obSession:execute("sched_hangup","+60 alloted_timeout");<br>
> > ><br>
> > > -- bride the call<br>
> > > freeswitch.bridge(session, obSession);<br>
> > ><br>
> > > -- hangup<br>
> > > session:hangup();<br>
> > ><br>
> > ><br>
> > > Thank you<br>
> > > Lloyd<br>
> ><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>
><br>
<br>
</div></div></blockquote></div><br></div>