diff options
-rw-r--r-- | examples/server.rs | 9 | ||||
-rw-r--r-- | src/encoding/uri.rs | 1 |
2 files changed, 1 insertions, 9 deletions
diff --git a/examples/server.rs b/examples/server.rs index 6132dd5..02c06b4 100644 --- a/examples/server.rs +++ b/examples/server.rs @@ -7,7 +7,6 @@ use sip::{ method::Method, response::Response, status::Status, - uri::Uri, }, transaction::TransactionUser, transport::tcp::TcpTransport, @@ -55,13 +54,6 @@ async fn handle_client(stream: TcpStream, addr: SocketAddr) -> Result<()> { Response { status: Status::Ok, headers: HeaderMap::new() - // .add(Contact { - // display_name: None, - // uri: Uri { - // content: format!("sip:username@{addr}"), - // }, - // params: ";expires=600".to_string(), - // }) .add(contact) .add(via) .add(to) @@ -72,6 +64,7 @@ async fn handle_client(stream: TcpStream, addr: SocketAddr) -> Result<()> { ) .await?; } + if req.method == Method::Invite {} } } diff --git a/src/encoding/uri.rs b/src/encoding/uri.rs index db20700..b1a1282 100644 --- a/src/encoding/uri.rs +++ b/src/encoding/uri.rs @@ -37,7 +37,6 @@ impl Display for Uri { impl FromStr for Uri { type Err = anyhow::Error; fn from_str(s: &str) -> Result<Self, Self::Err> { - eprintln!("{s:?}"); let (pr, s) = s.split_once(":").ok_or(anyhow!("protocol sep"))?; let (lp, s) = s.split_once("@").unwrap_or(("", s)); let (addr, params) = s.split_once(";").unwrap_or((s, "")); |