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

Author: Torrey Searle <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2025-12-01T11:09:29+01:00

topos: make tps parameter lookup more robust

check both params and sip_params for the tps parameter, this is needed
in case extra parameters added to the URI.

closes #4505

---

Modified: src/modules/topos/tps_msg.c

---

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

---

diff --git a/src/modules/topos/tps_msg.c b/src/modules/topos/tps_msg.c
index 7fff763fe26..f2d823343f9 100644
--- a/src/modules/topos/tps_msg.c
+++ b/src/modules/topos/tps_msg.c
@@ -331,8 +331,13 @@ int tps_dlg_message_update(sip_msg_t *msg, tps_data_t 
*ptsd, int ctmode)
                        return 1;
                }
                /* find the r-uri parameter */
-               ret = tps_get_param_value(
-                               &msg->parsed_uri.params, &_tps_cparam_name, 
&tuuid);
+               if(msg->parsed_uri.sip_params.len > 0) {
+                       ret = tps_get_param_value(
+                                       &msg->parsed_uri.sip_params, 
&_tps_cparam_name, &tuuid);
+               } else {
+                       ret = tps_get_param_value(
+                                       &msg->parsed_uri.params, 
&_tps_cparam_name, &tuuid);
+               }
                if(ret < 0) {
                        LM_ERR("failed to parse param\n");
                        return -1;

_______________________________________________
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