]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip_session: Fix in-dialog authentication. 35/535/2
authorRichard Mudgett <rmudgett@digium.com>
Tue, 26 May 2015 18:56:42 +0000 (13:56 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Wed, 27 May 2015 20:10:49 +0000 (15:10 -0500)
commitfe21f2e52f1b6629a254cc2f34345c4de6ec4293
tree3a276b4eaf102881600f4fcd86ed487c0da4f382
parent262d590819b123b1f57196beef8aca45c4aa0d09
res_pjsip_session: Fix in-dialog authentication.

When the remote peer requires authentication for in-dialog requests then
re-INVITEs to the peer cause the call to be disconnected and other
in-dialog requests to the peer like MESSAGE just don't go through.

* Made session_inv_on_tsx_state_changed() handle in-dialog authentication
for re-INVITEs and other methods.  Initial INVITEs cannot be handled here
because the INVITE transaction must be restarted earlier.

* Pulled needed code from res/res_pjsip/pjsip_outbound_auth.c in
preparation for removing the file.  The generic outbound authentication
code did not work as well as anticipated.

* Created outbound_invite_auth() to only handle initial outbound INVITEs.
Re-INVITEs cannot be handled here.  The re-INVITE transaction is still in
progress and the PJSIP library cannot handle the overlapping INVITE
transactions.  Other method types should not be handled here as this code
only works on outgoing calls and we need to handle incoming and outgoing
calls.

ASTERISK-25131 #close
Reported by: Richard Mudgett

Change-Id: I12bdd7ddccc819b4ce4b091e826d1e26334601b0
res/res_pjsip_session.c