[sr-dev] git:master:4e7f8b5f: Do proper lookup on tel: URI's

Carsten Bock carsten at ng-voice.com
Tue Jan 27 14:06:27 CET 2015


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

Author: Carsten Bock <carsten at ng-voice.com>
Committer: Carsten Bock <carsten at ng-voice.com>
Date: 2015-01-27T15:06:13+02:00

Do proper lookup on tel: URI's

---

Modified: modules/ims_registrar_scscf/lookup.c

---

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

---

diff --git a/modules/ims_registrar_scscf/lookup.c b/modules/ims_registrar_scscf/lookup.c
index b3b58a9..ee89d39 100644
--- a/modules/ims_registrar_scscf/lookup.c
+++ b/modules/ims_registrar_scscf/lookup.c
@@ -68,14 +68,26 @@ int lookup(struct sip_msg* _m, udomain_t* _d) {
     flag_t old_bflags;
     int i = 0;
 
+	req = _m;	
+	if (!req){
+		LM_ERR("NULL message!!!\n");
+		return -1;
+	}
+ 	if (req->first_line.type!=SIP_REQUEST){
+ 		req = get_request_from_reply(req);
+ 	}
+	
+	if (_m->new_uri.s) uri = _m->new_uri;
+	else uri = _m->first_line.u.request.uri;
+		
+	for(i=0;i<uri.len;i++)
+		if (uri.s[i]==';' || uri.s[i]=='?') {
+			uri.len = i;
+			break;
+		}
+	
+	LM_DBG("Looking for <%.*s>\n",uri.len,uri.s);
 
-    if (_m->new_uri.s) uri = _m->new_uri;
-    else uri = _m->first_line.u.request.uri;
-
-    if (extract_aor(&uri, &aor) < 0) {
-	LM_ERR("failed to extract address of record\n");
-	return -3;
-    }
 
     get_act_time();
 




More information about the sr-dev mailing list