[SR-Users] NAPTR priorities doesn't seem to work properly

Iñaki Baz Castillo ibc at aliax.net
Thu Jun 9 16:11:15 CEST 2011


2011/6/9 Daniel-Constantin Mierla <miconda at gmail.com>:
> I kind of lost the conclusion on your replies, is it not working as
> documented/expected, or still not?

Sorry for so many mails. No, it doesn't work as documented or
expected. Summarizing:

My Kamailio is not performing NAPTR query for a Request URI
"sip:xxxx at oversip.net" (no transport, no port). It just does SRV query
for SIP over UDP.


Kamailio info:

--------------------
version: kamailio 3.2.0-dev5 (x86_64/linux)
flags: STATS: Off, USE_IPV6, USE_TCP, USE_TLS, TLS_HOOKS,
USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM,
SHM_MMAP, PKG_MALLOC, DBG_QM_MALLOC, USE_FUTEX,
FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR,
USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 4MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled on 04:43:00 Jun  9 2011 with gcc 4.4.3
-------------------


A MESSAGE with RURI "sip:qwe at oversip.net" arrives (no transport param,
no port), t_relay() is invoked, and kamailio just performs a SRV query
for SIP over UDP (as logs show):

-----------------------
DEBUG: <core> [dns_cache.c:567]: dns_hash_find(oversip.net(11), 35), h=956
DEBUG: <core> [dns_cache.c:1777]: dns_get_related(0x7f98eebec390
(oversip.net, 35), 35, *(nil)) (0)
DEBUG: <core> [dns_cache.c:870]: dns_cache_add: adding oversip.net(11)
35 (flags=0) at 956
DEBUG: <core> [dns_cache.c:567]:
dns_hash_find(_sip._udp.oversip.net(21), 33), h=23
DEBUG: <core> [dns_cache.c:1777]: dns_get_related(0x7f98eebec648
(_sip._udp.oversip.net, 33), 33, *(nil)) (0)
DEBUG: <core> [dns_cache.c:870]: dns_cache_add: adding
_sip._udp.oversip.net(21) 33 (flags=0) at 23
DEBUG: <core> [dns_cache.c:2362]: dns_srv_get_nxt_rr(0x7f98eebec648,
0, 0, 1616155624): selected 0/1 in grp. 0 (rand_w=0, rr=0x7f98eebec6a0
p=0 w=0 rsum=0)
DEBUG: <core> [dns_cache.c:567]: dns_hash_find(sip.oversip.net(15), 1), h=400
DEBUG: <core> [dns_cache.c:1777]: dns_get_related(0x7f98eebec730
(sip.oversip.net, 1), 1, *(nil)) (0)
DEBUG: <core> [dns_cache.c:870]: dns_cache_add: adding
sip.oversip.net(15) 1 (flags=0) at 400
DEBUG: <core> [dns_cache.c:2982]: dns_a_resovle(sip.oversip.net, 0) returning 0
DEBUG: <core> [dns_cache.c:3236]:
dns_srv_resolve_ip("_sip._udp.oversip.net", 0, 0), ret=0,
ip=91.121.79.216
DEBUG: <core> [dns_cache.c:3358]: dns_sip_resolve(oversip.net, 0, 0),
srv0, ret=0
------------------------



My DNS related configuration in Kamailio:

-----------------------
dns_try_ipv6=no
dns_retr_time=1
dns_retr_no=2
dns_servers_no=2
dns_srv_lb=yes
dns_try_naptr=yes
dns_use_search_list=no
dns_search_full_match=no
use_dns_cache=yes
dns_cache_init=yes
use_dns_failover=yes
dns_tls_preference=1
dns_tcp_preference=1
dns_udp_preference=1
-----------------------


According to the doc it should perform NAPTR query (it's compiled with
USE_NAPTR as "kamailio -V" says, and parameter dns_try_naptr has value
"yes").


Could somebody try to send a MESSAGE or INVITE through Kamailio 3.X
with RURI sip:whatever at oversip.net? According to NAPTR/SRV records,
destinations should be (in order of preference):

1) TLS  91.121.79.216:9091
2) TCP  91.121.79.216:9090
3) UDP  91.121.79.216:9090



-- 
Iñaki Baz Castillo
<ibc at aliax.net>



More information about the sr-users mailing list