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

Author: Xenofon Karamanos <x...@gilawa.com>
Committer: Henning Westerholt <h...@gilawa.com>
Date: 2025-06-17T09:09:49+02:00

outbound: Use outbound if Register contains Contacts:* and Expires:0

---

Modified: src/modules/outbound/outbound_mod.c

---

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

---

diff --git a/src/modules/outbound/outbound_mod.c 
b/src/modules/outbound/outbound_mod.c
index a5f17e4ef99..1524b9b4417 100644
--- a/src/modules/outbound/outbound_mod.c
+++ b/src/modules/outbound/outbound_mod.c
@@ -38,6 +38,7 @@
 #include "../../core/sr_module.h"
 #include "../../core/counters.h"
 #include "../../core/parser/contact/parse_contact.h"
+#include "../../core/parser/parse_expires.h"
 #include "../../core/parser/parse_rr.h"
 #include "../../core/parser/parse_uri.h"
 #include "../../core/parser/parse_supported.h"
@@ -324,6 +325,14 @@ static int use_outbound_register(struct sip_msg *msg)
                        LM_ERR("parsing Contact: header body\n");
                        return 0;
                }
+
+               if(((contact_body_t *)msg->contact->parsed)->star
+                               && ((exp_body_t *)msg->expires->parsed)->val == 
0) {
+                       LM_DBG("found REGISTER with * in Contact: header body 
and Expires "
+                                  ": 0 - outbound used\n");
+                       return 1;
+               }
+
                contact = ((contact_body_t *)msg->contact->parsed)->contacts;
                if(!contact) {
                        LM_ERR("empty Contact:\n");

_______________________________________________
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to