pwakano created an issue (kamailio/kamailio#4404)
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature
requests. Please use this template only for bug reports.
If you have questions about using Kamailio or related to its configuration
file, ask on sr-users mailing list:
*
https://lists.kamailio.org/mailman3/postorius/lists/sr-users.lists.kamailio.org/
If you have questions about developing extensions to Kamailio or its existing C
code, ask on sr-dev mailing list:
*
https://lists.kamailio.org/mailman3/postorius/lists/sr-dev.lists.kamailio.org/
Please try to fill this template as much as possible for any issue. It helps
the developers to troubleshoot the issue.
Note that an issue report may be closed automatically after about 2 months
if there is no interest from developers or community users on pursuing it, being
considered expired. In such case, it can be reopened by writing a comment that
includes
the token `/notexpired`. About two weeks before considered expired, the issue is
marked with the label `stale`, trying to notify the submitter and everyone else
that might be interested in it. To remove the label `stale`, write a comment
that
includes the token `/notstale`. Also, any comment postpone the `expire`
timeline,
being considered that there is interest in pursuing the issue.
If there is no content to be filled in a section, the entire section can be
removed.
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a
comment).
-->
### Description
Dialog timeout is not sending the BYE to the callee in case of the caller is a
webrtc client and the websocket was closed.
When the dialog times out, it is expected that the BYE is sent to both sides
even if it fails for one of them.
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
### Troubleshooting
#### Reproduction
<!--
If the issue can be reproduced, describe how it can be done.
-->
My scenario is:
- Have modparam("dialog", "send_bye", 1) in the config
- webrtc client makes a call to a UDP destination via Kamailio
- the websocket is closed (can be done by closing the browser tab)
- this situation is captured with an event_route[websocket:closed] where I
retrieve the dialog details and call the dlg_set_timeout("1",
"$(var(h_entry}{s.int})", "$(var(h_id)}{s.int})") to terminate the UDP side of
the call
- after the timeout, the BYE to the caller fails because it can't resolve the
invalid webrtc domain, and then the BYE to the callee is not sent
#### 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).
-->
```
/usr/sbin/kamailio[494381]: DEBUG: <<null>:0> dialog [dlg_req_within.c:432]:
send_bye(): sending BYE to caller
/usr/sbin/kamailio[494381]: DEBUG: <<null>:0> tm [h_table.c:584]:
tm_xdata_replace(): replace existing list in backup xd from new xd
/usr/sbin/kamailio[494381]: DEBUG: <<null>:0> tm [h_table.c:417]: build_cell():
created new cell 0x7f710bed06d0
/usr/sbin/kamailio[494381]: DEBUG: <<null>:0> tm [h_table.c:572]:
tm_xdata_replace(): restore X/AVP msg context from backup data
/usr/sbin/kamailio[494381]: DEBUG: <<null>:0> tm [uac.c:520]: t_uac_prepare():
next_hop=<sip:[email protected];transport=wss;ob>
/usr/sbin/kamailio[494381]: DEBUG: <<null>:0> <core> [core/resolve.c:1282]:
srv_sip_resolvehost(): mywebrtc.invalid:0 proto=0
/usr/sbin/kamailio[494381]: DEBUG: <<null>:0> <core> [core/resolve.c:795]:
get_record(): lookup(_sip._udp.mywebrtc.invalid, 33) failed
/usr/sbin/kamailio[494381]: DEBUG: <<null>:0> <core> [core/resolve.c:1386]:
srv_sip_resolvehost(): no SRV record found for mywebrtc.invalid, trying
'normal' lookup...
/usr/sbin/kamailio[494381]: DEBUG: <<null>:0> <core> [core/resolve.c:1399]:
srv_sip_resolvehost(): returning (nil) (mywebrtc.invalid:5060 proto=1)
/usr/sbin/kamailio[494381]: ERROR: <<null>:0> <core> [core/resolve.c:1773]:
sip_hostport2su(): could not resolve hostname: "mywebrtc.invalid"
/usr/sbin/kamailio[494381]: ERROR: <<null>:0> tm [ut.h:302]: uri2dst2(): failed
to resolve "mywebrtc.invalid"
/usr/sbin/kamailio[494381]: ERROR: <<null>:0> tm [uac.c:546]: t_uac_prepare():
no socket found
/usr/sbin/kamailio[494381]: DEBUG: <<null>:0> tm [h_table.c:135]:
free_cell_helper(): freeing transaction 0x7f710bed06d0 from uac.c:697
/usr/sbin/kamailio[494381]: ERROR: <<null>:0> dialog [dlg_req_within.c:459]:
send_bye(): failed to send the BYE request
/usr/sbin/kamailio[494381]: DEBUG: <<null>:0> dialog [dlg_hash.c:1090]:
dlg_unref_helper(): unref op on 0x7f710be71730 with 1 from dlg_handlers.c:1657
/usr/sbin/kamailio[494381]: DEBUG: <<null>:0> dialog [dlg_hash.c:1094]:
dlg_unref_helper(): unref dlg 0x7f710be71730 with 1 -> 1
/usr/sbin/kamailio[494381]: DEBUG: <<null>:0> dialog [dlg_hash.c:1090]:
dlg_unref_helper(): unref op on 0x7f710be71730 with 1 from dlg_handlers.c:1660
/usr/sbin/kamailio[494381]: DEBUG: <<null>:0> dialog [dlg_hash.c:1094]:
dlg_unref_helper(): unref dlg 0x7f710be71730 with 1 -> 0
/usr/sbin/kamailio[494381]: DEBUG: <<null>:0> dialog [dlg_hash.c:1094]:
dlg_unref_helper(): ref <=0 for dialog 0x7f710be71730
/usr/sbin/kamailio[494381]: DEBUG: <<null>:0> dialog [dlg_hash.c:344]:
destroy_dlg(): destroying dialog 0x7f710be71730 (ref 0)
/usr/sbin/kamailio[494381]: DEBUG: <<null>:0> dialog [dlg_hash.c:354]:
destroy_dlg(): removed timer for dlg 0x7f710be71730 [2636:74773] with clid
'm2b01mn4kk83esl50dm7' and tags 'r92mn5lkgl' 'as11e71a25'
/usr/sbin/kamailio[494381]: DEBUG: <<null>:0> dialog [dlg_cb.c:269]:
run_dlg_callbacks(): dialog=0x7f710be71730, type=8192
/usr/sbin/kamailio[494381]: DEBUG: <<null>:0> acc [acc_cdr.c:712]:
cdr_on_destroy(): dialog '0x7f710be71730' destroyed!
/usr/sbin/kamailio[494381]: DEBUG: <<null>:0> dialog [dlg_dmq.c:488]:
dlg_dmq_replicate_action(): replicating action [3] on [2636:74773] to dmq peers
/usr/sbin/kamailio[494381]: DEBUG: <<null>:0> dialog [dlg_dmq.c:644]:
dlg_dmq_replicate_action(): sending serialized data
{"action":3,"h_entry":2636,"h_id":74773,"state":4}
/usr/sbin/kamailio[494381]: DEBUG: <<null>:0> dialog [dlg_dmq.c:88]:
dlg_dmq_send(): sending dmq broadcast...
```
### Possible Cause
Seems related with https://github.com/kamailio/kamailio/issues/4169
### Additional Information
This issue didn't happen in the 5.8 version
* **Kamailio Version** - output of `kamailio -v`
```
# kamailio -v
version: kamailio 6.0.2 (x86_64/linux)
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE,
USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, MEM_JOIN_FREE, Q_MALLOC,
F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT,
USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES,
TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_SEND_BUFFER_SIZE
262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id:
compiled on 00:00:00 Sep 13 2022 with gcc 11.5.0
```
* **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 `lsb_release -a` and `uname -a`)
-->
```
# cat /etc/os-release
NAME="Oracle Linux Server"
VERSION="9.6"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="9.6"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Oracle Linux Server 9.6"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:9:6:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://github.com/oracle/oracle-linux"
ORACLE_BUGZILLA_PRODUCT="Oracle Linux 9"
ORACLE_BUGZILLA_PRODUCT_VERSION=9.6
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=9.6
# uname -a
Linux dev-sbc-03 5.14.0-503.38.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Apr 16
14:45:31 PDT 2025 x86_64 x86_64 x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4404
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/[email protected]>_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the
sender!