### Description
I found `srv_query` and `naptr_query` do not trigger DNS requests.
This was checked via Kamailio logs and via tcpdump utility.
#### Reproduction
Required start Kamailio with config like
```
#!define L_DBG 3
#!define IPV4_ADDR 127.0.0.1
loadmodule "debugger.so"
modparam("debugger", "cfgtrace", 1)
modparam("debugger", "log_level_name", "exec")
debug=L_DBG
log_stderror=yes
loadmodule "ipops.so"
listen=udp:IPV4_ADDR name "ipv4_udp"
request_route {
naptr_query ("example.com", "res");
srv_query ("_sip._udp.example.com", "udp");
dns_query("test.com", "xyz");
drop;
}
```
#### Log Messages
```
28(2324390) DEBUG: <core> [core/ip_addr.c:580]: print_ip(): tcpconn_new: new tcp
connection: 2600:1f18:578:5702:0:0:0:cc
28(2324390) DEBUG: <core> [core/tcp_main.c:1216]: tcpconn_new(): on port 34664, type
2, socket 46
28(2324390) DEBUG: <core> [core/tcp_main.c:1548]: tcpconn_add(): hashes:
1351:58:985, 2
28(2324390) DEBUG: <core> [core/io_wait.h:374]: io_watch_add(): processing
io_watch_add(0x9ff548, 46, 2, 0xffff901ff268) - fd_no=40
28(2324390) DEBUG: <core> [core/io_wait.h:599]: io_watch_del(): DBG: io_watch_del
(0x9ff548, 46, -1, 0x0) fd_no=41 called
28(2324390) DEBUG: <core> [core/tcp_main.c:4547]: handle_tcpconn_ev(): sending to
child, events 1
28(2324390) DEBUG: <core> [core/tcp_main.c:4217]: send2child(): selected tcp worker
idx:1 proc:21 pid:2324383 for activity on [tcp:[2605:84c0:88:42::1]:5060], 0xffff901ff268
21(2324383) DEBUG: <core> [core/tcp_read.c:1735]: handle_io(): received n=8
con=0xffff901ff268, fd=6
21(2324383) DEBUG: <core> [core/tcp_read.c:1533]: tcp_read_req():
content-length=782
21(2324383) DEBUG: <core> [core/parser/parse_fline.c:249]: parse_first_line(): first
line type 1 (request) flags 1
21(2324383) DEBUG: <core> [core/parser/msg_parser.c:679]: parse_msg(): SIP Request:
21(2324383) DEBUG: <core> [core/parser/msg_parser.c:680]: parse_msg(): method:
<INVITE>
21(2324383) DEBUG: <core> [core/parser/msg_parser.c:682]: parse_msg(): uri:
<urn:service:sos>
21(2324383) DEBUG: <core> [core/parser/msg_parser.c:684]: parse_msg(): version:
<SIP/2.0>
21(2324383) DEBUG: <core> [core/parser/parse_hname2.c:301]: parse_sip_header_name():
parsed header name [Record-Route] type 10
21(2324383) DEBUG: <core> [core/parser/parse_hname2.c:301]: parse_sip_header_name():
parsed header name [Record-Route] type 10
21(2324383) DEBUG: <core> [core/parser/parse_hname2.c:301]: parse_sip_header_name():
parsed header name [Via] type 1
21(2324383) DEBUG: <core> [core/parser/parse_via.c:1300]: parse_via_param(): Found
param type 232, <branch> = <z9hG4bKb72a.e5268cd9ad7d121798072d354270bec4.0>;
state=6
21(2324383) DEBUG: <core> [core/parser/parse_via.c:1300]: parse_via_param(): Found
param type 236, <i> = <6c7781>; state=16
21(2324383) DEBUG: <core> [core/parser/parse_via.c:2639]: parse_via(): end of header
reached, state=5
21(2324383) DEBUG: <core> [core/parser/msg_parser.c:555]: parse_headers(): Via
found, flags=2
21(2324383) DEBUG: <core> [core/parser/msg_parser.c:557]: parse_headers(): this is
the first via
21(2324383) DEBUG: <core> [core/parser/parse_hname2.c:301]: parse_sip_header_name():
parsed header name [Via] type 1
21(2324383) DEBUG: <core> [core/parser/parse_via.c:1300]: parse_via_param(): Found
param type 234, <received> = <2600:1f18:578:5704:62c1:bea:3535:6449>; state=6
21(2324383) DEBUG: <core> [core/parser/parse_via.c:1300]: parse_via_param(): Found
param type 235, <rport> = <34895>; state=6
21(2324383) DEBUG: <core> [core/parser/parse_via.c:1300]: parse_via_param(): Found
param type 232, <branch> = <z9hG4bKrB4pr8Sa2gaKQ>; state=16
21(2324383) DEBUG: <core> [core/parser/parse_via.c:2639]: parse_via(): end of header
reached, state=5
21(2324383) DEBUG: <core> [core/parser/msg_parser.c:555]: parse_headers(): Via
found, flags=78
21(2324383) DEBUG: <core> [core/parser/msg_parser.c:568]: parse_headers(): this is
the second via
21(2324383) DEBUG: <core> [core/parser/parse_hname2.c:301]: parse_sip_header_name():
parsed header name [Max-Forwards] type 8
21(2324383) DEBUG: <core> [core/parser/parse_hname2.c:301]: parse_sip_header_name():
parsed header name [From] type 4
21(2324383) DEBUG: <core> [core/parser/parse_hname2.c:301]: parse_sip_header_name():
parsed header name [To] type 3
21(2324383) DEBUG: <core> [core/parser/parse_addr_spec.c:884]: parse_addr_spec():
end of header reached, state=10
21(2324383) DEBUG: <core> [core/parser/msg_parser.c:172]: get_hdr_field():
<To> [19]; uri=[urn:service:sos]
21(2324383) DEBUG: <core> [core/parser/msg_parser.c:174]: get_hdr_field(): to body
(19)[<urn:service:sos>
], to tag (0)[]
21(2324383) DEBUG: <core> [core/parser/parse_hname2.c:301]: parse_sip_header_name():
parsed header name [Call-ID] type 6
21(2324383) DEBUG: <core> [core/parser/parse_hname2.c:301]: parse_sip_header_name():
parsed header name [CSeq] type 5
21(2324383) DEBUG: <core> [core/parser/msg_parser.c:152]: get_hdr_field(): cseq
<CSeq>: <66360993> <INVITE>
21(2324383) DEBUG: <core> [core/receive.c:389]: receive_msg(): --- received sip
message - request - call-id: [b12b3938-ddf8-11ed-8503-e9120e4ae1c8] - cseq: [66360993
INVITE]
21(2324383) DEBUG: <core> [core/receive.c:261]: ksr_evrt_pre_routing(): event route
core:pre-routing not defined
21(2324383) DEBUG: <core> [core/receive.c:471]: receive_msg(): preparing to run
routing scripts...
21(2324383) exec: *** cfgtrace:dbg_cfg_trace(): request_route=[DEFAULT_ROUTE]
c=[/etc/sip-aggregator/kamailio2.cfg] l=34 a=26 n=naptr_query
21(2324383) DEBUG: ipops [ipops_pv.c:1483]: naptr_update_pv(): ipops_pv.c:1483
naptr_update_pv - called: naptrname => [
example.com], pvid => [res]
21(2324383) DEBUG: ipops [ipops_pv.c:1204]: sr_naptr_add_item(): ipops_pv.c:1204
sr_naptr_add_item - called: pvid => [res] findflg => [1]
21(2324383) DEBUG: ipops [ipops_pv.c:1503]: naptr_update_pv(): pvid not found: res
21(2324383) exec: *** cfgtrace:dbg_cfg_trace(): request_route=[DEFAULT_ROUTE]
c=[/etc/sip-aggregator/kamailio2.cfg] l=35 a=26 n=srv_query
21(2324383) DEBUG: ipops [ipops_pv.c:1034]: srv_update_pv(): pvid not found: udp
21(2324383) exec: *** cfgtrace:dbg_cfg_trace(): request_route=[DEFAULT_ROUTE]
c=[/etc/sip-aggregator/kamailio2.cfg] l=36 a=26 n=dns_query
21(2324383) DEBUG: ipops [ipops_pv.c:390]: dns_update_pv(): attempting to resolve:
test.com
21(2324383) DEBUG: ipops [ipops_pv.c:421]: dns_update_pv(): #0 - type 4 addr:
67.225.146.248 (2)
21(2324383) DEBUG: ipops [ipops_pv.c:434]: dns_update_pv(): dns PV updated for:
test.com
(1)
21(2324383) exec: *** cfgtrace:dbg_cfg_trace(): request_route=[DEFAULT_ROUTE]
c=[/etc/sip-aggregator/kamailio2.cfg] l=37 a=2 n=drop
21(2324383) DEBUG: <core> [core/receive.c:528]: receive_msg(): request-route
executed in: 4324 usec
21(2324383) DEBUG: <core> [core/usr_avp.c:637]: destroy_avp_list(): destroying list
(nil)
21(2324383) DEBUG: <core> [core/usr_avp.c:637]: destroy_avp_list(): destroying list
(nil)
21(2324383) DEBUG: <core> [core/usr_avp.c:637]: destroy_avp_list(): destroying list
(nil)
21(2324383) DEBUG: <core> [core/usr_avp.c:637]: destroy_avp_list(): destroying list
(nil)
21(2324383) DEBUG: <core> [core/usr_avp.c:637]: destroy_avp_list(): destroying list
(nil)
21(2324383) DEBUG: <core> [core/usr_avp.c:637]: destroy_avp_list(): destroying list
(nil)
21(2324383) DEBUG: <core> [core/xavp.c:541]: xavp_destroy_list(): destroying xavp
list (nil)
21(2324383) DEBUG: <core> [core/xavp.c:541]: xavp_destroy_list(): destroying xavp
list (nil)
21(2324383) DEBUG: <core> [core/xavp.c:541]: xavp_destroy_list(): destroying xavp
list (nil)
21(2324383) DEBUG: <core> [core/receive.c:628]: receive_msg(): cleaning up
21(2324383) DEBUG: <core> [core/io_wait.h:374]: io_watch_add(): processing
io_watch_add(0xa437d8, 6, 2, 0xffff901ff268) - fd_no=1
```
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
Here is little modified 5.6.4
```
version: kamailio 5.6.4 (aarch64/linux) 5583a2
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST,
DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY,
USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT-NOSMP, 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_URI_SIZE 1024, BUF_SIZE 65535,
DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 5583a2
compiled on 00:00:00 Sep 13 2022 with gcc 12.2.1
```
* **Operating System**:
```
NAME="Fedora Linux"
VERSION="37.20230322.3.0 (CoreOS)"
ID=fedora
VERSION_ID=37
VERSION_CODENAME=""
PLATFORM_ID="platform:f37"
PRETTY_NAME="Fedora CoreOS 37.20230322.3.0"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:37"
HOME_URL="https://getfedora.org/coreos/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora-coreos/…
SUPPORT_URL="https://github.com/coreos/fedora-coreos-tracker/"
BUG_REPORT_URL="https://github.com/coreos/fedora-coreos-tracker/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=37
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=37
SUPPORT_END=2023-11-14
VARIANT="CoreOS"
VARIANT_ID=coreos
OSTREE_VERSION='37.20230322.3.0'
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3419
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3419(a)github.com>