Module: kamailio
Branch: master
Commit: 7da5e5b0a1f4520c7fdd7eeb23b4b58ecc27be22
URL:
https://github.com/kamailio/kamailio/commit/7da5e5b0a1f4520c7fdd7eeb23b4b58…
Author: Mikko Lehto <mslehto(a)iki.fi>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-02-20T21:59:07+01:00
tm: flag core to use forced socket when uac socket is set
- without flag SND_F_FORCE_SOCKET probing by dispatcher module
and route script function t_uac_send() will choose incorrect source socket
---
Modified: src/modules/tm/uac.c
---
Diff:
https://github.com/kamailio/kamailio/commit/7da5e5b0a1f4520c7fdd7eeb23b4b58…
Patch:
https://github.com/kamailio/kamailio/commit/7da5e5b0a1f4520c7fdd7eeb23b4b58…
---
diff --git a/src/modules/tm/uac.c b/src/modules/tm/uac.c
index 7b78a609b3..ff466760dd 100644
--- a/src/modules/tm/uac.c
+++ b/src/modules/tm/uac.c
@@ -428,6 +428,12 @@ static inline int t_uac_prepare(uac_req_t *uac_r,
/* new message => take the dialog send_socket if set, or the default
send_socket if not*/
SND_FLAGS_INIT(&snd_flags);
+
+ if (uac_r->dialog->send_sock != NULL)
+ {
+ snd_flags.f |= SND_F_FORCE_SOCKET;
+ }
+
#ifdef USE_DNS_FAILOVER
if ((uri2dst2(cfg_get(core, core_cfg, use_dns_failover) ? &new_cell->uac[0].dns_h
: 0,
&dst, uac_r->dialog->send_sock, snd_flags,