Allow AOC-E generation if AOC-D timer is not started (e.g. connect-only charge)

This commit is contained in:
Dennis Grunert 2024-01-18 08:57:34 +01:00
parent 3549cff4d6
commit 0074b495d6
1 changed files with 7 additions and 6 deletions

View File

@ -486,6 +486,7 @@ void setup_ind(call_t *call, uint32_t pid, struct l3_msg *l3m)
/* reset AOC information */
call->metering_info_received = 0;
call->aocd_unit_timer_started = 0;
call->metering_total_units = 0;
new_state(call, ISDN_STATE_IN_SETUP);
@ -901,13 +902,13 @@ void disconnect_ind(call_t *call, uint32_t pid, struct l3_msg *l3m)
osmo_cc_ll_msg(&call->isdn_ep->cc_ep, call->cc_callref, msg);
/* stop AOC-D timer and send AOC-E facility */
if(call->aocd_unit_timer_started)
{
if(call->aocd_unit_timer_started) {
timer_stop(&call->aocd_unit_timer);
timer_exit(&call->aocd_unit_timer);
call->aocd_unit_timer_started = 0;
generate_aoce_fac(call);
}
if(call->metering_total_units > 0)
generate_aoce_fac(call);
}
/* CC-DISCONNECT INDICATION of child instance */
@ -2539,13 +2540,13 @@ void disc_req(call_t *call, uint32_t pid, osmo_cc_msg_t *msg)
call->isdn_ep->ml3->to_layer3(call->isdn_ep->ml3, MT_DISCONNECT, call->l3_pid, l3m);
/* stop AOC-D timer and send AOC-E facility */
if(call->aocd_unit_timer_started)
{
if(call->aocd_unit_timer_started) {
timer_stop(&call->aocd_unit_timer);
timer_exit(&call->aocd_unit_timer);
call->aocd_unit_timer_started = 0;
generate_aoce_fac(call);
}
if(call->metering_total_units > 0)
generate_aoce_fac(call);
}
/* CC-RELEASE REQUEST */