Module: kamailio Branch: master Commit: f57f4045ac8a08585c573dcc1eb257102be1a2a9 URL: https://github.com/kamailio/kamailio/commit/f57f4045ac8a08585c573dcc1eb257102be1a2a9
Author: Victor Seva <[email protected]> Committer: Victor Seva <[email protected]> Date: 2025-09-05T09:42:51+02:00 ims_registrar_scscf: fix contact_port_ip_match() It was not matching comparation when default port was omitted > ims_registrar_scscf [registrar_notify.c:1556]: contact_port_ip_match(): > Matching contact using only port and ip - comparing [127.169.7.104] and > [127.169.7.104:5060] --- Modified: src/modules/ims_registrar_scscf/registrar_notify.c --- Diff: https://github.com/kamailio/kamailio/commit/f57f4045ac8a08585c573dcc1eb257102be1a2a9.diff Patch: https://github.com/kamailio/kamailio/commit/f57f4045ac8a08585c573dcc1eb257102be1a2a9.patch --- diff --git a/src/modules/ims_registrar_scscf/registrar_notify.c b/src/modules/ims_registrar_scscf/registrar_notify.c index 4d32390c41a..27006d6a7ce 100644 --- a/src/modules/ims_registrar_scscf/registrar_notify.c +++ b/src/modules/ims_registrar_scscf/registrar_notify.c @@ -1517,6 +1517,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!
