[sr-dev] git:master: modules/ims_charging: allow E164 to be used as subscription-type in CCR requests

Richard Good richard.good at smilecoms.com
Tue Feb 11 07:45:08 CET 2014


Module: sip-router
Branch: master
Commit: b6abf075448de90a7b135dfa42e58fa61255ca2e
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b6abf075448de90a7b135dfa42e58fa61255ca2e

Author: Richard Good <richard.good at smilecoms.com>
Committer: Richard Good <richard.good at 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");




More information about the sr-dev mailing list