### Description
Kamailio fails to forward in-dialog request over TCP/TLS/WS/WSS connection.
### Troubleshooting
kamailio 5.2 branch has a commit
09ac3e47ef79dbd599b7dec5b84ae3b792f025ed cherry picked from master branch.
It makes sense for master because get_send_socket2() behavior has
changed and function became smarter and also there were some patches to
propagate connection it to the uac structure.
After applying this patch to 5.2.x kamailio searches for an outgoing socket, receives the
first one due to limitations of get_send_socket2() and SND_F_FORCE_SOCKET flag. Then it
fails to find an existing TCP connection by destination ip:port since it searches for a
connection associated with a wrong socket.
#### Log Messages
<!--
Check the syslog file and if there are relevant log messages printed by Kamailio, add them
next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
Dec 11 21:33:49 kamailio[17999]: WARNING: <core> [core/msg_translator.c:2832]:
via_builder(): TCP/TLS connection (id: 0) for WebSocket could not be found
Dec 11 21:33:49 kamailio[17999]: ERROR: tm [t_msgbuilder.c:1372]: assemble_via(): via
building failed
Dec 11 21:33:49 kamailio[17999]: ERROR: tm [t_msgbuilder.c:1540]: build_uac_req(): error
while assembling Via
Dec 11 21:33:49 kamailio[17999]: ERROR: tm [uac.c:517]: t_uac_prepare(): Error while
building message
Dec 11 21:33:49 kamailio[17999]: ERROR: presence [notify.c:1798]: send_notify_request():
in function tmb.t_request_within
Dec 11 21:33:49 kamailio[17999]: ERROR: presence [notify.c:1897]: notify(): sending
Notify not successful
Dec 11 21:33:49 kamailio[17999]: ERROR: presence [notify.c:1491]: publ_notify(): Could
not send notify for message-summary
```
### Possible Solutions
Delete mentioned commit from the 5.2 branch.
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull
request with a fix.
-->
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
5.2.5
```
* **Operating System**:
<!--
Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04,
CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;
Kernel details (output of `uname -a`)
-->
```
linux
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2181