udptl
UDPTL (UDP Transport Layer) codec and socket for T.38 fax over IP.
Implements the UDPTL packet format defined in ITU-T T.38 with both redundancy and FEC error recovery modes. Wire-compatible with SpanDSP.
Usage
[]
= "0.1"
Async (tokio, default)
use AsyncUdptlSocket;
let socket = bind.await?;
let udptl = new;
udptl.connect;
// Send an IFP packet (redundancy added automatically)
udptl.send_ifp.await?;
// Receive
let packet = udptl.recv_packet.await?;
println!; // UDPTL seq=0 primary=128B redundant=3
Sync
[]
= { = "0.1", = false }
use UdptlSocket;
let socket = bind?;
let udptl = new;
udptl.connect;
udptl.send_ifp?;
let packet = udptl.recv_packet?;
Codec only
Encode and decode packets without a socket:
use ;
// Decode
let packet = decode?;
// Encode
let packet = with_redundancy;
let bytes = packet.encode;
// FEC mode
let packet = with_fec;
let bytes = packet.encode;
Configuration
use ;
let config = UdptlConfig ;
let udptl = with_config;
License
MIT
AI DISCLAIMER
Bro this is slop city deluxe. I heavily supervised the model but it's 2026, get real. No warranties express or implied etc etc.