]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip_outbound_registration: Don't fail on delayed processing: 13. 98/298/2
authorMark Michelson <mmichelson@digium.com>
Mon, 27 Apr 2015 21:56:31 +0000 (16:56 -0500)
committerMark Michelson <mmichelson@digium.com>
Wed, 29 Apr 2015 20:36:54 +0000 (15:36 -0500)
commit11d85ea2511fcfdc444ea627d7f636ce8912510b
tree807c6228cd4bab5462b1af9392eb7ca1d304b304
parent0037ca59a6e53d7994d6bbe50551ee1414903c10
res_pjsip_outbound_registration: Don't fail on delayed processing: 13.

This is the Asterisk 13 version of a change to master that allows for
registration responses to be processed successfully potentially after
the original transaction has timed out. The main difference between this
and the master change is that the master version has API changes that
are unacceptable for 13. For 13, this is worked around by adding a new
API call that the outbound registration code uses instead.

The following is the text from the master version of this commit:

Odd behaviors have been observed during outbound registrations. The most
common problem witnessed has been one where a request with
authentication credentials cannot be created after receiving a 401
response. Other behaviors include apparently processing an incorrect SIP
response.

Inspecting the code led to an apparent issue with regards to how we
handle transactions in outbound registration code. When a response to a
REGISTER arrives, we save a pointer to the transaction and then push a
task onto the registration serializer. Between the time that we save the
pointer and push the task, it's possible for the transaction to be
destroyed due to a timeout. It's also possible for the address to be
reused by the transaction layer for a new transaction.

To allow for authentication of a REGISTER request to be authenticated
after the transaction has timed out, we now also hold a reference to the
original REGISTER request instead of the transaction. The function for
creating a request with authentication has been altered to take the
original request instead of the transaction where the original request
was sent.

ASTERISK-25020
Reported by Mark Michelson

Change-Id: If1ee5f601be839479a219424f0358a229f358f7c
include/asterisk/res_pjsip.h
res/res_pjsip.c
res/res_pjsip_outbound_authenticator_digest.c
res/res_pjsip_outbound_registration.c