[Freeswitch-dev] Fwd: help
Michael Collins
msc at freeswitch.org
Thu Feb 2 19:31:36 MSK 2012
If this is a hangup hook then you need the special "env" object:
http://wiki.freeswitch.org/wiki/Mod_lua#Special_Case:_env_object
If this is a dialplan script then those values will, of course, not be
populated because the call is in progress.
-MC
On Wed, Feb 1, 2012 at 11:52 PM, Balamurugan Mahendran <b2m at a-cti.com>wrote:
> Hi team,
>
> I am trying to get these values from the lua script for custom CDR report,
> I am able to get few values but many variables are missing or getting null
> value. Any help would be appreciated.
>
> local aa=session:getVariable("context");
> local bb=session:getVariable("destination_number");
> local cc=session:getVariable("caller_id_name");
> local dd=session:getVariable("caller_id_number");
> local ee=session:getVariable("network_addr");
> local ff=session:getVariable("ani");
> local ii=session:getVariable("source");
> local jj=session:getVariable("chan_name");
> local kk=session:getVariable("uuid");
> local ll=session:getVariable("created_time");
> local aa1=session:getVariable("direction");
> local bb1=session:getVariable("username");
> local cc1=session:getVariable("dialplan");
> local dd1=session:getVariable("caller_id_number");
> local ee1=session:getVariable("unique_id");
>
> session:execute("bridge","user/601");
> session:hangup();
>
> local ff1=session:getVariable("answered_time");
> local hh1=session:getVariable("created_time");
> local gg1=session:getVariable("hangup_time");
> local gg2=session:getVariable("end_stamp");
>
> I am getting values for all the above variables except end_stamp,
> hangup_time, duration, billsec,hangup_cause.
>
>
> Thanks for your time.
>
> Thanks,
> Bala
>
>
>
>
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
>
>
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-dev mailing list
> FreeSWITCH-dev at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20120202/970b1f50/attachment-0001.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-dev
mailing list