diff options
author | Kinsey Moore <kmoore@digium.com> | 2014-01-08 16:30:14 +0000 |
---|---|---|
committer | Kinsey Moore <kmoore@digium.com> | 2014-01-08 16:30:14 +0000 |
commit | 522593f901baff3f1ba334ecaad9eefd6a9c9316 (patch) | |
tree | deef91981c5ce9d6704d80a64340984c76493ffc /channels | |
parent | 34c595beb9fcc99274290ce657582333defeb90f (diff) |
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
........
Merged revisions 405033 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 405081 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 405083 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index c9b93b9dc..42829297e 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -23871,6 +23871,13 @@ static int handle_response_register(struct sip_pvt *p, int resp, const char *res } 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; |