[asterisk-commits] kmoore: branch 1.8 r405033 - /branches/1.8/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jan 7 13:49:32 CST 2014


Author: kmoore
Date: Tue Jan  7 13:49:27 2014
New Revision: 405033

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=405033
Log:
Add the missing part of r400140

When the patch to add retry-on-forbidden-response was committed, part
of the patch for chan_sip was not committed which caused the feature to
be entirely nonfunctional. This corrects the code in question.

(closes issue ASTERISK-17138)
Review: https://reviewboard.asterisk.org/r/2874

Modified:
    branches/1.8/channels/chan_sip.c

Modified: branches/1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/chan_sip.c?view=diff&rev=405033&r1=405032&r2=405033
==============================================================================
--- branches/1.8/channels/chan_sip.c (original)
+++ branches/1.8/channels/chan_sip.c Tue Jan  7 13:49:27 2014
@@ -21462,6 +21462,13 @@
 		}
 		break;
 	case 403:	/* Forbidden */
+		if (global_reg_retry_403) {
+			ast_log(LOG_NOTICE, "Treating 403 response to REGISTER as non-fatal for %s@%s\n",
+				p->registry->username, p->registry->hostname);
+			ast_string_field_set(r, nonce, "");
+			ast_string_field_set(p, nonce, "");
+			break;
+		}
 		ast_log(LOG_WARNING, "Forbidden - wrong password on authentication for REGISTER for '%s' to '%s'\n", p->registry->username, p->registry->hostname);
 		AST_SCHED_DEL_UNREF(sched, r->timeout, registry_unref(r, "reg ptr unref from handle_response_register 403"));
 		r->regstate = REG_STATE_NOAUTH;




More information about the asterisk-commits mailing list