[Home]

Summary:ASTERISK-26883: pjsip DNS SRV: missing auto generated identify match entry if DNS temporarily fails on startup
Reporter:Michael Maier (micha)Labels:
Date Opened:2017-03-19 02:05:40Date Closed:
Priority:MajorRegression?
Status:Open/NewComponents:Resources/res_pjsip_endpoint_identifier_ip
Versions:13.14.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:CentOS 6, 64bitAttachments:
Description:If on startup of asterisk DNS temporarily fails, no match entry is generated, resulting in silently dropped inbound calls later on, because pjsip retries e.g. every 60s and establishes a working connection to ISP as soon DNS is working again.

As I detected this problem about 3 hours after starting of asterisk, I'm assuming that changes of DNS lookups later on aren't recognized, too, resulting again in silently dropped inbound calls.

Therefore, the requirement is to always be synchronous with the IP addresses used by pjsip.

Make a local DNS server to not respond (e.g. with iptables) and start asterisk:

{noformat}
[2017-03-18 07:53:58] ERROR[1967] netsock2.c: getaddrinfo("tel.t-online.de", "(null)", ...): Temporary failure in name resolution
[2017-03-18 07:53:58] ERROR[1967] res_pjsip_endpoint_identifier_ip.c: An error occurred when adding resolution results of 'tel.t-online.de' on 'telekomPJSIP'
[2017-03-18 07:53:58] ERROR[1967] res_sorcery_config.c: Could not create an object of type 'identify' with id 'telekomPJSIP' from configuration file 'pjsip.conf'
[2017-03-18 07:54:00] WARNING[2155] res_pjsip_outbound_registration.c: No response received from 'sip:tel.t-online.de' on registration attempt to 'sip:+4911111111111@tel.t-online.de', retrying in '60'
[2017-03-18 07:54:08] ERROR[2155] res_pjsip.c: Error 320052 'DNS "Server failure" (PJLIB_UTIL_EDNS_SERVFAIL)' sending OPTIONS request to endpoint telekomPJSIP
{noformat}

About 2 or 3 minutes later, re enable the resolver again by removing the iptable rules and pjsip will register to the ISP successfully. But the auto generated match entries will stay empty.

I'm using bundled pjsip (see http://lists.digium.com/pipermail/asterisk-dev/2017-March/076202.html and http://lists.digium.com/pipermail/asterisk-dev/2017-March/076215.html)
Comments:By: Asterisk Team (asteriskteam) 2017-03-19 02:05:42.051-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Rusty Newton (rnewton) 2017-03-20 17:53:50.283-0500

We require additional debug to continue with triage of your issue. Please follow the instructions on the wiki [1] for how to collect debugging information from Asterisk. For expediency, where possible, attach the debug with a '.txt' file extension so that the debug will be usable for further analysis.

Thanks!

[1] https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information


Can you attach a debug log captured during startup showing what is going on during the DNS failure?

Additionally, another log when PJSIP is trying later on after DNS is restored.

By: Rusty Newton (rnewton) 2017-03-20 17:55:07.154-0500

One more thing, what version of PJSIP are you using, or are you using bundled?

By: Michael Maier (micha) 2017-03-21 12:55:51.326-0500

Well, it's pretty trivial. Make a local DNS server to not respond (e.g. with iptables) and start asterisk:
{noformat}
[2017-03-18 07:53:58] ERROR[1967] netsock2.c: getaddrinfo("tel.t-online.de", "(null)", ...): Temporary failure in name resolution
[2017-03-18 07:53:58] ERROR[1967] res_pjsip_endpoint_identifier_ip.c: An error occurred when adding resolution results of 'tel.t-online.de' on 'telekomPJSIP'
[2017-03-18 07:53:58] ERROR[1967] res_sorcery_config.c: Could not create an object of type 'identify' with id 'telekomPJSIP' from configuration file 'pjsip.conf'
[2017-03-18 07:54:00] WARNING[2155] res_pjsip_outbound_registration.c: No response received from 'sip:tel.t-online.de' on registration attempt to 'sip:+4911111111111@tel.t-online.de', retrying in '60'
[2017-03-18 07:54:08] ERROR[2155] res_pjsip.c: Error 320052 'DNS "Server failure" (PJLIB_UTIL_EDNS_SERVFAIL)' sending OPTIONS request to endpoint telekomPJSIP
{noformat}

About 2 or 3 minutes later, re enable the resolver again by removing the iptable rules and pjsip will register to the ISP successfully. But the auto generated match entries will stay empty.

I'm using bundled pjsip (see http://lists.digium.com/pipermail/asterisk-dev/2017-March/076202.html and http://lists.digium.com/pipermail/asterisk-dev/2017-March/076215.html)