Module: kamailio
Branch: master
Commit: a752411df65b93f82aaad43a767cff102f5a6100
URL:
https://github.com/kamailio/kamailio/commit/a752411df65b93f82aaad43a767cff1…
Author: Henning Westerholt <hw(a)skalatan.de>
Committer: Henning Westerholt <hw(a)skalatan.de>
Date: 2020-03-24T22:43:42+01:00
uac: also set socket for in dialog REGISTER (GH #2262)
---
Modified: src/modules/uac/uac_reg.c
---
Diff:
https://github.com/kamailio/kamailio/commit/a752411df65b93f82aaad43a767cff1…
Patch:
https://github.com/kamailio/kamailio/commit/a752411df65b93f82aaad43a767cff1…
---
diff --git a/src/modules/uac/uac_reg.c b/src/modules/uac/uac_reg.c
index f35fedf384..c0cd5179b8 100644
--- a/src/modules/uac/uac_reg.c
+++ b/src/modules/uac/uac_reg.c
@@ -1131,6 +1131,19 @@ int uac_reg_update(reg_uac_t *reg, time_t tn)
/* Callback parameter */
uac_r.cbp = (void*)uuid;
+ if(reg->socket.s != NULL && reg->socket.len > 0) {
+ /* custom socket */
+ LM_DBG("using custom socket %.*s to send request\n",
+ reg->socket.len, reg->socket.s);
+ uac_r.ssock = ®->socket;
+ } else {
+ /* default socket */
+ if(uac_default_socket.s != NULL && uac_default_socket.len > 0) {
+ LM_DBG("using configured default_socket to send request\n");
+ uac_r.ssock = &uac_default_socket;
+ }
+ }
+
if (reg_keep_callid && reg->flags & UAC_REG_ONLINE
&& reg->cseq > 0 && reg->cseq < 2147483638
&& reg->callid.len > 0)
@@ -1150,19 +1163,6 @@ int uac_reg_update(reg_uac_t *reg, time_t tn)
ret = uac_tmb.t_request_within(&uac_r);
} else {
- /* custom socket */
- if(reg->socket.s != NULL && reg->socket.len > 0) {
- LM_DBG("using custom socket %.*s to send request\n",
- reg->socket.len, reg->socket.s);
- uac_r.ssock = ®->socket;
- }
- /* default socket */
- else {
- if(uac_default_socket.s != NULL && uac_default_socket.len > 0) {
- LM_DBG("using configured default_socket to send request\n");
- uac_r.ssock = &uac_default_socket;
- }
- }
ret = uac_tmb.t_request(&uac_r, /* UAC Req */
&s_ruri, /* Request-URI */
&s_turi, /* To */