]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip_session: Fix in-dialog authentication. 59/559/2
authorRichard Mudgett <rmudgett@digium.com>
Tue, 26 May 2015 18:56:42 +0000 (13:56 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Mon, 1 Jun 2015 20:02:07 +0000 (15:02 -0500)
commitbd32327353c1073403274eb126b7c3045f351d5f
treeb1c2fcdca192c2465d143790f404e20cdb3fb36b
parentb81353a0ecfa1e31b1326348731f21ab89597a64
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