Browse code

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

(cherry picked from commit 7da5e5b0a1f4520c7fdd7eeb23b4b58ecc27be22)
(cherry picked from commit fc77e25b48c4ec1b9988925faa50d00c4fd296b3)

Mikko Lehto authored on 19/02/2018 23:32:39 • Daniel-Constantin Mierla committed on 22/02/2018 10:06:47
Showing 1 changed files
... ...
@@ -428,6 +428,12 @@ static inline int t_uac_prepare(uac_req_t *uac_r,
428 428
 	/* new message => take the dialog send_socket if set, or the default
429 429
 	  send_socket if not*/
430 430
 	SND_FLAGS_INIT(&snd_flags);
431
+
432
+	if (uac_r->dialog->send_sock != NULL)
433
+	{
434
+		snd_flags.f |= SND_F_FORCE_SOCKET;
435
+	}
436
+
431 437
 #ifdef USE_DNS_FAILOVER
432 438
 	if ((uri2dst2(cfg_get(core, core_cfg, use_dns_failover) ? &new_cell->uac[0].dns_h : 0,
433 439
 			&dst, uac_r->dialog->send_sock, snd_flags,