Module: sip-router
Branch: master
Commit: b6abf075448de90a7b135dfa42e58fa61255ca2e
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b6abf07…
Author: Richard Good <richard.good(a)smilecoms.com>
Committer: Richard Good <richard.good(a)smilecoms.com>
Date: Tue Feb 11 08:44:26 2014 +0200
modules/ims_charging: allow E164 to be used as subscription-type in CCR requests
---
modules/ims_charging/ims_ro.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/modules/ims_charging/ims_ro.c b/modules/ims_charging/ims_ro.c
index 72a6fe5..da2e3d8 100644
--- a/modules/ims_charging/ims_ro.c
+++ b/modules/ims_charging/ims_ro.c
@@ -458,10 +458,15 @@ Ro_CCR_t * dlg_create_ro_session(struct sip_msg * req, struct
sip_msg * reply, A
event_type = 0;
time_stamps = 0;
- subscr.type = Subscription_Type_IMPU;
+
subscr.id.s = from_uri.s;
subscr.id.len = from_uri.len;
-
+ if (strncasecmp(subscr.id.s,"tel:",4)==0) {
+ subscr.type = Subscription_Type_MSISDN;
+ }else{
+ subscr.type = Subscription_Type_IMPU; //default is END_USER_SIP_URI
+ }
+
ro_ccr_data = new_Ro_CCR(acc_record_type, &user_name, ims_info, &subscr);
if (!ro_ccr_data) {
LM_ERR("dlg_create_ro_session: no memory left for generic\n");