[SR-Users] ds_is_from_list and NAPTR / SRV

Daniel-Constantin Mierla miconda at gmail.com
Thu Jan 19 09:49:04 CET 2017


Hello,

I haven't added the support for the 3rd parameter to ds_is_from_list(),
so I don't know what kind of DNS query is doing. Maybe it is not
starting from NAPTR. It will require to look at the code if the author
is not coming with clarifications.

One way for a quick check is to sniff the port 53 and see what DNS query
are sent over the network.

NAPTR is definitely supported and used when routing SIP requests. But
other config functions may have different implementation stack.

Cheers,
Daniel


On 18/01/2017 21:46, Björn Bylander wrote:
> Hello,
>
> I’m trying to resolve an issue with the ds_is_from_list function from the dispatcher module.
> I’m calling it as follows:
>
> ds_is_from_list(”42”, "3", "sip:sip.foo.bar”)
>
> This makes Kamailio log an error:
>
> ERROR: dispatcher [dispatch.c:2327]: ds_is_addr_from_list(): could not resolve sip.foo.bar
>
> sip.foo.bar doesn’t have any A records but there are NAPTR and SRV records:
>
> $ host -t naptr sip.foo.bar
> sip.foo.bar has NAPTR record 20 0 "s" "SIP+D2T" "" _sip._tcp.sip.foo.bar.
> sip.foo.bar has NAPTR record 10 0 "s" "SIP+D2U" "" _sip._udp.sip.foo.bar.
>
> $ host -t srv _sip._tcp.sip.foo.bar
> _sip._tcp.sip.foo.bar has SRV record 10 0 5060 sip1.foo.bar.
> _sip._tcp.sip.foo.bar has SRV record 10 0 5060 sip2.foo.bar.
>
> $ host -t srv _sip._udp.sip.foo.bar
> _sip._udp.sip.foo.bar has SRV record 10 0 5060 sip2.foo.bar.
> _sip._udp.sip.foo.bar has SRV record 10 0 5060 sip1.foo.bar.
>
> $ host sip1.foo.bar.
> sip1.foo.bar has address 10.47.11.1
>
> $ host sip2.foo.bar.
> sip2.foo.bar has address 10.47.11.2
>
> The following DNS options are set:
>
> dns_srv_lb = yes
> dns_try_naptr = yes
> dns_naptr_ignore_rfc = no
>
> The Kamailio version is 4.2.8 (installed from the Debian binary package) on Debian Wheezy.
>
> Shouldn’t ds_is_from_list be able to resolve the NAPTR and SRV records? Can I change anything to be able to use ds_is_from_list with the specified domain?
>
> Thanks,
> Björn Bylander
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com




More information about the sr-users mailing list