[sr-dev] git:master:7da5e5b0: tm: flag core to use forced socket when uac socket is set

Daniel-Constantin Mierla miconda at gmail.com
Tue Feb 20 21:59:12 CET 2018


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

Author: Mikko Lehto <mslehto at iki.fi>
Committer: Daniel-Constantin Mierla <miconda at 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/7da5e5b0a1f4520c7fdd7eeb23b4b58ecc27be22.diff
Patch: https://github.com/kamailio/kamailio/commit/7da5e5b0a1f4520c7fdd7eeb23b4b58ecc27be22.patch

---

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,




More information about the sr-dev mailing list