<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
<span style="margin: 0px; font-size: 10pt; font-family: Arial, Helvetica, sans-serif">I ran into the exact same issue. DNS resolution is just stuck on A records for OPTIONS pings irrespective of DNS options. I can see correct DNS resolution with kamcmd dns.lookup
 but</span><span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt;"> kamcmd dispatcher.list command does not even list the gateways which have a NAPTR/SRV DNS name.</span></div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt;"><br>
</span></div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt;">Dispatching INVITEs also fails because none of the trunks are actually loaded in memory for kamailio to process or for me to be able to set its state manually to active.</span></div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
<br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
<span style="margin: 0px; font-size: 10pt; font-family: Arial, Helvetica, sans-serif">Any plans on fixing this behavior? </span></div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
<span style="margin: 0px; font-size: 10pt; font-family: Arial, Helvetica, sans-serif"><br>
</span></div>
<div style="margin: 0px; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, system-ui, Roboto, "Helvetica Neue", sans-serif">
<font face="Arial, Helvetica, sans-serif"><span style="margin: 0px; font-size: 13.3333px">Cheers,</span></font></div>
<div style="margin: 0px; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, system-ui, Roboto, "Helvetica Neue", sans-serif">
<font face="Arial, Helvetica, sans-serif"><span style="margin: 0px; font-size: 13.3333px">Pat.</span></font></div>
<br>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> sr-users <sr-users-bounces@lists.kamailio.org> on behalf of Daniel-Constantin Mierla <miconda@gmail.com><br>
<b>Sent:</b> Friday, November 16, 2018 8:09 AM<br>
<b>To:</b> Kamailio (SER) - Users Mailing List; José Seabra<br>
<b>Subject:</b> Re: [SR-Users] Dispatcher with a naptr address as destination</font>
<div> </div>
</div>
<div style="background-color:#FFFFFF">
<p>Hello,</p>
<p>I think the A query you see is done by the part related to doing OPTIONS keepalive -- I haven't developed that part, but if I remember correctly I saw something like that in the code. Maybe you can disable keepalive via the mod param and see if the query
 is still done.</p>
<p>For routing, dispatcher is not doing any DNS query, just sets the R-URI or D-URI and then tm is in charge of resolving the destination address, and there should be from NAPTR down, if no transport or port is specified.</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div class="x_moz-cite-prefix">On 14.11.18 17:25, José Seabra wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">Hello all,
<div>I'm trying to use a naptr address as a dispatcher destination and i'm facing some issues here.</div>
<div><br>
</div>
<div>When i configure a naptr address in dispatcher table, like:</div>
</div>
<blockquote style="margin:0px 0px 0px
            40px; border:none; padding:0px">
<div dir="ltr">
<div><i>1:1:sip\:proxy-registrar-ci1.fuze.domain:0:0:'':''</i></div>
<div><i><br>
</i></div>
</div>
</blockquote>
<div dir="ltr">
<div>I see kamailio making a dns query of type A, but since that this name doesn't have any A record configured in dns, kamailio didn't get any positive reply from it.</div>
<div><br>
</div>
<div>Should't kamailio make dns query by this order? </div>
<div>
<ol>
<li>NAPTR<br>
</li><li>SRV <br>
</li><li>A<br>
</li></ol>
</div>
<div><br>
</div>
<div>I noticed also that if the name configured in dispatcher table is resolved successfully with A record from dns, then kamailio tries to make a query to NAPTR and then SRV services for the exactly same name used for query previously done(type A), but only
 if it gets a positive answer from dns to the A type query.</div>
<div><br>
</div>
<div>I'm using kamailio version 5.1.0 with the following dns parameters configured:</div>
<div><br>
</div>
<div style="color:rgb(212,212,212); background-color:rgb(30,30,30); font-family:Menlo,Monaco,"Courier New",monospace; font-size:12px; line-height:18px; white-space:pre">
<div><span style="color:rgb(106,153,85)">####### DNS Parameters #########</span></div>
<div>dns = <span style="color:rgb(86,156,214)">no</span></div>
<div>rev_dns = <span style="color:rgb(86,156,214)">no</span></div>
<div>dns_try_ipv6 = <span style="color:rgb(86,156,214)">no</span></div>
<div>dns_retr_time = <span style="color:rgb(181,206,168)">1</span></div>
<div>dns_retr_no = <span style="color:rgb(181,206,168)">1</span></div>
<div>dns_cache_del_nonexp = <span style="color:rgb(86,156,214)">no</span></div>
<div>dns_cache_flags = <span style="color:rgb(181,206,168)">1</span></div>
<div>dns_cache_gc_interval = <span style="color:rgb(181,206,168)">120</span></div>
<div>dns_cache_init = <span style="color:rgb(181,206,168)">1</span></div>
<div>dns_cache_mem = <span style="color:rgb(181,206,168)">1000</span></div>
<div>dns_cache_negative_ttl = <span style="color:rgb(181,206,168)">60</span></div>
<div>dns_try_naptr = <span style="color:rgb(86,156,214)">yes</span></div>
<div>use_dns_cache = <span style="color:rgb(86,156,214)">on</span></div>
<div><span style="color:rgb(106,153,85)">use_dns_failover = on</span></div>
</div>
<div><span style="background-color:rgb(30,30,30); color:rgb(212,212,212); font-family:Menlo,Monaco,"Courier New",monospace; font-size:12px; white-space:pre">dns_srv_lb
</span><span style="background-color:rgb(30,30,30); color:rgb(212,212,212); font-family:Menlo,Monaco,"Courier New",monospace; font-size:12px; white-space:pre">=</span><span style="background-color:rgb(30,30,30); color:rgb(212,212,212); font-family:Menlo,Monaco,"Courier New",monospace; font-size:12px; white-space:pre">
</span><span style="background-color:rgb(30,30,30); font-family:Menlo,Monaco,"Courier New",monospace; font-size:12px; white-space:pre"><font color="#569cd6">yes</font></span></div>
<div> <br clear="all">
<div>Is there something wrongly configured here that can make kamailio behaves like that?</div>
<div><br>
</div>
<div>Thank you.</div>
<div>Regards</div>
-- <br>
<div dir="ltr" class="x_gmail_signature">Cumprimentos
<div>José Seabra</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="x_mimeAttachmentHeader"></fieldset>
<pre class="x_moz-quote-pre">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="x_moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="x_moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre class="x_moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="x_moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="x_moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="x_moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio World Conference -- <a class="x_moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a>
Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- <a class="x_moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a></pre>
</div>
</body>
</html>