[asterisk-users] PJSIP trunk is down when DNS was not available during the Asterisk start.

Joshua C. Colp jcolp at sangoma.com
Thu Aug 27 05:52:19 CDT 2020


On Thu, Aug 27, 2020 at 7:48 AM Leonid Fainshtein <
leonid.fainshtein at xorcom.com> wrote:

> Hi,
> I have Asterisk 16.x with a trunk configured with a hostname in PJSIP AOR.
> The registration is not required for this trunk.
> 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.
> 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'.
> The only way to revive the trunk is to restart Asterisk. Even 'pjsip
> reload' doesn't solve the problem.
> Is it the 'by design' Asterisk behavior or I have missed something?
>

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.

-- 
Joshua C. Colp
Asterisk Technical Lead
Sangoma Technologies
Check us out at www.sangoma.com and www.asterisk.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20200827/ee69f4ba/attachment.html>


More information about the asterisk-users mailing list