<div dir="ltr"><div dir="ltr">On Thu, Aug 27, 2020 at 7:48 AM Leonid Fainshtein <<a href="mailto:leonid.fainshtein@xorcom.com">leonid.fainshtein@xorcom.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="font-family:arial,helvetica,sans-serif">Hi,</div><div style="font-family:arial,helvetica,sans-serif">I have Asterisk 16.x with a trunk configured with a hostname in PJSIP AOR.</div><div style="font-family:arial,helvetica,sans-serif">The registration is not required for this trunk.</div><div style="font-family:arial,helvetica,sans-serif">I paid attention that Asterisk performs DNS resolving of the hostname that is configured in the AOR 'contact' parameter only upon the Asterisk start only.</div><div style="font-family:arial,helvetica,sans-serif">Thus, if Asterisk is started when the DNS server is unreachable due to the Internet connection failure then the 'contact' will be not resolvable forever even when the Internet connection is returned. As a result of that, the 'qualify' procedure is not performed and the trunk status is 'Unavail'.</div><div style="font-family:arial,helvetica,sans-serif">The only way to revive the trunk is to restart Asterisk. Even 'pjsip reload' doesn't solve the problem.</div><div style="font-family:arial,helvetica,sans-serif">Is it the 'by design' Asterisk behavior or I have missed something?<br></div></div></blockquote><div><br></div><div>PJSIP in Asterisk uses asynchronous DNS, so it should resolve at the time the request is actually made and should work afterwards. Not doing so would be a bug, and collecting a debug level log (debug to a file in logger.conf with core set debug 9) would explicitly show what is going on for DNS.</div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="font-family:tahoma,sans-serif"><font color="#073763">Joshua C. Colp</font></div><div style="font-family:tahoma,sans-serif"><font color="#073763">Asterisk Technical Lead</font></div><div style="font-family:tahoma,sans-serif"><font color="#073763">Sangoma Technologies</font></div><div style="font-family:tahoma,sans-serif"><font color="#073763">Check us out at <a href="http://www.sangoma.com" target="_blank">www.sangoma.com</a> and <a href="http://www.asterisk.org" target="_blank">www.asterisk.org</a></font><br></div></div></div></div></div></div></div></div></div></div></div>