[Freeswitch-users] Getting Bill Seconds in Lua

Joel Serrano joel at textplus.com
Wed May 4 01:32:07 UTC 2022


Then you might be missing this before the api_hangup_hook:

<action application="set" data="session_in_hangup_hook=true"/>





On Tue, May 3, 2022 at 3:43 PM John Covici <covici at ccs.covici.com> wrote:

> I think its not available there, its only in the csv that you get
> after the call is done, so it may be in your database, if you create
> one.
>
> On Tue, 03 May 2022 13:23:56 -0400,
> Joel Serrano wrote:
> >
> > [1  <multipart/alternative (7bit)>]
> > [1.1  <text/plain; UTF-8 (7bit)>]
> > Have you tried with:
> >
> > freeswitch.consoleLog("info", "Billable Duration: " ..
> > session:getVariable("billmsec"));
> >
> >
> > On Tue, May 3, 2022 at 9:53 AM Alexander Perkins <
> > alexanderhenryperkins at 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 at 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 at lists.freeswitch.org
> > > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > > UNSUBSCRIBE:
> http://lists.freeswitch.org/mailman/options/freeswitch-users
> > > https://freeswitch.com
> > [1.2  <text/html; UTF-8 (quoted-printable)>]
> > [2  <text/plain; utf-8 (base64)>]
> > _________________________________________________________________________
> >
> > 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 at 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 at lists.freeswitch.org
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> > https://freeswitch.com
>
> --
> Your life is like a penny.  You're going to lose it.  The question is:
> How do
> you spend it?
>
>          John Covici wb2una
>          covici at ccs.covici.com
>
> _________________________________________________________________________
>
> 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 at 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 at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> https://freeswitch.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20220503/c9cd8c42/attachment-0001.html>


More information about the FreeSWITCH-users mailing list