### 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 ```
Somehow this issue report was not addressed yet ... does this happen for all calls in mutli homed deployment? Have you tried with the patch of commit 09ac3e4 reverted?
Yes, it happened to all calls in multi homed deployment and reverting [09ac3e4](https://github.com/kamailio/kamailio/commit/09ac3e47ef79dbd599b7dec5b84ae3b7...) helped to fix it.
Commit reverted in branch 5.2.
Did you have any chance to test with 5.3 to see if there was any side effect of the same commit?
@miconda We faced same issue. Commit https://github.com/kamailio/kamailio/commit/8d608d1c3ed0fe4c69cb02868b746cd0... broke tcp connections lookup in kamailio 5.3.2 as well
I reverted in master and 5.3 branches. I am closing this one, if any new problem reopen or create a new issue.
Closed #2181.