Module: kamailio
Branch: master
Commit: 7061a79fe64066dd5a6598e38d714bd40bf2eabc
URL:
https://github.com/kamailio/kamailio/commit/7061a79fe64066dd5a6598e38d714bd…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-06-27T10:07:11+02:00
cnxcc: check if final pulse is 0
- avoid dividing with it in such case
- GH #3859
---
Modified: src/modules/cnxcc/cnxcc_check.c
---
Diff:
https://github.com/kamailio/kamailio/commit/7061a79fe64066dd5a6598e38d714bd…
Patch:
https://github.com/kamailio/kamailio/commit/7061a79fe64066dd5a6598e38d714bd…
---
diff --git a/src/modules/cnxcc/cnxcc_check.c b/src/modules/cnxcc/cnxcc_check.c
index 32839921e7f..503a89e6802 100644
--- a/src/modules/cnxcc/cnxcc_check.c
+++ b/src/modules/cnxcc/cnxcc_check.c
@@ -62,6 +62,13 @@ void check_calls_by_money(unsigned int ticks, void *param)
if(!call->confirmed)
continue;
+ if(call->money_based.final_pulse == 0) {
+ LM_WARN("CID [%.*s] - final pulse is 0 - skipping\n",
+ call->sip_data.callid.len,
+ call->sip_data.callid.s);
+ continue;
+ }
+
consumed_time =
get_current_timestamp() - call->start_timestamp;