Updates

The Rust engine is live

Kahevo's own call engine, written in Rust, is now in production: it sets calls up and carries their audio.

The engine we started on in September is now in production.

What it does now

When we last wrote about it, the engine converted voice between codecs and carried audio. It now does the rest of a phone call as well:

  • registers with providers and keeps those registrations alive,
  • signs desk phones in,
  • sets calls up, rings, answers, holds and transfers them,
  • carries the audio, plain or encrypted,
  • and converts between codecs when the two sides differ.

Over UDP, TCP and TLS, on the same ports as before.

The numbers, again

Nothing about these changed, and they are why we did it.

Processor used to carry 500 calls
Before
1.2 processor cores
With the engine
0.5 processor cores
Time paused for memory cleanup during a 15-second test
Before
850 milliseconds
With the engine
40 milliseconds

Encryption, without writing any

Signaling is encrypted with TLS and audio with SRTP, both inside the engine. We kept one rule from the first day: no home-made cryptography. Both come from a widely used, audited library, and the engine only passes bytes to it and says who is to be trusted.

A provider's certificate is checked against the server's own list of trusted authorities, so it stays current as the server is updated.

Finding a provider

A provider is given by name, and the engine works out where that name leads, including providers that publish several servers. If one stops answering, a registration moves to the next.

Built to be shouted at

Software that listens on the internet hears from everyone. The engine refuses any message that is too large before reading it, and checks a message's claims about itself against what actually arrived. One of our tests damages a real call request three hundred thousand different ways and feeds it every one. Nothing breaks.

How it went in

PieceWhat it replaced
CodecsVoice conversion
AudioCarrying each call's packets
SignalingRegistering, and setting calls up
EncryptionTLS for signaling, SRTP for audio

Each piece went in behind its own switch and was run against the full test suite with the switch on and off. Those switches are still there. Turn a piece off and Kahevo carries on the way it did before.

What is not on it yet

Calls from the browser phone and the iPhone app use a different kind of encryption, and those still run on the older path. So does the last step of joining the two sides of a call. Both are next.

Why it matters to you

A server that carries the same calls on less than half the processor is a smaller server, or the same one with more room. And the core of Kahevo now answers to nobody's license terms but our own.

Mahalo to everyone who put up with us talking about packet timings for a month.

Curious whether Kahevo fits?

Tell us what you run today and how many phones, and we will tell you honestly. Mahalo for reading.