### 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
Module: kamailio
Branch: 5.2
Commit: 3dee7c6488eb143141becf47e0edd2f3e6ce3cef
URL: https://github.com/kamailio/kamailio/commit/3dee7c6488eb143141becf47e0edd2f…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2020-03-02T09:27:46+01:00
pua_dialoginfo: fix doc for puburi_calle[e|r]_avp type
(cherry picked from commit cd94a88d21c6d649d63791ba509845a38a6eb76b)
---
Modified: src/modules/pua_dialoginfo/doc/pua_dialoginfo_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/3dee7c6488eb143141becf47e0edd2f…
Patch: https://github.com/kamailio/kamailio/commit/3dee7c6488eb143141becf47e0edd2f…
---
diff --git a/src/modules/pua_dialoginfo/doc/pua_dialoginfo_admin.xml b/src/modules/pua_dialoginfo/doc/pua_dialoginfo_admin.xml
index 2d154c1d27..c869344c17 100644
--- a/src/modules/pua_dialoginfo/doc/pua_dialoginfo_admin.xml
+++ b/src/modules/pua_dialoginfo/doc/pua_dialoginfo_admin.xml
@@ -435,7 +435,7 @@ modparam("pua_dialoginfo", "use_pubruri_avps", 1)
</section>
<section>
- <title><varname>pubruri_caller_avp</varname> (int)</title>
+ <title><varname>pubruri_caller_avp</varname> (str)</title>
<para>
If use_pubruri_avps is enabled, PUBLISH-requests reporting dialog-information about the caller (entity=caller) are sent using the value of the specified avp as R-Uri.
If multiple AVPs with the same name (but different indexes) are present, for each value a corresponding PUBLISH-request is generated.
@@ -455,7 +455,7 @@ modparam("pua_dialoginfo", "pubruri_caller_avp", "$avp(s:puburis_caller)")
</section>
<section>
- <title><varname>pubruri_callee_avp</varname> (int)</title>
+ <title><varname>pubruri_callee_avp</varname> (str)</title>
<para>
If use_pubruri_avps is enabled, PUBLISH-requests reporting dialog-information about the callee (entity=callee) are sent using the value of the specified avp as R-Uri.
If multiple AVPs with the same name (but different indexes) are present, for each value a corresponding PUBLISH-request is generated.
Module: kamailio
Branch: 5.2
Commit: 6ece7d8288aca10a6d653f164df5b386ed3eb63e
URL: https://github.com/kamailio/kamailio/commit/6ece7d8288aca10a6d653f164df5b38…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2020-03-02T09:27:42+01:00
pua_dialoginfo: fix doc for pubruri_callee_dlg_var type
(cherry picked from commit ee34fa46d008426f710c38bf247f4dac9e11bfe7)
---
Modified: src/modules/pua_dialoginfo/doc/pua_dialoginfo_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/6ece7d8288aca10a6d653f164df5b38…
Patch: https://github.com/kamailio/kamailio/commit/6ece7d8288aca10a6d653f164df5b38…
---
diff --git a/src/modules/pua_dialoginfo/doc/pua_dialoginfo_admin.xml b/src/modules/pua_dialoginfo/doc/pua_dialoginfo_admin.xml
index b3422ef12c..2d154c1d27 100644
--- a/src/modules/pua_dialoginfo/doc/pua_dialoginfo_admin.xml
+++ b/src/modules/pua_dialoginfo/doc/pua_dialoginfo_admin.xml
@@ -497,7 +497,7 @@ modparam("pua_dialoginfo", "pubruri_caller_dlg_var", "pubruri_caller")
</section>
<section id="pua_dialoginfo.p.pubruri_callee_dlg_var">
- <title><varname>pubruri_callee_dlg_var</varname> (int)</title>
+ <title><varname>pubruri_callee_dlg_var</varname> (str)</title>
<para>
Must be set to the name of dialog variable where to store
the URI for callee, used to send the notifications. This is needed
Module: kamailio
Branch: 5.3
Commit: 34dffb148e2fa3e9d354532817acf490ac8c8e95
URL: https://github.com/kamailio/kamailio/commit/34dffb148e2fa3e9d354532817acf49…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2020-03-02T09:27:14+01:00
pua_dialoginfo: fix doc for puburi_calle[e|r]_avp type
(cherry picked from commit cd94a88d21c6d649d63791ba509845a38a6eb76b)
---
Modified: src/modules/pua_dialoginfo/doc/pua_dialoginfo_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/34dffb148e2fa3e9d354532817acf49…
Patch: https://github.com/kamailio/kamailio/commit/34dffb148e2fa3e9d354532817acf49…
---
diff --git a/src/modules/pua_dialoginfo/doc/pua_dialoginfo_admin.xml b/src/modules/pua_dialoginfo/doc/pua_dialoginfo_admin.xml
index 2d154c1d27..c869344c17 100644
--- a/src/modules/pua_dialoginfo/doc/pua_dialoginfo_admin.xml
+++ b/src/modules/pua_dialoginfo/doc/pua_dialoginfo_admin.xml
@@ -435,7 +435,7 @@ modparam("pua_dialoginfo", "use_pubruri_avps", 1)
</section>
<section>
- <title><varname>pubruri_caller_avp</varname> (int)</title>
+ <title><varname>pubruri_caller_avp</varname> (str)</title>
<para>
If use_pubruri_avps is enabled, PUBLISH-requests reporting dialog-information about the caller (entity=caller) are sent using the value of the specified avp as R-Uri.
If multiple AVPs with the same name (but different indexes) are present, for each value a corresponding PUBLISH-request is generated.
@@ -455,7 +455,7 @@ modparam("pua_dialoginfo", "pubruri_caller_avp", "$avp(s:puburis_caller)")
</section>
<section>
- <title><varname>pubruri_callee_avp</varname> (int)</title>
+ <title><varname>pubruri_callee_avp</varname> (str)</title>
<para>
If use_pubruri_avps is enabled, PUBLISH-requests reporting dialog-information about the callee (entity=callee) are sent using the value of the specified avp as R-Uri.
If multiple AVPs with the same name (but different indexes) are present, for each value a corresponding PUBLISH-request is generated.
Module: kamailio
Branch: 5.3
Commit: e2d4024a73306b3efc28b321e5d5d32b96601278
URL: https://github.com/kamailio/kamailio/commit/e2d4024a73306b3efc28b321e5d5d32…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2020-03-02T09:26:54+01:00
pua_dialoginfo: fix doc for pubruri_callee_dlg_var type
(cherry picked from commit ee34fa46d008426f710c38bf247f4dac9e11bfe7)
---
Modified: src/modules/pua_dialoginfo/doc/pua_dialoginfo_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/e2d4024a73306b3efc28b321e5d5d32…
Patch: https://github.com/kamailio/kamailio/commit/e2d4024a73306b3efc28b321e5d5d32…
---
diff --git a/src/modules/pua_dialoginfo/doc/pua_dialoginfo_admin.xml b/src/modules/pua_dialoginfo/doc/pua_dialoginfo_admin.xml
index b3422ef12c..2d154c1d27 100644
--- a/src/modules/pua_dialoginfo/doc/pua_dialoginfo_admin.xml
+++ b/src/modules/pua_dialoginfo/doc/pua_dialoginfo_admin.xml
@@ -497,7 +497,7 @@ modparam("pua_dialoginfo", "pubruri_caller_dlg_var", "pubruri_caller")
</section>
<section id="pua_dialoginfo.p.pubruri_callee_dlg_var">
- <title><varname>pubruri_callee_dlg_var</varname> (int)</title>
+ <title><varname>pubruri_callee_dlg_var</varname> (str)</title>
<para>
Must be set to the name of dialog variable where to store
the URI for callee, used to send the notifications. This is needed
Module: kamailio
Branch: master
Commit: cd94a88d21c6d649d63791ba509845a38a6eb76b
URL: https://github.com/kamailio/kamailio/commit/cd94a88d21c6d649d63791ba509845a…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2020-03-02T09:24:29+01:00
pua_dialoginfo: fix doc for puburi_calle[e|r]_avp type
---
Modified: src/modules/pua_dialoginfo/doc/pua_dialoginfo_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/cd94a88d21c6d649d63791ba509845a…
Patch: https://github.com/kamailio/kamailio/commit/cd94a88d21c6d649d63791ba509845a…
---
diff --git a/src/modules/pua_dialoginfo/doc/pua_dialoginfo_admin.xml b/src/modules/pua_dialoginfo/doc/pua_dialoginfo_admin.xml
index 2d154c1d27..c869344c17 100644
--- a/src/modules/pua_dialoginfo/doc/pua_dialoginfo_admin.xml
+++ b/src/modules/pua_dialoginfo/doc/pua_dialoginfo_admin.xml
@@ -435,7 +435,7 @@ modparam("pua_dialoginfo", "use_pubruri_avps", 1)
</section>
<section>
- <title><varname>pubruri_caller_avp</varname> (int)</title>
+ <title><varname>pubruri_caller_avp</varname> (str)</title>
<para>
If use_pubruri_avps is enabled, PUBLISH-requests reporting dialog-information about the caller (entity=caller) are sent using the value of the specified avp as R-Uri.
If multiple AVPs with the same name (but different indexes) are present, for each value a corresponding PUBLISH-request is generated.
@@ -455,7 +455,7 @@ modparam("pua_dialoginfo", "pubruri_caller_avp", "$avp(s:puburis_caller)")
</section>
<section>
- <title><varname>pubruri_callee_avp</varname> (int)</title>
+ <title><varname>pubruri_callee_avp</varname> (str)</title>
<para>
If use_pubruri_avps is enabled, PUBLISH-requests reporting dialog-information about the callee (entity=callee) are sent using the value of the specified avp as R-Uri.
If multiple AVPs with the same name (but different indexes) are present, for each value a corresponding PUBLISH-request is generated.