You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Since #169, DialogState::Confirmed of a server dialog carries an empty response (no CSeq) for the initial INVITE and every re-INVITE #173
On the UAS side, DialogState::Confirmed(id, response) is built from the server INVITE transaction's last_response after the ACK arrives. Since #169 the matching ACK terminates the Accepted transaction, and cleanup() takes last_response before the dialog reads it. So every Confirmed of a server dialog, for the initial INVITE and for each re-INVITE, carries Response::default(): status 200 with no headers at all, so no CSeq, no To tag, no Contact, no body.
An application that matches Confirmed to the INVITE it confirms (by CSeq, for example to know which re-INVITE's offer/answer is now in effect) can no longer do it. Reading the CSeq of that response returns MissingHeader("CSeq").
Reproduced on current main (5ef8ea6) over UDP and TCP. The client side is not affected: a UAC builds Confirmed from the 2xx it just received.
Expected
DialogState docs (src/dialog/dialog.rs:88): "Confirmed - Dialog is established and confirmed (2xx response received/sent and ACK sent/received)". The variant carries that 2xx (Confirmed(DialogId, crate::sip::Response), dialog.rs:119), and the UAS code passes tx.last_response for exactly that purpose.
RFC 3261 §13.2.2.4: the ACK's CSeq number "MUST be the same as the INVITE being acknowledged". The CSeq of the 2xx is what ties a Confirmed to its INVITE.
transition to Terminated calls self.cleanup() (transaction.rs:1487), which hands the response to finished_transactions with self.last_response.take() (transaction.rs:1615-1617). last_response is now None.
The dialog then builds DialogState::Confirmed(self.id(), tx.last_response.clone().unwrap_or_default()): src/dialog/server_dialog.rs:865 (re-INVITE) and :905 (initial INVITE), and the same in src/dialog/invite_dialog.rs:863 and :903. unwrap_or_default() yields Response::default() (src/sip/message.rs:586-595).
Sequence: INVITE (CSeq 1) / 200 / ACK. The Confirmed state's response has no CSeq. Same for a re-INVITE (CSeq 2) / 200 / ACK.
Activity