<div dir="ltr"><div><div><div><div>Hi<br><br></div>We have found that in kamailio processing if you:<br>1.  set msg->path_vec<br>2.  call msg_apply_changes()<br>3.  t_telay<br><br></div>The route-header of the outgoing message is set twice.<br>
<br></div>We think this is because msg_apply_changes() adds the router header if the path is set - but leaves the path set.  So the router header is added again when you t_relay.<br><br></div>To fix this:<br>--- a/modules/textopsx/textopsx.c<br>
+++ b/modules/textopsx/textopsx.c<br>@@ -166,7 +166,7 @@ static int msg_apply_changes_f(sip_msg_t *msg, char *str1, char *str2)<br>        } else {<br>                obuf.s = build_req_buf_from_sip_req(msg,<br>                                (unsigned int*)&obuf.len, &dst,<br>
-                               BUILD_NO_LOCAL_VIA|BUILD_NO_VIA1_UPDATE);<br>+                               BUILD_NO_PATH|BUILD_NO_LOCAL_VIA|BUILD_NO_VIA1_UPDATE);<br>        }<br>        if(obuf.s == NULL)<br>        {<br>
<br><div><div><div><div><br></div><div>This stops msg_apply_changes() from adding the router header if path is set.<br><br></div><div>Any objections to comitting this to master?  Might other functionality be effected?<br>
<br></div><div>The alternative is for msg_apply_changes() to add the router header but then unset the path.<br></div><div><br></div><div>Regards<br>Richard.<br></div></div></div></div></div>

<br>
<span><font color="#888888"><pre>This email is subject to the disclaimer of Smile Communications at <a href="http://www.smilecoms.com/home/email-disclaimer/" target="_blank">http://www.smilecoms.com/home/<WBR>email-disclaimer/</a><a href="http://www.smilecoms.com/disclaimer" target="_blank"></a></pre></font></span>