VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
alexanderhenryperkins ... Guest
|
Posted: Tue May 03, 2022 12:13 pm Post subject: [Freeswitch-users] Getting Bill Seconds in Lua |
|
|
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 |
|
Back to top |
|
|
joel at textplus.com Guest
|
Posted: Tue May 03, 2022 12:44 pm Post subject: [Freeswitch-users] Getting Bill Seconds in Lua |
|
|
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 (alexanderhenryperkins@gmail.com)> wrote:
|
|
Back to top |
|
|
covici at ccs.covici.com Guest
|
|
Back to top |
|
|
joel at textplus.com Guest
|
Posted: Tue May 03, 2022 9:27 pm Post subject: [Freeswitch-users] Getting Bill Seconds in Lua |
|
|
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@ccs.covici.com (covici@ccs.covici.com)> wrote:
|
|
Back to top |
|
|
krice at freeswitch.org Guest
|
Posted: Wed May 04, 2022 12:10 pm Post subject: [Freeswitch-users] Getting Bill Seconds in Lua |
|
|
Please tell me you arent doing billing in the a hangup hook with lua.
You pretty much have to set the session to zombie mode and the session will not die until your billing run is completed. This will also cause other excessive load in FreeSWITCH possibly leading to hung channels in the event of any failure down the chain.
You are far better off doing billing (or just post call handling in general) via xml or json cdrs and they will auto trigger your external billing via http post. You can also have them drop a file per call (or call leg) to the filesystem to make sure you don’t miss billing a call and leave open sessions all over your switch.
From: FreeSWITCH-users <freeswitch-users-bounces@lists.freeswitch.org> On Behalf Of Alexander Perkins
Sent: Tuesday, May 3, 2022 11:52 AM
To: freeswitch-users@lists.freeswitch.org
Subject: [Freeswitch-users] Getting Bill Seconds in Lua
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 |
|
Back to top |
|
|
jprangi at gmail.com Guest
|
Posted: Wed May 04, 2022 6:51 pm Post subject: [Freeswitch-users] Getting Bill Seconds in Lua |
|
|
Did you check the Nibblebill module?
-jai
On Tue, May 3, 2022 at 7:01 PM Joel Serrano <joel@textplus.com (joel@textplus.com)> wrote:
|
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|