feat(proxy-engine): add Rust-based outbound calling, WebRTC bridging, and voicemail handling

This commit is contained in:
2026-04-10 11:36:18 +00:00
parent ad253f823f
commit 239e2ac81d
42 changed files with 3360 additions and 6444 deletions

View File

@@ -14,8 +14,18 @@ pub struct Endpoint {
}
impl Endpoint {
/// Resolve to a SocketAddr. Handles both IP addresses and hostnames.
pub fn to_socket_addr(&self) -> Option<SocketAddr> {
format!("{}:{}", self.address, self.port).parse().ok()
// Try direct parse first (IP address).
if let Ok(addr) = format!("{}:{}", self.address, self.port).parse() {
return Some(addr);
}
// DNS resolution for hostnames.
use std::net::ToSocketAddrs;
format!("{}:{}", self.address, self.port)
.to_socket_addrs()
.ok()
.and_then(|mut addrs| addrs.next())
}
}