Module: kamailio
Branch: 6.0
Commit: d56fd00cc6850b0e2130bb8e03f0aa53488ff3bb
URL: 
https://github.com/kamailio/kamailio/commit/d56fd00cc6850b0e2130bb8e03f0aa53488ff3bb

Author: Victor Seva <[email protected]>
Committer: Victor Seva <[email protected]>
Date: 2025-10-27T09:34:01+01:00

ims_usrloc_scscf: fix contact_port_ip_match()

* same logic as in 22db60c1e29c26caacf4356849d2d1d550d68617

(cherry picked from commit 0cae5fa009ce1385a3a131523685f74bef5514b6)

---

Modified: src/modules/ims_usrloc_scscf/impurecord.c

---

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

---

diff --git a/src/modules/ims_usrloc_scscf/impurecord.c 
b/src/modules/ims_usrloc_scscf/impurecord.c
index f3ddaba3a89..b0ef84395df 100644
--- a/src/modules/ims_usrloc_scscf/impurecord.c
+++ b/src/modules/ims_usrloc_scscf/impurecord.c
@@ -712,6 +712,13 @@ int aor_to_contact(str *aor, str *contact)
                contact->len = p - contact->s;
        }
 
+       // remove default port 5060
+       if((p = memchr(contact->s, ':', contact->len))) {
+               if(contact->len - (p - contact->s) == 5 && !memcmp(p, ":5060", 
5)) {
+                       contact->len -= 5;
+               }
+       }
+
        return ret;
 }
 

_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to