gemini_adk_fluent_rs/telephony/
mod.rs

1//! # Telephony — answer the phone with a governed session
2//!
3//! The public phone network speaks G.711 at 8 kHz; the Live API speaks PCM16
4//! at 16/24 kHz. Between them sits exactly the plumbing
5//! [`voice::pump`](crate::voice::pump) was built to carry — this module adds
6//! the telephone-side dialect:
7//!
8//! - [`g711`] — μ-law and A-law codecs (pure functions, ITU-T G.711).
9//! - [`bridge`] — the vendor-neutral duties every connector shares: one
10//!   session-state vocabulary for DTMF and call identity, and a
11//!   latency-masking filler. A new transport (a platform's gRPC
12//!   virtual-agent slot, a proprietary media stream) composes these instead
13//!   of re-inventing them.
14//! - [`twilio`] — the Twilio Media Streams protocol and [`TwilioCall`]: attach
15//!   a live phone call to a session over any WebSocket server, with barge-in
16//!   mapped to Twilio's `clear` and DTMF digits landing in session state.
17//!
18//! `examples/telephony` is the runnable end: an axum server exposing the
19//! TwiML webhook and the Media Streams WebSocket, one governed session per
20//! call.
21
22pub mod bridge;
23pub mod g711;
24pub mod rtp;
25pub mod sdp;
26pub mod twilio;
27
28#[cfg(feature = "sip")]
29pub mod sip;
30
31pub use twilio::{Inbound, StartMeta, TWILIO_HZ, TwilioCall, TwilioError};