mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 11:58:52 +00:00
res_pjsip_session: Don't aggressively terminate on failed re-INVITE.
Per the RFC when an outgoing re-INVITE is done we should only terminate the dialog if a 481 or 408 is received. ASTERISK-29033 Change-Id: I6c3ff513aa41005d02de0396ba820083e9b18503
This commit is contained in:
committed by
Kevin Harwell
parent
d189bf9ae5
commit
7b1ace9040
@@ -3907,8 +3907,11 @@ static void session_inv_on_tsx_state_changed(pjsip_inv_session *inv, pjsip_trans
|
|||||||
ast_sip_session_send_request_with_cb(session, tdata, cb);
|
ast_sip_session_send_request_with_cb(session, tdata, cb);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (tsx->status_code != 488 && tsx->status_code != 500) {
|
/* Per RFC3261 14.1 a response to a re-INVITE should only terminate
|
||||||
/* Other reinvite failures (except 488 and 500) result in destroying the session. */
|
* the dialog if a 481 or 408 occurs. All other responses should leave
|
||||||
|
* the dialog untouched.
|
||||||
|
*/
|
||||||
|
if (tsx->status_code == 481 || tsx->status_code == 408) {
|
||||||
if (pjsip_inv_end_session(inv, 500, NULL, &tdata) == PJ_SUCCESS
|
if (pjsip_inv_end_session(inv, 500, NULL, &tdata) == PJ_SUCCESS
|
||||||
&& tdata) {
|
&& tdata) {
|
||||||
ast_sip_session_send_request(session, tdata);
|
ast_sip_session_send_request(session, tdata);
|
||||||
|
Reference in New Issue
Block a user