Expand description
Connecting two calls so each hears the other.
The decision that shapes this is whether to decode. When both legs agreed on the same codec, the payload that arrives on one is exactly the payload the other should send, so the bytes go straight across.
Worth being precise about why, because the obvious reason is wrong for the codec sipx ships today. G.711 decoding is exactly invertible — encode(decode(x)) is x for every one of the 256 codes — so for µ-law and A-law, transcoding a bridge costs CPU and nothing else. The generational loss argument is real for every codec whose decode is not invertible: G.722, and Opus when it lands. Building the pass-through path now means those codecs arrive into a bridge that already does the right thing, rather than one that quietly degrades them.
When the codecs differ there is no choice, and the bridge says so rather than transcoding
quietly. Someone looking at a call that sounds worse than it should is entitled to find out
why from the software rather than by reasoning about it.
Experimental (A-8): real over MediaSessions you own, and unreachable from a Call,
which does not hand its session out. Two calls cannot be bridged yet (C-6).
Structs§
- Bridge
- Two calls connected so each hears the other.