In ServerInviteDialog::handle_bye() the dialog is terminated with
TerminatedReason::UacBye, but this code runs on the server/UAS side
handling an incoming BYE request.
async fn handle_bye(&mut self, tx: &mut Transaction) -> Result<()> {
info!(id = %self.id(), "received bye {}", tx.original.uri);
self.inner
.transition(DialogState::Terminated(self.id(), TerminatedReason::UacBye))?;
tx.reply(rsip::StatusCode::OK).await?;
Ok(())
}
Proposed fix
self.inner.transition(
DialogState::Terminated(self.id(), TerminatedReason::UasBye)
)?;