Skip to content

Commit

Permalink
cnxcc: check if final pulse is 0
Browse files Browse the repository at this point in the history
- avoid dividing with it in such case
- GH kamailio#3859
  • Loading branch information
miconda committed Jun 27, 2024
1 parent 3174159 commit 7061a79
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/modules/cnxcc/cnxcc_check.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 7061a79

Please sign in to comment.