Skip to content

Commit

Permalink
Consider session terminated on 408 and 481 response
Browse files Browse the repository at this point in the history
Client must consider session terminated as soon as BYE is passed to
the transaction client. On reseption of 408 or 481, the UAC MUST
consider the session and the dialog terminated.
  • Loading branch information
ODCA117 committed Mar 21, 2023
1 parent 74b0df1 commit 069d7d3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pjsip/src/pjsip/sip_transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -3136,6 +3136,17 @@ static pj_status_t tsx_on_state_proceeding_uac(pjsip_transaction *tsx,
PJSIP_EVENT_TIMER, &tsx->timeout_timer, 0);


} else if (tsx->status_code == 408 || tsx->status_code == 481) {
/* RFC 3261 15.1.1:
* The UAC must consider the session terminated as soon as the
* BYE is passed to the client transaction 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 );
} else if (tsx->status_code >= 300 && tsx->status_code <= 699) {


Expand Down

0 comments on commit 069d7d3

Please sign in to comment.