<p></p>
<h3>Description</h3>
<p>I have configured dispatcher with set:</p>
<pre><code>id 1 setid 1 destination "sip:trial.nga911.com" flags 16 priority 0 attrs "" description "trial esrp"
</code></pre>
<p>Record above from <code>redis</code> database</p>
<p>Then kamailio report dispatcher dump</p>
<div class="highlight highlight-source-shell"><pre>[root@ip-172-22-6-233 config]<span class="pl-c"><span class="pl-c">#</span> kamctl  dispatcher dump</span>
which: no gdb <span class="pl-k">in</span> (/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/)
{
  <span class="pl-s"><span class="pl-pds">"</span>jsonrpc<span class="pl-pds">"</span></span>:  <span class="pl-s"><span class="pl-pds">"</span>2.0<span class="pl-pds">"</span></span>,
  <span class="pl-s"><span class="pl-pds">"</span>result<span class="pl-pds">"</span></span>: {
    <span class="pl-s"><span class="pl-pds">"</span>NRSETS<span class="pl-pds">"</span></span>: 1,
    <span class="pl-s"><span class="pl-pds">"</span>RECORDS<span class="pl-pds">"</span></span>:  [{
        <span class="pl-s"><span class="pl-pds">"</span>SET<span class="pl-pds">"</span></span>:  {
          <span class="pl-s"><span class="pl-pds">"</span>ID<span class="pl-pds">"</span></span>: 1,
          <span class="pl-s"><span class="pl-pds">"</span>TARGETS<span class="pl-pds">"</span></span>:  [{
              <span class="pl-s"><span class="pl-pds">"</span>DEST<span class="pl-pds">"</span></span>: {
                <span class="pl-s"><span class="pl-pds">"</span>URI<span class="pl-pds">"</span></span>:  <span class="pl-s"><span class="pl-pds">"</span>sip:trial.nga911.com<span class="pl-pds">"</span></span>,
                <span class="pl-s"><span class="pl-pds">"</span>FLAGS<span class="pl-pds">"</span></span>:  <span class="pl-s"><span class="pl-pds">"</span>AP<span class="pl-pds">"</span></span>,
                <span class="pl-s"><span class="pl-pds">"</span>PRIORITY<span class="pl-pds">"</span></span>: 0
              }
            }]
        }
      }]
  },
  <span class="pl-s"><span class="pl-pds">"</span>id<span class="pl-pds">"</span></span>: 16982
}</pre></div>
<p>Using tcpdump I can see kamailio resolve <code>A/AAAA</code> records only for one SRV record.</p>
<div class="highlight highlight-source-shell"><pre>[root@ip-172-22-6-233 config]<span class="pl-c"><span class="pl-c">#</span> tcpdump -ni any port 53</span>
tcpdump: verbose output suppressed, use -v or -vv <span class="pl-k">for</span> full protocol decode
listening on any, link-type LINUX_SLL (Linux cooked), capture size 262144 bytes
11:04:23.812111 IP 172.22.6.233.53464 <span class="pl-k">></span> 172.22.0.2.domain: 30262+ PTR<span class="pl-k">?</span> 233.6.22.172.in-addr.arpa. (43)
11:04:23.812923 IP 172.22.0.2.domain <span class="pl-k">></span> 172.22.6.233.53464: 30262 1/0/0 PTR ip-172-22-6-233.us-west-1.compute.internal. (99)
11:04:23.813168 IP 172.22.6.233.48244 <span class="pl-k">></span> 172.22.0.2.domain: 12029+ PTR<span class="pl-k">?</span> 233.6.22.172.in-addr.arpa. (43)
11:04:23.813248 IP 172.22.0.2.domain <span class="pl-k">></span> 172.22.6.233.48244: 12029 1/0/0 PTR ip-172-22-6-233.us-west-1.compute.internal. (99)
11:04:23.855004 IP 172.22.6.233.45589 <span class="pl-k">></span> 172.22.0.2.domain: 19167+ A<span class="pl-k">?</span> trial.nga911.com. (34)
11:04:23.856309 IP 172.22.0.2.domain <span class="pl-k">></span> 172.22.6.233.45589: 19167 0/1/0 (118)
11:04:33.942992 IP 172.22.6.233.56344 <span class="pl-k">></span> 172.22.0.2.domain: 24272+ SRV<span class="pl-k">?</span> _sip._udp.trial.nga911.com. (44)
11:04:33.944340 IP 172.22.0.2.domain <span class="pl-k">></span> 172.22.6.233.56344: 24272 2/0/0 SRV proxy-us-west-2-trial-1.nga911.com.:5060 30 30, SRV proxy-us-west-2-trial-0.nga911.com.:5060 30 30 (152)
11:04:33.944580 IP 172.22.6.233.57863 <span class="pl-k">></span> 172.22.0.2.domain: 27694+ A<span class="pl-k">?</span> proxy-us-west-2-trial-1.nga911.com. (52)
11:04:33.945786 IP 172.22.0.2.domain <span class="pl-k">></span> 172.22.6.233.57863: 27694 1/0/0 A 172.21.1.32 (68)</pre></div>
<p>If host from <code>A/AAAA</code> response if failed, then Kamailio do not use other hosts from SRV records.</p>
<h3>Troubleshooting</h3>
<h4>Reproduction</h4>
<ol>
<li>configured dispatcher set with <code>16</code> flag;</li>
<li>SIP URI needs a point to SRV records with two or more backend hosts;</li>
<li>start kamailio and check with kamailio use backend;</li>
<li>stop used backend;</li>
<li>make a call.</li>
</ol>
<h4>Debugging Data</h4>
<p>none</p>
<h4>Log Messages</h4>
<p>none</p>
<h4>SIP Traffic</h4>
<p>none</p>
<h3>Possible Solutions</h3>
<p>not known</p>
<h3>Additional Information</h3>
<ul>
<li><strong>Kamailio Version</strong> - output of <code>kamailio -v</code></li>
</ul>
<pre><code>[root@ip-172-22-6-233 config]# kamailio -v
version: kamailio 5.3.4 (x86_64/linux) 117ff9
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, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, 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: 117ff9 
compiled on 15:31:51 May  6 2020 with gcc 8.3.1
</code></pre>
<ul>
<li><strong>Operating System</strong>:</li>
</ul>
<pre><code>[root@ip-172-22-6-233 config]# cat /etc/os-release 
NAME="CentOS Linux"
VERSION="8 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="8"
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2376">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZP3KUHPFIVBDBSHL4TRYR65PANCNFSM4OJHJPLQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZL4JRC3OC37DQBIKILRYR65PA5CNFSM4OJHJPL2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4JUECA2A.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2376",
"url": "https://github.com/kamailio/kamailio/issues/2376",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>