Module: kamailio Branch: 5.2 Commit: 09985a448ffd34375be0d93f4b16f17c7dac3dc0 URL: https://github.com/kamailio/kamailio/commit/09985a448ffd34375be0d93f4b16f17c...
Author: Henning Westerholt hw@skalatan.de Committer: Henning Westerholt hw@skalatan.de Date: 2020-03-25T14:54:53+01:00
uac: also set socket for in dialog REGISTER (GH #2262)
(cherry picked from commit a752411df65b93f82aaad43a767cff102f5a6100)
---
Modified: src/modules/uac/uac_reg.c
---
Diff: https://github.com/kamailio/kamailio/commit/09985a448ffd34375be0d93f4b16f17c... Patch: https://github.com/kamailio/kamailio/commit/09985a448ffd34375be0d93f4b16f17c...
---
diff --git a/src/modules/uac/uac_reg.c b/src/modules/uac/uac_reg.c index f75c7cf38a..b944ebf4f9 100644 --- a/src/modules/uac/uac_reg.c +++ b/src/modules/uac/uac_reg.c @@ -1150,6 +1150,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)