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

Author: Gustavo Almeida <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2026-07-01T09:00:26+02:00

path: include also ;transport

---

Modified: src/modules/path/path.c

---

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

---

diff --git a/src/modules/path/path.c b/src/modules/path/path.c
index c92d13d9d0b..8cbefaf1935 100644
--- a/src/modules/path/path.c
+++ b/src/modules/path/path.c
@@ -249,8 +249,15 @@ static int prepend_path(sip_msg_t *_m, str *user, 
path_param_t param,
                l = insert_new_lump_before(l, dp, adv_addr->len, 0);
                if(!l)
                        goto out2;
-               /* the advertised address replaces the host part only, so the 
socket
-                * name still has to be appended at send time if sockname_mode 
is on */
+               dp = path_strzdup(TRANSPORT_PARAM, TRANSPORT_PARAM_LEN);
+               if(dp == NULL)
+                       goto out2;
+               l = insert_new_lump_before(l, dp, TRANSPORT_PARAM_LEN, 0);
+               if(!l)
+                       goto out2;
+               l = insert_subst_lump_before(l, SUBST_SND_PROTO, 0);
+               if(!l)
+                       goto out2;
                if(path_sockname_mode) {
                        l = insert_subst_lump_before(l, SUBST_SND_SOCKNAME, 0);
                        if(!l)
@@ -278,6 +285,15 @@ static int prepend_path(sip_msg_t *_m, str *user, 
path_param_t param,
                        if(dp == NULL)
                                goto out1;
                        l = insert_new_lump_before(l, dp, adv_addr->len, 0);
+                       if(!l)
+                               goto out1;
+                       dp = path_strzdup(TRANSPORT_PARAM, TRANSPORT_PARAM_LEN);
+                       if(dp == NULL)
+                               goto out1;
+                       l = insert_new_lump_before(l, dp, TRANSPORT_PARAM_LEN, 
0);
+                       if(!l)
+                               goto out1;
+                       l = insert_subst_lump_before(l, SUBST_RCV_PROTO, 0);
                        if(!l)
                                goto out1;
                        if(path_sockname_mode) {

_______________________________________________
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