Voice · protocol first

Cantus — one socket, always a path.

A realtime voice standard that replaces SIP, SDP and RTP with a single 5-tuple, typed negotiation, and traversal that is on from the first packet. A call either connects and you hear it, or it tells you why not — there is no third outcome.

$ git clone https://github.com/innotelinc/cantus && cd cantus && make test
1 port
signalling, media, probing, registration
300 ms
to commit a relay path, not to fail
189
assertions over real sockets
0
CPAN dependencies

Why Cantus

Each answer is normative in the standard, not a policy in a config file.

"It connected, but nobody can hear anything."

Impossible by construction: signalling and media share one 5-tuple, so one NAT mapping serves the call and the two address views cannot disagree.

Traversal is six knobs you must reconcile.

Reach is always on. The relay mapping opens at startup with registration, so the fallback exists before anyone dials — and ice_support=no is not a default here.

A call should not open 10,000 UDP ports.

One port carries everything. There is no port range to open, no second address to rewrite, and nothing to keep aligned in a firewall.

SDP negotiation is 2,580 lines of glue.

Capability sets are ordered data: one round trip, caller's order wins, no re-offer, no UPDATE, no PRACK.

Every path decision is invisible.

Direct, relay, failover and recovery are events with timings. The suite asserts them, and cantus demo prints them.

You have to trust the From header.

Identity is a key: every signed message proves the node, not the field it typed in.

What it actually does

Measured against the Asterisk 22.11.0 release tarball, not against an impression.

Asterisk 22.11.0Cantus 1.0
Ports per callsignalling + 10,000–20,000/udp1
Traversalopt-in ICE, 6 knobs, ice_support=noalways on, zero config
If traversal failscall connects, audio silentrelay path, audio flows
NegotiationSDP text, re-offerstyped set, 1 round trip
Config101 sample .conf files1 routing document
Stack size55,858 lines of SIP2,494 lines, no deps

Behind a hard NAT, and back again

Both endpoints behind a real middlebox whose mapping table is flushed mid-call.

path          direct  (relay carried the outage, then direct recovered)
audio         421 frames received, peak amplitude 6000
direct/relay  417 / 4 frames
rebinding     nat table flushed; fallback=yes, direct restored at 1.23s
continuity    0 frames on the relay, 390 after recovery, call dropped: no
PASS

Detected in 420–600 ms from the peer's own reports and our own reception, not from a fixed 2 s timer. Failover, recovery, and the call never leaves ACTIVE.

The pieces

A standard, a reference stack that proves it, and the suite that keeps it honest.

The standard

Wire format, handshake, negotiation, call machine, Reach, media, identity, routing, reason codes, conformance suite. Normative, and small enough to read in one sitting.

The reference stack

Perl 5, core modules only. Real UDP sockets, a real relay, a real NAT middlebox in the test path. It runs anywhere Perl runs, including this machine.

The conformance suite

189 assertions: audio verified by amplitude, ACTIVE read from the state machine, NAT drops counted inside the middlebox.