diff options
author | Kevin Harwell <kharwell@digium.com> | 2017-09-22 15:29:24 -0500 |
---|---|---|
committer | Kevin Harwell <kharwell@digium.com> | 2017-09-22 16:36:09 -0500 |
commit | 36690c26f88374dbd71aab899479a4dd671d6408 (patch) | |
tree | 61077cabd6386ecb0a2ebd33c165021b56c7f519 /res/res_pjsip_session.c | |
parent | f91a905003eb4bb3f68b04e7a235ecc5b0cd47dc (diff) |
res_pjsip_session: Don't end session when receiving a 500 on a reinvite
During a reinvite, if a remote endpoint error occurs and it returns a 500 the
session would end. This patch makes it so the session is not terminated, but
continues as it was.
The reason for this is because some endpoints may send non session terminating
"server errors" like a failed codec negotiation. So in this case instead of
ending the call it can hopefully continue. In the case of a real server error
the session is already "doomed", will be known soon enough and appropriately
ended by Asterisk later.
Change-Id: Ifeedae86b8cb44b92d52c79046522ec5f0aff1d5
Diffstat (limited to 'res/res_pjsip_session.c')
-rw-r--r-- | res/res_pjsip_session.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c index 2beb6dcd5..e25ba0aeb 100644 --- a/res/res_pjsip_session.c +++ b/res/res_pjsip_session.c @@ -3485,8 +3485,8 @@ static void session_inv_on_tsx_state_changed(pjsip_inv_session *inv, pjsip_trans ast_sip_session_send_request_with_cb(session, tdata, cb); return; } - if (tsx->status_code != 488) { - /* Other reinvite failures (except 488) result in destroying the session. */ + if (tsx->status_code != 488 && tsx->status_code != 500) { + /* Other reinvite failures (except 488 and 500) result in destroying the session. */ if (pjsip_inv_end_session(inv, 500, NULL, &tdata) == PJ_SUCCESS && tdata) { ast_sip_session_send_request(session, tdata); |