[sr-dev] git:master:e112a2ea: ims_charging: Added the possibility to omit the rating-group (also for STOP-Requests)

Carsten Bock carsten at ng-voice.com
Mon Nov 30 13:22:15 CET 2015


Module: kamailio
Branch: master
Commit: e112a2ea4bbc8c53e813442e606fb6fb79b1d3b8
URL: https://github.com/kamailio/kamailio/commit/e112a2ea4bbc8c53e813442e606fb6fb79b1d3b8

Author: Carsten Bock <carsten at ng-voice.com>
Committer: Carsten Bock <carsten at ng-voice.com>
Date: 2015-11-30T13:22:07+01:00

ims_charging: Added the possibility to omit the rating-group (also for STOP-Requests)

---

Modified: modules/ims_charging/ims_ro.c

---

Diff:  https://github.com/kamailio/kamailio/commit/e112a2ea4bbc8c53e813442e606fb6fb79b1d3b8.diff
Patch: https://github.com/kamailio/kamailio/commit/e112a2ea4bbc8c53e813442e606fb6fb79b1d3b8.patch

---

diff --git a/modules/ims_charging/ims_ro.c b/modules/ims_charging/ims_ro.c
index aac2af3..adb536d 100644
--- a/modules/ims_charging/ims_ro.c
+++ b/modules/ims_charging/ims_ro.c
@@ -211,8 +211,11 @@ inline int Ro_add_multiple_service_credit_Control_stop(AAAMessage *msg, int used
     set_4bytes(x, active_service_identifier);
     Ro_add_avp_list(&mscc_list, x, 4, AVP_Service_Identifier, AAA_AVP_FLAG_MANDATORY, 0, AVP_DUPLICATE_DATA, __FUNCTION__);
 
-    set_4bytes(x, active_rating_group);
-    Ro_add_avp_list(&mscc_list, x, 4, AVP_Rating_Group, AAA_AVP_FLAG_MANDATORY, 0, AVP_DUPLICATE_DATA, __FUNCTION__);
+    // Rating Group = -1 => omit Rating group
+    if (active_rating_group >= 0) {
+        set_4bytes(x, active_rating_group);
+        Ro_add_avp_list(&mscc_list, x, 4, AVP_Rating_Group, AAA_AVP_FLAG_MANDATORY, 0, AVP_DUPLICATE_DATA, __FUNCTION__);
+    }
 
     used_group = cdpb.AAAGroupAVPS(mscc_list);
     cdpb.AAAFreeAVPList(&mscc_list);




More information about the sr-dev mailing list