<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 id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi,</p>
<p><br>
</p>
<p>I'm still looking into why there are so many own name lookups occurring in Asterisk 13.</p>
<p><br>
</p>
<p>After sanity checking the physical server configuration by comparing this to an Asterisk 1.8 build, I can confirm that only the Asterisk 13 server is performing thousands of lookup numbers per minute.</p>
<p><br>
</p>
<p>Looking at the res_pjsup.c file it looks like each time a dialogue is created it looks up the local IP addresses (line 2391) in this piece of code:</p>
<p><br>
</p>
<p></p>
<div><span class="Apple-tab-span" style="white-space: pre; font-size: 10pt;"></span><span style="font-size: 10pt;">/* Get the local bound address for the transport that will be used when communicating with the provided URI */</span></div>
<div><span class="Apple-tab-span" style="white-space: pre; font-size: 10pt;"></span><span style="font-size: 10pt;">if (pjsip_tpmgr_find_local_addr(pjsip_endpt_get_tpmgr(ast_sip_get_pjsip_endpoint()), pool, type, selector,</span></div>
<div><span class="Apple-tab-span" style="white-space: pre; font-size: 10pt;"></span><span style="font-size: 10pt;">     &local_addr, &local_port) != PJ_SUCCESS) {</span></div>
<div><br>
</div>
<div><span class="Apple-tab-span" style="white-space: pre; font-size: 10pt;"></span><span style="font-size: 10pt;">/* If no local address can be retrieved using the transport manager use the host one */</span></div>
<div><span class="Apple-tab-span" style="white-space: pre; font-size: 10pt;"></span><span style="font-size: 10pt;">pj_strdup(pool, &local_addr, pj_gethostname());</span></div>
<div><span class="Apple-tab-span" style="white-space: pre; font-size: 10pt;"></span><span style="font-size: 10pt;">local_port = pjsip_transport_get_default_port_for_type(PJSIP_TRANSPORT_UDP);</span></div>
<div><span class="Apple-tab-span" style="white-space: pre; font-size: 10pt;"></span><span style="font-size: 10pt;">}</span></div>
<br>
<p></p>
<p>If the transport is set to bound=0.0.0.0 there is no IP address set and therefore a DNS lookup is carriedout to discover the addresses.</p>
<p><br>
</p>
<p>Is there a better way to manage this situation, if the 'res_pjsip_multihomed' code does a lookup on startup, can this not store the address and re-use them here?</p>
<p><br>
</p>
<p>Kind regards,</p>
<p><br>
</p>
<p>Ross</p>
<p></p>
</div>
</body>
</html>