[Home]

Summary:ASTERISK-28602: res_pjsip_outbound_registration: Maximum retries reached
Reporter:Daniel (dasterisk)Labels:
Date Opened:2019-10-24 17:10:04Date Closed:2019-10-31 12:49:33
Priority:TrivialRegression?
Status:Closed/CompleteComponents:Resources/res_pjsip_outbound_registration
Versions:16.6.1 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:I set up a SIP trunk with my local telephone provider. In pjsip.conf I set max_retries = 0 in the hope that there will be infinite registration attempts in the case of an error. The following night Asterisk lost the registration and stopped the re-registration.

{noformat}
[Oct 24 04:54:40] WARNING[2225]: res_pjsip_outbound_registration.c:977 handle_registration_response: Maximum retries reached when attempting outbound registration to 'sip:dfs.netcologne.de:5060' with client 'sip:221987654321@dfs.netcologne.de:5060', stopping registration attempt
{noformat}

The documentation https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+Configuration_res_pjsip_outbound_registration does not show clearly what max_retries = 0 means. Usually, zero is often infinite. After looking at the source code of the file res_pjsip_outbound_registration.c, it turned out that max_retries = 0 means that no new registration attempt should be made at all:

{noformat}
response->client_state->retries = 0;
...
if (response->client_state->retries == response->client_state->max_retries) {
 ast_log(LOG_WARNING, "Maximum retries reached when attempting outbound registration to...
 ...
} else {
 response->client_state->retries++;
 ...
}
{noformat}

I would like in the documentation will be added a hint: max_retries = 0 = no try. Or an additional pjsip.conf option with infinite registration attempts.

Thank you very much.
Comments:By: Asterisk Team (asteriskteam) 2019-10-24 17:10:05.629-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].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

By: Friendly Automation (friendly-automation) 2019-10-31 12:49:33.990-0500

Change 13125 merged by Friendly Automation:
res_pjsip_outbound_registration: Extend documentation for "max_retries".

[https://gerrit.asterisk.org/c/asterisk/+/13125|https://gerrit.asterisk.org/c/asterisk/+/13125]

By: Friendly Automation (friendly-automation) 2019-10-31 15:15:11.423-0500

Change 13128 merged by Friendly Automation:
res_pjsip_outbound_registration: Extend documentation for "max_retries".

[https://gerrit.asterisk.org/c/asterisk/+/13128|https://gerrit.asterisk.org/c/asterisk/+/13128]

By: Friendly Automation (friendly-automation) 2019-10-31 15:16:06.042-0500

Change 13126 merged by Friendly Automation:
res_pjsip_outbound_registration: Extend documentation for "max_retries".

[https://gerrit.asterisk.org/c/asterisk/+/13126|https://gerrit.asterisk.org/c/asterisk/+/13126]

By: Friendly Automation (friendly-automation) 2019-11-01 09:36:44.018-0500

Change 13127 merged by George Joseph:
res_pjsip_outbound_registration: Extend documentation for "max_retries".

[https://gerrit.asterisk.org/c/asterisk/+/13127|https://gerrit.asterisk.org/c/asterisk/+/13127]