[sr-dev] git:4.3:626de5da: ims_charging: In case of Tel-URIs, use type END_USER_E164 and STRIP tel: (Bugfix)
Carsten Bock
carsten at ng-voice.com
Mon Jun 8 13:48:20 CEST 2015
Module: kamailio
Branch: 4.3
Commit: 626de5dac2715507c5fb19f8056183b4ca6a1da8
URL: https://github.com/kamailio/kamailio/commit/626de5dac2715507c5fb19f8056183b4ca6a1da8
Author: Carsten Bock <carsten at ng-voice.com>
Committer: Carsten Bock <carsten at ng-voice.com>
Date: 2015-06-08T13:48:04+02:00
ims_charging: In case of Tel-URIs, use type END_USER_E164 and STRIP tel: (Bugfix)
---
Modified: modules/ims_charging/ims_ro.c
---
Diff: https://github.com/kamailio/kamailio/commit/626de5dac2715507c5fb19f8056183b4ca6a1da8.diff
Patch: https://github.com/kamailio/kamailio/commit/626de5dac2715507c5fb19f8056183b4ca6a1da8.patch
---
diff --git a/modules/ims_charging/ims_ro.c b/modules/ims_charging/ims_ro.c
index 7215036..ab2488a 100644
--- a/modules/ims_charging/ims_ro.c
+++ b/modules/ims_charging/ims_ro.c
@@ -547,6 +547,9 @@ void send_ccr_interim(struct ro_session* ro_session, unsigned int used, unsigned
//getting subscription id type
if (strncasecmp(subscr.id.s, "tel:", 4) == 0) {
subscr.type = Subscription_Type_MSISDN;
+ // Strip "tel:":
+ subscr.id.s += 4;
+ subscr.id.len -= 4;
} else {
subscr.type = Subscription_Type_IMPU; //default is END_USER_SIP_URI
}
@@ -780,6 +783,9 @@ void send_ccr_stop(struct ro_session *ro_session) {
//getting subscription id type
if (strncasecmp(subscr.id.s, "tel:", 4) == 0) {
subscr.type = Subscription_Type_MSISDN;
+ // Strip "tel:":
+ subscr.id.s += 4;
+ subscr.id.len -= 4;
} else {
subscr.type = Subscription_Type_IMPU; //default is END_USER_SIP_URI
}
@@ -996,6 +1002,9 @@ int Ro_Send_CCR(struct sip_msg *msg, struct dlg_cell *dlg, int dir, int reservat
//getting subscription id type
if (strncasecmp(subscription_id.s, "tel:", 4) == 0) {
subscription_id_type = Subscription_Type_MSISDN;
+ // Strip "tel:":
+ subscription_id.s += 4;
+ subscription_id.len -= 4;
} else {
subscription_id_type = Subscription_Type_IMPU; //default is END_USER_SIP_URI
}
More information about the sr-dev
mailing list