From b87160036ce5401172e8b0b842203eba2dc2865d Mon Sep 17 00:00:00 2001 From: yeoleobun Date: Wed, 26 Nov 2025 18:33:41 +0800 Subject: [PATCH 1/2] set route set for 18x with to tag --- src/dialog/client_dialog.rs | 10 ++++++++++ src/dialog/dialog.rs | 4 ---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/dialog/client_dialog.rs b/src/dialog/client_dialog.rs index c2869cbc..1d8f8b6b 100644 --- a/src/dialog/client_dialog.rs +++ b/src/dialog/client_dialog.rs @@ -540,6 +540,16 @@ impl ClientInviteDialog { dialog_id = id; } match resp.status_code { + + StatusCode::Ringing | StatusCode::SessionProgress + if resp + .to_header() + .ok() + .and_then(|h| h.tag().ok().flatten()) + .is_some() => + { + self.inner.update_route_set_from_response(&resp); + } StatusCode::OK => { self.inner.update_route_set_from_response(&resp); // 200 response to INVITE always contains Contact header diff --git a/src/dialog/dialog.rs b/src/dialog/dialog.rs index 3149eb57..453baed2 100644 --- a/src/dialog/dialog.rs +++ b/src/dialog/dialog.rs @@ -499,10 +499,6 @@ impl DialogInner { }) .collect(); - if new_route_set.is_empty() { - return; - } - new_route_set.reverse(); *self.route_set.lock().unwrap() = new_route_set; } From 066ba0e2af0387e6cd6cdf5c5a967cd6c5430e09 Mon Sep 17 00:00:00 2001 From: yeoleobun Date: Wed, 26 Nov 2025 19:10:01 +0800 Subject: [PATCH 2/2] fix fmt check --- Cargo.toml | 2 +- src/dialog/client_dialog.rs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 25750e76..3d90b174 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,7 +36,6 @@ tokio-rustls = { version = "0.26.4", optional = true } rustls-pemfile = { version = "2.2.0", optional = true } rustls = "0.23.35" clap = { version = "4.5.47", features = ["derive"] } -http = "1.3.1" nom = "8.0.0" [features] @@ -60,6 +59,7 @@ stun-rs = "0.1.11" axum = { version = "0.8.6", features = ["ws"] } tower = "0.5.2" tower-http = { version = "0.6.6", features = ["fs", "cors"] } +http = "1.3.1" [[example]] name = "client" diff --git a/src/dialog/client_dialog.rs b/src/dialog/client_dialog.rs index 1d8f8b6b..188392f0 100644 --- a/src/dialog/client_dialog.rs +++ b/src/dialog/client_dialog.rs @@ -540,7 +540,6 @@ impl ClientInviteDialog { dialog_id = id; } match resp.status_code { - StatusCode::Ringing | StatusCode::SessionProgress if resp .to_header()