From beab67b2e38808f91ecd390190d527fc7db5499d Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sun, 23 Feb 2025 12:14:27 +0100 Subject: call receive tool --- sip/examples/server.rs | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'sip/examples/server.rs') diff --git a/sip/examples/server.rs b/sip/examples/server.rs index 02c06b4..859c35e 100644 --- a/sip/examples/server.rs +++ b/sip/examples/server.rs @@ -47,7 +47,10 @@ async fn handle_client(stream: TcpStream, addr: SocketAddr) -> Result<()> { let to: To = req.headers.get_res()?; let via: Via = req.headers.get_res()?; let contact: Contact = req.headers.get_res()?; - info!("Registered {}", contact.uri.localpart.as_ref().unwrap()); + info!( + "({addr}) Registered {}", + contact.uri.localpart.as_ref().unwrap() + ); tu.respond( &req, @@ -67,17 +70,3 @@ async fn handle_client(stream: TcpStream, addr: SocketAddr) -> Result<()> { if req.method == Method::Invite {} } } - -/* -[2024-07-05T22:22:40Z DEBUG sip::transport::udp] SIP/2.0 200 OK - Via: SIP/2.0/UDP 198.18.1.135:52125;branch=Uz7r7ysvrS91q9j9;rport=52125 - Contact: ;expires=379;+sip.instance="" - Contact: ;expires=411 - Contact: ;expires=600 - To: ;tag=81756f4e - From: ;tag=-AK4OkphTFVZv50h - Call-ID: U3Fyb6vT1BhWxiKG - CSeq: 1 REGISTER - User-Agent: AGFEO SIP V3.00.15 n (MAC=00094070069C) - Content-Length: 0 -*/ -- cgit v1.2.3-70-g09d2