[sr-dev] git:master:b262f704: Merge pull request #649 from athonet-open/fix-ims_registrar_pcscf
ng-voice GmbH
info at ng-voice.com
Wed Jun 1 13:05:43 CEST 2016
Module: kamailio
Branch: master
Commit: b262f704c0cab19c8ada39c36c6f7cf51cd72be6
URL: https://github.com/kamailio/kamailio/commit/b262f704c0cab19c8ada39c36c6f7cf51cd72be6
Author: ng-voice GmbH <info at ng-voice.com>
Committer: ng-voice GmbH <info at ng-voice.com>
Date: 2016-06-01T13:05:36+02:00
Merge pull request #649 from athonet-open/fix-ims_registrar_pcscf
ims_registrar_pcscf: fix getContactP() for is_registered_fallback2ip param.
---
Modified: modules/ims_registrar_pcscf/service_routes.c
---
Diff: https://github.com/kamailio/kamailio/commit/b262f704c0cab19c8ada39c36c6f7cf51cd72be6.diff
Patch: https://github.com/kamailio/kamailio/commit/b262f704c0cab19c8ada39c36c6f7cf51cd72be6.patch
---
diff --git a/modules/ims_registrar_pcscf/service_routes.c b/modules/ims_registrar_pcscf/service_routes.c
index 3d29d61..bcdb368 100644
--- a/modules/ims_registrar_pcscf/service_routes.c
+++ b/modules/ims_registrar_pcscf/service_routes.c
@@ -228,6 +228,9 @@ pcontact_t * getContactP(struct sip_msg* _m, udomain_t* _d, enum pcontact_reg_st
search_ci.received_port = _m->rcv.src_port;
search_ci.received_proto = _m->rcv.proto;
search_ci.searchflag = SEARCH_RECEIVED;
+ if (is_registered_fallback2ip == 1) {
+ search_ci.searchflag = SEARCH_NORMAL;
+ }
search_ci.via_host = host;
search_ci.via_port = port;
search_ci.via_prot = proto;
@@ -255,6 +258,7 @@ pcontact_t * getContactP(struct sip_msg* _m, udomain_t* _d, enum pcontact_reg_st
LM_INFO("Contact not found based on Contact-header, trying IP/Port/Proto\n");
// received_host.len = ip_addr2sbuf(&_m->rcv.src_ip, srcip, sizeof(srcip));
// received_host.s = srcip;
+ search_ci.searchflag = SEARCH_RECEIVED;
if (ul.get_pcontact(_d, &search_ci, &c) == 1) {
LM_DBG("No entry in usrloc for %.*s:%i (Proto %i) found!\n", received_host.len, received_host.s, _m->rcv.src_port, _m->rcv.proto);
} else {
@@ -264,6 +268,17 @@ pcontact_t * getContactP(struct sip_msg* _m, udomain_t* _d, enum pcontact_reg_st
}
}
+ if ((c == NULL) && (is_registered_fallback2ip == 2)) {
+ LM_INFO("Contact not found based on IP/Port/Proto, trying Contact-header\n");
+ search_ci.searchflag = SEARCH_NORMAL;
+ if (ul.get_pcontact(_d, &search_ci, &c) == 1) {
+ } else {
+ if (checkcontact(_m, c) != 0) {
+ c = NULL;
+ }
+ }
+ }
+
asserted_identity = NULL;
registration_contact = NULL;
if (c) {
More information about the sr-dev
mailing list