Have you tried with: 

freeswitch.consoleLog("info", "Billable Duration: " .. session:getVariable("billmsec"));


On Tue, May 3, 2022 at 9:53 AM Alexander Perkins <alexanderhenryperkins@gmail.com> wrote:
Hi All.  I am trying to access the billmsec from lua, but not being very successful at it.  Here's what I've done so far:

freeswitch.consoleLog("info", "Billable Duration: " .. session:getVariable("variable_billmsec"));

However, when I look at the cli, I get an error because it is nil.  I am calling this script from the api_hangup_hook.

Any suggestions?

Thank you,
Alex
_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community

Professional FreeSWITCH Services
sales@freeswitch.com
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com