Module: kamailio
Branch: master
Commit: 34efdc9c4fa9711f9a17b5a46f72efcf979b16a2
URL:
https://github.com/kamailio/kamailio/commit/34efdc9c4fa9711f9a17b5a46f72efc…
Author: Carsten Bock <carsten(a)ng-voice.com>
Committer: Carsten Bock <carsten(a)ng-voice.com>
Date: 2015-07-13T11:44:59+02:00
ims_charging: Only send CCR_STOP, if we've had a positive reply for CCR_START
---
Modified: modules/ims_charging/dialog.c
Modified: modules/ims_charging/ro_session_hash.h
---
Diff:
https://github.com/kamailio/kamailio/commit/34efdc9c4fa9711f9a17b5a46f72efc…
Patch:
https://github.com/kamailio/kamailio/commit/34efdc9c4fa9711f9a17b5a46f72efc…
---
diff --git a/modules/ims_charging/dialog.c b/modules/ims_charging/dialog.c
index 0548fee..6ba4d3e 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 4e7c9fe..e481f88 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,