Skip to content

Commit e1e76d0

Browse files
authored
Merge pull request #47 from yeoleobun/patch1
Set route set for 18x with to tag
2 parents 62c4b19 + 066ba0e commit e1e76d0

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ tokio-rustls = { version = "0.26.4", optional = true }
3636
rustls-pemfile = { version = "2.2.0", optional = true }
3737
rustls = "0.23.35"
3838
clap = { version = "4.5.47", features = ["derive"] }
39-
http = "1.3.1"
4039
nom = "8.0.0"
4140

4241
[features]
@@ -60,6 +59,7 @@ stun-rs = "0.1.11"
6059
axum = { version = "0.8.6", features = ["ws"] }
6160
tower = "0.5.2"
6261
tower-http = { version = "0.6.6", features = ["fs", "cors"] }
62+
http = "1.3.1"
6363

6464
[[example]]
6565
name = "client"

src/dialog/client_dialog.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,15 @@ impl ClientInviteDialog {
540540
dialog_id = id;
541541
}
542542
match resp.status_code {
543+
StatusCode::Ringing | StatusCode::SessionProgress
544+
if resp
545+
.to_header()
546+
.ok()
547+
.and_then(|h| h.tag().ok().flatten())
548+
.is_some() =>
549+
{
550+
self.inner.update_route_set_from_response(&resp);
551+
}
543552
StatusCode::OK => {
544553
self.inner.update_route_set_from_response(&resp);
545554
// 200 response to INVITE always contains Contact header

src/dialog/dialog.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -499,10 +499,6 @@ impl DialogInner {
499499
})
500500
.collect();
501501

502-
if new_route_set.is_empty() {
503-
return;
504-
}
505-
506502
new_route_set.reverse();
507503
*self.route_set.lock().unwrap() = new_route_set;
508504
}

0 commit comments

Comments
 (0)