Description
When I add a new dispatcher target using the kamcmd command, then kamailio does not start send OPTIONS.
Reproduction
Need to start Kamailio with config file
listen=eth0
loadmodule "xlog.so"
loadmodule "pv.so"
loadmodule "ctl.so"
loadmodule "jsonrpcs.so"
loadmodule "dispatcher.so"
modparam("dispatcher", "list_file", "/dev/null")
route{
xerr("TEST $ci\n");
drop;
}
And then execute comands
kamcmd dispatcher.add 1 "sip:sip.telnyx.com:5060;transport=tcp" 8
kamcmd dispatcher.list
After the last command expected output
{
NRSETS: 1
RECORDS: {
SET: {
ID: 1
TARGETS: {
DEST: {
URI: sip:sip.telnyx.com:5060;transport=tcp
FLAGS: AP
PRIORITY: 0
}
}
}
}
}
As you can see, the target has AP
flags, which means the target is active and probing enabled.
But no OPTIONS messages were sent.
Log Messages
Here is kamailio debug output for during kamcmd execitions and some time after
12(94363) DEBUG: ctl [../../core/io_wait.h:368]: io_watch_add(): processing io_watch_add(0x7fce67ac03a0, 10, 3, 0x21186bf0) - fd_no=1
12(94363) DEBUG: ctl [io_listener.c:440]: handle_new_connect(): new connection (1) on /var/run/kamailio//kamailio_ctl
12(94363) DEBUG: ctl [io_listener.c:501]: handle_stream_read(): bytes read: 68
12(94363) DEBUG: <core> [core/dns_cache.c:533]: _dns_hash_find(): (sip.telnyx.com(14), 1), h=507
12(94363) DEBUG: <core> [core/resolve.c:1021]: get_record(): skipping 0 NS (p=0x9c6ad0, end=0x9c6ad0)
12(94363) DEBUG: <core> [core/resolve.c:1035]: get_record(): parsing 0 ARs (p=0x9c6ad0, end=0x9c6ad0)
12(94363) DEBUG: <core> [core/dns_cache.c:1699]: dns_get_related(): (0x7fce63a32000 (sip.telnyx.com, 1), 1, *(nil)) (0)
12(94363) DEBUG: <core> [core/dns_cache.c:1702]: dns_get_related(): record not alone: 0x7fce63a32000 - type: 1
12(94363) DEBUG: <core> [core/dns_cache.c:748]: dns_cache_add_unsafe(): adding sip.telnyx.com(14) 1 (flags=0) at 507
12(94363) DEBUG: dispatcher [dispatch.c:768]: add_dest2list(): dest [1/1] <sip:sip.telnyx.com:5060;transport=tcp>
12(94363) DEBUG: dispatcher [dispatch.c:258]: ds_log_dst_cb(): dst>> 1 sip:sip.telnyx.com:5060;transport=tcp 8 0 (,0,0,0)
12(94363) DEBUG: ctl [io_listener.c:522]: handle_stream_read(): bytes processed: 68
12(94363) DEBUG: ctl [io_listener.c:498]: handle_stream_read(): handle_stream read: eof on /var/run/kamailio//kamailio_ctl
12(94363) DEBUG: ctl [../../core/io_wait.h:599]: io_watch_del(): DBG: io_watch_del (0x7fce67ac03a0, 10, -1, 0x10) fd_no=2 called
12(94363) DEBUG: ctl [../../core/io_wait.h:368]: io_watch_add(): processing io_watch_add(0x7fce67ac03a0, 10, 3, 0x21186bf0) - fd_no=1
12(94363) DEBUG: ctl [io_listener.c:440]: handle_new_connect(): new connection (1) on /var/run/kamailio//kamailio_ctl
12(94363) DEBUG: ctl [io_listener.c:501]: handle_stream_read(): bytes read: 25
12(94363) DEBUG: ctl [io_listener.c:522]: handle_stream_read(): bytes processed: 25
12(94363) DEBUG: ctl [io_listener.c:498]: handle_stream_read(): handle_stream read: eof on /var/run/kamailio//kamailio_ctl
12(94363) DEBUG: ctl [../../core/io_wait.h:599]: io_watch_del(): DBG: io_watch_del (0x7fce67ac03a0, 10, -1, 0x10) fd_no=2 called
Additional Information
- Kamailio Version - output of
kamailio -v
version: kamailio 6.0.1 (x86_64/linux) fce50d
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: fce50d
compiled on 00:00:00 Sep 13 2022 with gcc 14.2.1
root@nout:~# cat /etc/os-release
NAME="Fedora Linux"
VERSION="41 (Workstation Edition)"
RELEASE_TYPE=stable
ID=fedora
VERSION_ID=41
VERSION_CODENAME=""
PLATFORM_ID="platform:f41"
PRETTY_NAME="Fedora Linux 41 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:41"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f41/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=41
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=41
SUPPORT_END=2025-12-15
VARIANT="Workstation Edition"
VARIANT_ID=workstation
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4212@github.com>
Description
When I add a new dispatcher target using the kamcmd command, then kamailio does not start send OPTIONS.
Reproduction
Need to start Kamailio with config file
listen=eth0
loadmodule "xlog.so"
loadmodule "pv.so"
loadmodule "ctl.so"
loadmodule "jsonrpcs.so"
loadmodule "dispatcher.so"
modparam("dispatcher", "list_file", "/dev/null")
route{
xerr("TEST $ci\n");
drop;
}
And then execute comands
kamcmd dispatcher.add 1 "sip:sip.telnyx.com:5060;transport=tcp" 8
kamcmd dispatcher.list
After the last command expected output
{
NRSETS: 1
RECORDS: {
SET: {
ID: 1
TARGETS: {
DEST: {
URI: sip:sip.telnyx.com:5060;transport=tcp
FLAGS: AP
PRIORITY: 0
}
}
}
}
}
As you can see, the target has AP
flags, which means the target is active and probing enabled.
But no OPTIONS messages were sent.
Log Messages
Here is kamailio debug output for during kamcmd execitions and some time after
12(94363) DEBUG: ctl [../../core/io_wait.h:368]: io_watch_add(): processing io_watch_add(0x7fce67ac03a0, 10, 3, 0x21186bf0) - fd_no=1
12(94363) DEBUG: ctl [io_listener.c:440]: handle_new_connect(): new connection (1) on /var/run/kamailio//kamailio_ctl
12(94363) DEBUG: ctl [io_listener.c:501]: handle_stream_read(): bytes read: 68
12(94363) DEBUG: <core> [core/dns_cache.c:533]: _dns_hash_find(): (sip.telnyx.com(14), 1), h=507
12(94363) DEBUG: <core> [core/resolve.c:1021]: get_record(): skipping 0 NS (p=0x9c6ad0, end=0x9c6ad0)
12(94363) DEBUG: <core> [core/resolve.c:1035]: get_record(): parsing 0 ARs (p=0x9c6ad0, end=0x9c6ad0)
12(94363) DEBUG: <core> [core/dns_cache.c:1699]: dns_get_related(): (0x7fce63a32000 (sip.telnyx.com, 1), 1, *(nil)) (0)
12(94363) DEBUG: <core> [core/dns_cache.c:1702]: dns_get_related(): record not alone: 0x7fce63a32000 - type: 1
12(94363) DEBUG: <core> [core/dns_cache.c:748]: dns_cache_add_unsafe(): adding sip.telnyx.com(14) 1 (flags=0) at 507
12(94363) DEBUG: dispatcher [dispatch.c:768]: add_dest2list(): dest [1/1] <sip:sip.telnyx.com:5060;transport=tcp>
12(94363) DEBUG: dispatcher [dispatch.c:258]: ds_log_dst_cb(): dst>> 1 sip:sip.telnyx.com:5060;transport=tcp 8 0 (,0,0,0)
12(94363) DEBUG: ctl [io_listener.c:522]: handle_stream_read(): bytes processed: 68
12(94363) DEBUG: ctl [io_listener.c:498]: handle_stream_read(): handle_stream read: eof on /var/run/kamailio//kamailio_ctl
12(94363) DEBUG: ctl [../../core/io_wait.h:599]: io_watch_del(): DBG: io_watch_del (0x7fce67ac03a0, 10, -1, 0x10) fd_no=2 called
12(94363) DEBUG: ctl [../../core/io_wait.h:368]: io_watch_add(): processing io_watch_add(0x7fce67ac03a0, 10, 3, 0x21186bf0) - fd_no=1
12(94363) DEBUG: ctl [io_listener.c:440]: handle_new_connect(): new connection (1) on /var/run/kamailio//kamailio_ctl
12(94363) DEBUG: ctl [io_listener.c:501]: handle_stream_read(): bytes read: 25
12(94363) DEBUG: ctl [io_listener.c:522]: handle_stream_read(): bytes processed: 25
12(94363) DEBUG: ctl [io_listener.c:498]: handle_stream_read(): handle_stream read: eof on /var/run/kamailio//kamailio_ctl
12(94363) DEBUG: ctl [../../core/io_wait.h:599]: io_watch_del(): DBG: io_watch_del (0x7fce67ac03a0, 10, -1, 0x10) fd_no=2 called
Additional Information
- Kamailio Version - output of
kamailio -v
version: kamailio 6.0.1 (x86_64/linux) fce50d
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: fce50d
compiled on 00:00:00 Sep 13 2022 with gcc 14.2.1
root@nout:~# cat /etc/os-release
NAME="Fedora Linux"
VERSION="41 (Workstation Edition)"
RELEASE_TYPE=stable
ID=fedora
VERSION_ID=41
VERSION_CODENAME=""
PLATFORM_ID="platform:f41"
PRETTY_NAME="Fedora Linux 41 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:41"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f41/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=41
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=41
SUPPORT_END=2025-12-15
VARIANT="Workstation Edition"
VARIANT_ID=workstation
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4212@github.com>