]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip_outbound_registration.c: Fix 423 response handling. 44/1644/2
authorRichard Mudgett <rmudgett@digium.com>
Tue, 17 Nov 2015 20:53:57 +0000 (14:53 -0600)
committerRichard Mudgett <rmudgett@digium.com>
Wed, 18 Nov 2015 19:21:25 +0000 (13:21 -0600)
commite44ab3816cae3e85d27e969366a12881af42fa46
tree2a1c7986d6a21bc8165347d9f9c4cddfac57a50e
parentccf80f95a21c380fb9e96a367bece411e349edb0
res_pjsip_outbound_registration.c: Fix 423 response handling.

Receiving a 423 Interval Too Brief response after authentication for an
outbound registration attempt results in assuming that the registrar has
rejected the registration permanently.  If there are no configured retries
for fatal responses then the outbound registration is stopped for that
endpoint.

For registrations, PJSIP/PJPROJECT intercepts the handling of 423
responses and does not include any authentication in the updated
registration request.  When the updated request is challenged then the
Asterisk code assumes that we were challenged again because the peer
rejected the authentication we sent earlier.

* Made registration challenges keep track of the CSeq number to determine
if the received challenge response was for the request we thought we sent.
If the response's CSeq number differs from the CSeq number we last sent
with authentication then authenticate again because it is a challenge to a
different request.

Change-Id: I81b4bd36d1be095bab606e34b8b44e6302971b09
res/res_pjsip_outbound_registration.c