diff --git a/modules/ims_charging/dialog.c b/modules/ims_charging/dialog.c index 0548feed8e3..6ba4d3ec6f8 100644 --- a/modules/ims_charging/dialog.c +++ b/modules/ims_charging/dialog.c @@ -164,9 +164,11 @@ void dlg_terminated(struct dlg_cell *dlg, int type, struct dlg_cb_params *_param } } - LM_DBG("Sending CCR STOP on Ro_Session [%p]\n", ro_session); - send_ccr_stop(ro_session); - ro_session->active = 0; + if (ro_session->event_type != unknown) { + LM_DBG("Sending CCR STOP on Ro_Session [%p], as it is in '%d' state\n", ro_session, ro_session->event_type); + send_ccr_stop(ro_session); + ro_session->active = 0; + } if (ro_db_mode == DB_MODE_REALTIME) { ro_session->flags |= RO_SESSION_FLAG_DELETED; diff --git a/modules/ims_charging/ro_session_hash.h b/modules/ims_charging/ro_session_hash.h index 4e7c9fe900f..e481f886cad 100644 --- a/modules/ims_charging/ro_session_hash.h +++ b/modules/ims_charging/ro_session_hash.h @@ -23,6 +23,7 @@ #define MAX_PANI_LEN 100 enum ro_session_event_type { + unknown = 0, pending, answered, no_more_credit,