Module: kamailio
Branch: master
Commit: 8855f0fbe28b94e5298176310d7cbf587bd264da
URL:
https://github.com/kamailio/kamailio/commit/8855f0fbe28b94e5298176310d7cbf5…
Author: Carsten Bock <carsten(a)ng-voice.com>
Committer: Carsten Bock <carsten(a)ng-voice.com>
Date: 2015-11-30T13:14:05+01:00
ims_charging: Added the possibility to omit the rating-group
---
Modified: modules/ims_charging/ims_ro.c
---
Diff:
https://github.com/kamailio/kamailio/commit/8855f0fbe28b94e5298176310d7cbf5…
Patch:
https://github.com/kamailio/kamailio/commit/8855f0fbe28b94e5298176310d7cbf5…
---
diff --git a/modules/ims_charging/ims_ro.c b/modules/ims_charging/ims_ro.c
index f736311..aac2af3 100644
--- a/modules/ims_charging/ims_ro.c
+++ b/modules/ims_charging/ims_ro.c
@@ -246,8 +246,11 @@ inline int Ro_add_multiple_service_credit_Control(AAAMessage *msg,
unsigned int
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__);
+ }
/* if we must Used-Service-Unit */
if (used_unit >= 0) {