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
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@freeswitch.org
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-dev mailing list
FreeSWITCH-dev@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org