Sipral 1.3 is out. It was planned for November with real phones and PBX WebRTC lines; it also brings what was planned for December and for next year and is already done: trickle ICE, calls with a browser, SIP-T and SIP-I, client certificates, networking ready to use from C and Rust, a C++ API and a hook on every SIP message.
On real phones
The iOS and Android packages have run on real phones, not only on simulators and emulators, through the sample apps in the repository: the system’s own call screen (CallKit on iOS, the self-managed ConnectionService or Core-Telecom on Android), a cellular call interrupting ours, the audio routes, the lock screen.
A phone whose app the system has ended is woken by a push and rings. The RFC 8599 parameters ride on every REGISTER, and the repository’s push gateway, the proxy half of RFC 8599 for a PBX that has none, holds the call while it pushes through Apple or Google. With the samples ended and the phones locked, a call through a FreePBX rang on the iPhone 0.22 s after iOS started the app, and on Android 0.9 s after the process started.
The phones found three things the simulators had not, all fixed in 1.3: a real VoIP push ended the iOS app, because the call was reported to CallKit a moment too late; a caller not behind a PBX heard no ringing, because no 180 was sent until the answer; and after a cellular call taken with Hold & Accept, our call came back without audio.
WebRTC lines and browsers
A PBX WebRTC line, as Asterisk’s webrtc=yes and the gateways in front of WebRTC services expect it: BUNDLE (RFC 8843) and the UDP/TLS/RTP/SAVPF profile, keyed by DTLS-SRTP. Trickle ICE (RFC 8838, RFC 8840) sends candidates as they are found, both ways, so a call is set up sooner. And a call to and from a browser, through a SIP over WebSocket server, proven in the lab against Chromium, which showed one more thing to fix: its DTLS handshake now arrives in two pieces, and is put together.
Carrier trunks
SIP-T and SIP-I: the ISUP a carrier gateway carries inside SIP (RFC 3204, RFC 3372) is read and written, from ITU-T Q.763. The caller’s number, its presentation, the redirection and the release cause come from it when the gateway sends them, and calls both ways are proven against a carrier-style gateway in the lab.
Client certificates
A client certificate on SIP over TLS, its private key held by the platform: the Secure Enclave or the Keychain on iOS and macOS, the Android Keystore, CNG on Windows, PEM files in Python, Dart and Node.js. Each identity, and each account with a certificate of its own, gets a TLS connection of its own, and a server’s certificate is read as RFC 5922 reads it, with the name constraints of the authorities above it.
Embedding without a binding
The language packages open their own sockets with the platform’s APIs; a C, C++ or Rust program had to write that layer itself. Now:
- an optional networking component runs the sockets, TLS, NAPTR and SRV lookups, and every call’s STUN and TURN over UDP, TCP or TLS, behind the C ABI;
- a C++17 API puts the stack, accounts, calls and events in classes over the C ABI, their lifetimes handled;
- a hook sees, changes or drops every SIP message just before it is sent and just after it arrives, from Rust, C, C++ and every language package.
Compatible
1.3 is at C ABI 1.13. An application built on any earlier 1.x release works with it unchanged: the C interface only grew.
Install
pip install sipral # or sipral-opus
dotnet add package Sipral # Sipral.Opus, Sipral.Maui
npm install sipral # sipral-react-native for React Native
cargo add sipral
dart pub add sipral
On Android and the JVM, org.sipral:sipral, org.sipral:sipral-telecom and org.sipral:sipral-jvm from Maven Central; for Swift, this package: https://github.com/SIPRAL/sipral, from 1.3.0. What changed, line by line, is in the changelog.