Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider session terminated on 408 and 481 response #3457

Merged
merged 1 commit into from
Mar 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions pjsip/src/pjsip/sip_transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -3220,6 +3220,21 @@ static pj_status_t tsx_on_state_proceeding_uac(pjsip_transaction *tsx,
status = tsx_send_msg( tsx, ack_tdata);
if (status != PJ_SUCCESS)
return status;

} else if ((tsx->method.id == PJSIP_BYE_METHOD) &&
(tsx->status_code == PJSIP_SC_REQUEST_TIMEOUT ||
tsx->status_code == PJSIP_SC_CALL_TSX_DOES_NOT_EXIST))
{
/* RFC 3261 15.1.1:
* If the response for the BYE is a 481 (Call/Transaction Does
* Not Exist) or a 408 (Request Timeout) or no response at all
* is received for the BYE (that is, a timeout is returned by
* the client transaction), the UAC MUST consider the
* session and the dialog terminated.
*/
tsx_set_state( tsx, PJSIP_TSX_STATE_TERMINATED,
PJSIP_EVENT_RX_MSG, event->body.rx_msg.rdata, 0 );
return PJ_SUCCESS;
}

/* Inform TU. */
Expand Down