Hi

We have found that in kamailio processing if you:
1.  set msg->path_vec
2.  call msg_apply_changes()
3.  t_telay

The route-header of the outgoing message is set twice.

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.

To fix this:
--- a/modules/textopsx/textopsx.c
+++ b/modules/textopsx/textopsx.c
@@ -166,7 +166,7 @@ static int msg_apply_changes_f(sip_msg_t *msg, char *str1, char *str2)
        } else {
                obuf.s = build_req_buf_from_sip_req(msg,
                                (unsigned int*)&obuf.len, &dst,
-                               BUILD_NO_LOCAL_VIA|BUILD_NO_VIA1_UPDATE);
+                               BUILD_NO_PATH|BUILD_NO_LOCAL_VIA|BUILD_NO_VIA1_UPDATE);
        }
        if(obuf.s == NULL)
        {


This stops msg_apply_changes() from adding the router header if path is set.

Any objections to comitting this to master?  Might other functionality be effected?

The alternative is for msg_apply_changes() to add the router header but then unset the path.

Regards
Richard.

This email is subject to the disclaimer of Smile Communications at http://www.smilecoms.com/home/email-disclaimer/