[Asterisk-code-review] res pjsip session: Fix in-dialog authentication. (asterisk[13])

Mark Michelson asteriskteam at digium.com
Thu May 28 13:38:30 CDT 2015


Mark Michelson has posted comments on this change.

Change subject: res_pjsip_session: Fix in-dialog authentication.
......................................................................


Patch Set 2:

(1 comment)

https://gerrit.asterisk.org/#/c/535/2/res/res_pjsip_session.c
File res/res_pjsip_session.c:

Line 1485: static pjsip_module outbound_invite_auth_module = {
         : 	.name = {"Outbound INVITE Auth", 20},
         : 	.priority = PJSIP_MOD_PRIORITY_DIALOG_USAGE,
         : 	.on_rx_response = outbound_invite_auth,
         : };
Seeing this got me thinking a bit more about the auth handling here.

Right now, we have a special case in session_inv_on_tsx_state_changed() for handling in-dialog INVITEs (i.e. reINVITEs) that are challenged. It seems like session_inv_on_tsx_state_changed() could be used to handle auth challenges on the initial INVITE as well. If that were done, then 

1) The repeated checks of 401/407, creating request with auth, and sending the request with auth could be factored into a single function in this file
2) This outbound_invite_auth_module could be deleted.

What do you think about that?


-- 
To view, visit https://gerrit.asterisk.org/535
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12bdd7ddccc819b4ce4b091e826d1e26334601b0
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list