Summary
ServerInviteDialog::bye_with_headers returns Ok(()) without sending BYE when the dialog is not in Confirmed or WaitAck:
if !self.inner.is_confirmed() && !self.inner.waiting_ack() {
return Ok(());
}
Callers (e.g. a B2BUA hangup path) cannot distinguish “BYE sent” from “nothing happened”. If dialog state has diverged from the media path (media flowing while dialog still Early, or already past the expected state), the remote UA never receives BYE and stays off-hook.
Affected version
rsipstack 0.5.24 (crates.io)
Environment
- Used under restsend/rustpbx as B2BUA
- Observed hangup completing in ~10–20ms with
Ok while no BYE appears on the wire toward a UDP ATA
Expected options (either would help)
- Return a distinct error /
Ok(false) when BYE was not sent, or
- Document clearly and have higher layers check
state() before assuming hangup succeeded, or
- For INVITE server dialogs that have sent a non-100 response, still attempt BYE/CANCEL as appropriate rather than silent success
Minimal reproduction
- Create a
ServerInviteDialog, leave it in Calling/Early (or any non-Confirmed/non-WaitAck state).
- Call
bye().await.
- Observe
Ok(()) and no SIP message sent.
Not claiming every Early dialog must send BYE — the footgun is the silent Ok(()).
Summary
ServerInviteDialog::bye_with_headersreturnsOk(())without sending BYE when the dialog is not inConfirmedorWaitAck:Callers (e.g. a B2BUA hangup path) cannot distinguish “BYE sent” from “nothing happened”. If dialog state has diverged from the media path (media flowing while dialog still Early, or already past the expected state), the remote UA never receives BYE and stays off-hook.
Affected version
rsipstack 0.5.24 (crates.io)
Environment
Okwhile no BYE appears on the wire toward a UDP ATAExpected options (either would help)
Ok(false)when BYE was not sent, orstate()before assuming hangup succeeded, orMinimal reproduction
ServerInviteDialog, leave it inCalling/Early(or any non-Confirmed/non-WaitAck state).bye().await.Ok(())and no SIP message sent.Not claiming every Early dialog must send BYE — the footgun is the silent
Ok(()).