Module: kamailio
Branch: master
Commit: 3f47038f3feaf13d080da289ecd39d9e37786ec3
URL:
https://github.com/kamailio/kamailio/commit/3f47038f3feaf13d080da289ecd39d9…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-11-12T09:33:11+01:00
tm: update local via if internal flags are set for local request
---
Modified: src/modules/tm/uac.c
---
Diff:
https://github.com/kamailio/kamailio/commit/3f47038f3feaf13d080da289ecd39d9…
Patch:
https://github.com/kamailio/kamailio/commit/3f47038f3feaf13d080da289ecd39d9…
---
diff --git a/src/modules/tm/uac.c b/src/modules/tm/uac.c
index f8cee24a6a..d01c722844 100644
--- a/src/modules/tm/uac.c
+++ b/src/modules/tm/uac.c
@@ -305,16 +305,20 @@ static inline int t_run_local_req(
setsflagsval(sflag_bk);
if (unlikely(ra_ctx.run_flags&DROP_R_F)) {
- LM_DBG("tm:local-request dropped msg. to %.*s\n",
+ LM_DBG("tm:local-request dropped msg. to %.*s\n",
lreq.dst_uri.len, lreq.dst_uri.s);
refresh_shortcuts = E_DROP;
goto clean;
}
+
/* rebuild the new message content */
- if(lreq.force_send_socket != uac_r->dialog->send_sock) {
- LM_DBG("Send socket updated to: %.*s",
+ if((lreq.force_send_socket != uac_r->dialog->send_sock)
+ || (lreq.msg_flags&(FL_ADD_LOCAL_RPORT|FL_ADD_SRVID
+ |FL_ADD_XAVP_VIA_PARAMS|FL_USE_XAVP_VIA_FIELDS))) {
+ LM_DBG("local Via update - socket: [%.*s] - msg-flags: %u",
lreq.force_send_socket->address_str.len,
- lreq.force_send_socket->address_str.s);
+ lreq.force_send_socket->address_str.s,
+ lreq.msg_flags);
/* rebuild local Via - remove previous value
* and add the one for the new send socket */