Repository navigation
Sipral 1.3.0
Real phones, PBX WebRTC lines, browsers, SIP-I trunks, client certificates held by the platform, networking ready to use from C and Rust, a C++ API and a hook on every SIP message.
At C ABI 1.13: an application built on any earlier 1.x release works unchanged.
Added
-
Sipral from C++.
bindings/cpp/include/sipral.hpp, header only and C++17, puts the stack, its accounts and calls, its events, the message hook and the networking component in classes over the C ABI: a stack destroyed and an account removed with its object, a failed call asipral::Errorwith its status and the library's sentence, handlers asstd::functionwhose exceptions never cross into the library (docs/27-cpp.md).bindings/cpp/smoke.cppruns in the gate, andscripts/lab.sh networkrunsinterop/network/register-and-hold.cppafter its C twin. -
Networking ready to use, for a program with none of its own (C ABI 1.6). The new
sipral-netcrate runs the sockets, TLS (rustls, against the platform's trust store, a private authority beside it or alone, or one pinned certificate, with a client certificate when asked) and RFC 3263's NAPTR, SRV, A and AAAA lookups (hickory's resolver, the system's configuration or named servers) for the core; behindsipral-ffi'snetworkfeature, off by default,sipral_network_start,sipral_network_runand six more entry points run a stack's whole loop, a call's media socket included, reporting every refused connection with the reasons the bindings give (docs/26-network.md).scripts/lab.sh networkregisters a C program with no networking code over TLS at Asterisk, found by NAPTR and SRV, and holds and resumes a call. -
Opus from the Swift package, and the telecom helper on Maven. The root
Package.swiftcarries both variants as package traits,Standardby default andOpus(traits: ["Opus"], Swift 6.1 or later) overCSipral-opus.xcframework.zip, which now holdsCSipralOpus.xcframework;xcframework.sh --release --with-opuswrites its pair of constants.android.shwritesorg.sipral:sipral-telecomwith its POM and sources jar and puts it in the local Maven repository besideorg.sipral:sipral. -
A PBX WebRTC line.
CodecCatalog::with_webrtc, and per accountAccountSrtp::webrtc, describe a call the way Asterisk'swebrtc=yesand the gateways in front of a WebRTC service expect:UDP/TLS/RTP/SAVPFkeyed by DTLS-SRTP alone, ICE,a=rtcp-mux-only(RFC 8858), the stream alone in a BUNDLE group witha=mid, the MID header extension (RFC 8843, RFC 8285),a=msid(RFC 8830) anda=ssrcwith its CNAME; the tag rides the first RTP packets and every RTCP report. Any catalogue now answers an offer that bundles as RFC 8843 asks, and an offer witha=rtcp-mux-onlywith mux (docs/05-media.md, "A WebRTC line"). Through the C ABI it issipral_account_config_t::webrtc(ABI 1.4; a binding printed at 1.3 loads unchanged), and each idiomatic layer takes it with the account's SRTP settings, React Native'saddAccount({webrtc: true})and C++'sAccountOptions::webrtcamong them.scripts/lab.sh webrtcplaces and receives calls on Asterisk'swebrtc=yesendpoints over UDP and over a WebSocket and calls FreeSWITCH through Kamailio the same way, audio heard both ways on every call. -
Trickle ICE (RFC 8838), carried in SIP by RFC 8840's
trickle-iceInfo Package (C ABI 1.4).IceTrickle::Halfoffers every candidate as before and takes a far end's late ones;IceTrickle::Fullplaces or answers a call before its STUN mapping or TURN relay is back, sends them in INFO requests as they come, thena=end-of-candidates, and requirestrickle-iceof the far end.sipral_stack_config_t::ice_trickleandsipral_call_config_t::ice_trickletake asipral_ice_trickle_t, and the Python, Swift, .NET and Kotlin layers take it on the stack and on a call; the full agent pairs late candidates, unfreezes by RFC 8838 §12 and keeps a checklist open while candidates may still come (docs/06-nat.md, "Trickle ICE";docs/08-ffi.md, "What ABI 1.4 added").scripts/lab.sh trickleproves it through Kamailio and two NATs, and half trickle against Asterisk. -
SIP-T and SIP-I: a carrier gateway's ISUP is read, not refused (C ABI 1.4). An INVITE, re-INVITE, UPDATE, PRACK or INFO carrying RFC 3204's
application/ISUP, alone or inmultipart/mixedbeside the SDP, is taken, the SDP part read as the session description wherever one is; ISUP this end cannot read (ANSI, TTC) is refused 415 when required and ignored when optional, and a 415 listsapplication/sdp, application/isup, multipart/mixed.sipral_core::isupreads and writes the ISUP itself, from ITU-T Q.763: IAM, ACM, CPG, ANM, CON, REL and RLC with their numbers, redirection information, cause indicators and call indicators, every other message type recognised; a fuzz target holds it to never panicking. The IAM isCallerIdentity::isup, and fills in what the headers did not say (RFC 3398, ITU-T Q.1912.5): a withheld calling number asks forPrivacy: id, a vouched international one from a trusted gateway is the asserted identity, the redirecting and original called numbers are the diversions; a REL in the BYE, CANCEL or refusal gives the call's end its Q.850 cause and name when noReasondid. No ISUP is sent (RFC 3372 §4.1). In C:SIPRAL_IDENTITY_TEXT_ISUP_CALLING,_ADDITIONAL_CALLING,_ORIGINAL_CALLED,_REDIRECTING, andsipral_message_isup,sipral_isup_readwithsipral_isup_t,sipral_isup_number; the Swift and Kotlin layers carryCallerIdentity.isupandSipralCallerIdentity.isup.scripts/lab.sh isupruns a scripted SIP-I gateway's calls both ways through the C ABI. -
A message hook: every SIP message seen, changed or dropped just before it is sent and just after it arrives (C ABI 1.5).
Endpoint::set_message_hookin Rust, withRewriteto set, add and remove header fields and change the body while keepingContent-Lengthtrue;sipral_stack_message_hookandsipral_hooked_message_replacein C;Stack.set_message_hookin Python;SipralStack.setMessageHook(_:)in Swift;SipralClient.setMessageHookin Kotlin;SipralStack.SetMessageHookin .NET,SipralStack.setMessageHookin Dart andStack.setMessageHookin Node.js, each with a typed keep, replace or drop verdict;Stack::set_message_hookin C++; and in React Native, whose JavaScript answers too late to decide inside the stack,client.setMessageRules(fields set, added or removed by direction and method, applied by the Swift and Kotlin layers' hooks) andclient.watchMessages, every message handed over after the fact. Retransmissions pass it again, keep-alives never do (docs/03-core-signalling.md, "A message hook").scripts/lab.shhas Asterisk receive a REGISTER the hook gave a header, a changedMax-Forwardsand noExpires. -
A client certificate on SIP over TLS, its private key kept and used by the platform (C ABI 1.4). Swift
ClientIdentity(a Keychain identity, or a certificate joined to a Secure Enclave key, with the key and its PKCS#10 request made on the device), KotlinSipralClientCertificate(Android Keystore by alias, or anyKeyStore), .NETSipralClientCertificate(CNG, the Keychain, or files on Linux), and PEM files in Python, Dart and Node.js, presented on the stack's TLS connection, an account's own and, where the layer opens one, TURN over TLS. A certificate that cannot be presented and a server that refuses it are told apart, as four values appended tosipral_tls_failure_t— client certificate required (5), refused (6), key unavailable (7), expired (8) — carried bySIPRAL_EVENT_KIND_TRANSPORT_FAILED, a TLS 1.3 server's late refusal included, and Asterisk's, which closes the connection with no alert at all (docs/22-tls.md, "A client certificate";docs/08-ffi.md, "What ABI 1.4 added").scripts/lab.sh tlsgains Asterisk transports that require one, at TLS 1.3 and 1.2, for the Python, Kotlin and .NET agents and for C with OpenSSL (interop/tls/client-cert.c), each refusal to be reported as its own. -
A mailbox's state taken unasked, by an account that says so (C ABI 1.10).
Account::accepts_unsolicited_message_summary, in Csipral_account_config_t::unsolicited_mwi, takes amessage-summaryNOTIFY no subscription asked for, from the address the account registers with, for a PBX such as VitalPBX that ties the mailbox to the extension, refuses a subscription and notifies unasked: it is answered 200 and raised asUaEvent::MessagesWaitingUnasked, in CSIPRAL_EVENT_KIND_MESSAGES_WAITINGwith the account and no subscription. Off by default, when RFC 6665 §4.1.3's 481 still answers it; the Swift, Kotlin, JVM, .NET, Python, Dart, Node.js, React Native and C++ layers take it on the account (unsolicitedMwi,unsolicited_mwi), and Dart'sSipralStackEvent.messageSummarynow carries a messages-waiting event's counts (docs/04-ua.md, "Notifications outside a subscription we created are refused";docs/08-ffi.md, "What ABI 1.10 added"). -
One TLS connection per identity, in every layer (C ABI 1.11). Accounts of different SIP domains or pinned certificates that one address serves, as a multi-tenant PBX does, are no longer put on the first account's connection and held to its name:
sipral_transport_wanted_event_tnames the server name and the pin the connection is for, andsipral_stack_stream_openingsays, before connecting, which identity a connection is checked against, so the stack keeps it to the accounts of that identity. The Swift, Kotlin, JVM, .NET, Python, Dart and Node.js layers open one connection for each identity asked for and reuse one already open for it; their events carry the two new members (serverName,tlsPinSha256), and an explicittlsServerNamestill wins (docs/08-ffi.md, "What ABI 1.11 added";docs/26-network.md). A binding printed at 1.10 works with a 1.11 library as it did. -
An account's own client certificate gets a TLS connection of its own (C ABI 1.12). Two accounts at one server with the same name and pin but client certificates of their own went over one connection, which presented the first account's, so the server took the second account's REGISTER as from the first user.
sipral_account_config_t::tls_client_tagnames, without carrying it, the certificate an account presents; the stack keeps accounts whose tags differ apart and names the tag insipral_transport_wanted_event_tandsipral_stream_opening_t, and the Swift, Kotlin, JVM, .NET, Python, Dart and Node.js layers derive it from the account's certificate and present the one each connection was asked for (docs/08-ffi.md, "What ABI 1.12 added";docs/22-tls.md, "A client certificate"). -
A SIP server's certificate read with the authorities above it (C ABI 1.11).
sipral_certificate_check_domain_in_chaintakes the chain the platform verified and accepts asip:URI in the certificate only where everynameConstraintsabove it allows its host (RFC 5922, RFC 5280 §4.2.1.10); the Swift, Kotlin, JVM, .NET, Python (3.13 on) and Node.js layers call it with their platform's chain, and the .NET layer now builds that chain with the intermediates the server sent (docs/22-tls.md, "What the platform checks, and what RFC 5922 adds"). -
A busy-lamp panel can have its lamps back within minutes (C ABI 1.13).
Account::subscription_retry_max, in Csipral_account_config_t::subscription_retry_max_seconds, lowers the longest a failed subscription of the account waits before trying again from RFC 5626 §4.5's 1800 seconds, the first wait still under 30 and a notifier'sRetry-Afterstill honoured; every layer takes it on the account (subscriptionRetryMaxSeconds,subscription_retry_max_seconds) (docs/04-ua.md, "Subscriptions";docs/08-ffi.md, "What ABI 1.13 added"). A binding printed at 1.12 works with a 1.13 library as it did. -
Watches ended on the way into the background on iOS.
SipralAppLifecycle.endInBackground(_:)takes a subscription to end (Expires: 0) after the registrations are written down and before the stack is told it is suspending, so a notifier no longer keeps notifying a phone that is not running (docs/15-mobile.md). -
scripts/lab.sh pbx-live: the live-PBX scripts against any PBX. The account file may name a registrar apart from the SIP domain, the number dialled for each extension and encrypted media only, and the extensions register and unregister a second apart, under the per-address flood limit a Kamailio in front of a PBX keeps. -
An attended transfer from Swift and Kotlin, and on the system's call screen.
Call.consult(target:)andCall.transfer(to: Call)in Swift,SipralCall.consultandSipralCall.transferToin Kotlin, place the consultation from the held call's own line with the stack running its audio, and hand the call over withReplaces(RFC 3891).CallKitAdapter.startConsultation(holding:callee:dial:)withCallKitBridge.handleTransfer(uuid:), andTelecomBridge.consultwithTelecomBridge.transfer, show the consultation as a second call while the first is held, join the two, and take the first call off hold when the consultation ends without a transfer (docs/15-mobile.md, "An attended transfer on the system's call screen"). -
A watched line's dialogs from Swift and Kotlin.
SipralSubscription.dialogs()reads every dialog adialogsubscription (RFC 4235) was told about — its state, direction, and the other end's identity and name — and isnilor null, unknown, while the subscription is not live, never an idle line; a busy lamp can now tell a colleague's phone ringing from a call in progress, and offer to pick it up. -
sipral_call_consultruns the consultation's media. With amedia_addressit was refused as not supported; the leg is now placed assipral_call_placeplaces a call with one, the stack writing the offer and running the audio, and is still the first call's consultation. In Rust,UserAgent::consulting_accountandUserAgent::bind_consultationsplitUserAgent::consultfor a leg placed throughMediaEngine. No declaration changed. -
A ringing call from Swift, Kotlin and Java, Dart, C++ and React Native.
Call.ring()andSipralStack.ringCall(_:),SipralClient.ringCall,SipralStack.ringCall,sipral::Call::ring()and React Native'scall.ring()send 180 Ringing for a call that came in, as Python, .NET and Node.js already could; Kotlin'sTelecomBridgetells the application why a call it could not place ended (placeFailed, and the refusal's text as the framework's disconnect reason). -
A cause's coding standard in a call's ISUP (C ABI 1.11).
sipral_isup_t::cause_codingsays whose listcause_valueis from (Q.850 §2.2.2), so a national or network-specific cause is no longer read as the ITU-T one of the same number. -
Message waiting in React Native.
account.subscribeMailbox({target, expiresSeconds, destination})subscribes to the account's mailbox, or the onetargetnames (RFC 3842), and resolves with aSipralSubscriptionrefreshed until itsend(); each NOTIFY arrives asmessagesWaitingon the account and on the client, withwaiting, the new, old and urgent counts,messageAccountand the subscription, null for a mailbox told unasked to an account added withunsolicitedMwi(bindings/react-native/README.md). -
The networking component carries a media socket's STUN and TURN, over UDP, TCP or TLS (C ABI 1.9). On a stack with
SIPRAL_NAT_STUN,sipral_network_media_opennames the socket to the stack's STUN client, every turn sends what it queues and hands back what the socket hears, a TURN connection is opened whenSIPRAL_EVENT_KIND_TURN_STREAMasks and carries the Allocate, the call's checks and audio and the Refresh that gives the relay back, andsipral_network_media_closereleases a socket with no call before it closes it. A TURN server over TLS has its own trust, name and client certificate (sipral_network_config_t::turn_*), checked as HTTPS checks a host:sipral-net'sNetwork::connect_hostandHostTrust, withStreamSenderwriting from an audio thread. The C++ classes take ICE, STUN, TURN, the name a SIP server is held to and its RFC 5922 rules (StackOptions,NetworkOptions;docs/26-network.md, "STUN and TURN"). -
The networking component trusts the platform's authorities on iOS and Android too. Android's are read from the system's certificate directory, the updatable Conscrypt module's from Android 14; iOS lets no application read its store, so there the Security framework evaluates the chain itself, against its own authorities and any the application adds, with RFC 5922's reading of the name after it.
SIPRAL_NETWORK_TRUST_PLATFORMrefused every connection on both before. -
A SIP server's certificate read as RFC 5922 reads it (C ABI 1.8). Once the platform has verified the chain, a
sip:URI insubjectAltNamethat names the domain is accepted besides the HTTPS rules' names, which no platform reads (RFC 5922 §7.1), in the networking component and in the Swift, Kotlin, .NET, Python and Node.js layers; asked for, RFC 5922 alone, which counts nodNSNamebeside asip:URI and refuses a wildcard (SIPRAL_DOMAIN_RULES_RFC5922;tlsDomainRules,tls_domain_rules,sipral_network_config_t::domain_rules). The reading is one function in the core,sipral_core::domain_certificate, reached throughsipral_certificate_check_domain(docs/22-tls.md, "What the platform checks, and what RFC 5922 adds"). -
A push that names no caller is announced on its account alone (C ABI 1.7).
UserAgent::announce_anyandsipral_account_announce_any, for a push with no payload (RFC 8599 §13) or one whose seal does not open on the device: the INVITE with the push'sCall-IDwhen it carried one, else the oldest INVITE on the account that no announcement naming its caller takes;Announcement::names_callertells them apart andUri::anonymousis RFC 3323's anonymous URI (docs/15-mobile.md, "The matching rule";docs/08-ffi.md, "What ABI 1.7 added"). The Swift and Kotlin push bridges show such a push as an unknown caller and wait for its INVITE rather than ending it at once, then give the screen the INVITE's caller (CallKitProviding.reportCaller,TelecomConnection.setCaller);Account.announce(caller: nil),SipralAccount.announce(null),TelecomBridge.pushArrived(account, null)and Node.js'saccount.announce(null, callId)reach it.TelecomBridgenow gives an INVITE the screen of the announcement the library matched it to. -
A call announced by a push is matched on the push's
Call-IDwhen it carries one (C ABI 1.3).UserAgent::announce_callandsipral_account_announce_calltake theCall-IDa proxy holding the INVITE can put in the push: the INVITE with thatCall-IDis the announced call whoever it says is calling, so two calls from one caller are told apart; with none carrying it, the account and the caller decide as before (docs/15-mobile.md, "The matching rule";docs/08-ffi.md, "What ABI 1.3 added"). A binding printed at 1.2 loads unchanged. -
A push gateway for the lab, so a call wakes a phone that sleeps, end to end.
interop/push-gatewayis the proxy half of RFC 8599 in front of a PBX that has none: it answers+sip.pns, holds an INVITE or a MESSAGE in the bucket while it pushes, forwards it once the woken phone's refresh is accepted, and answers the PBX's qualifyOPTIONSfor a sleeping phone itself, with senders for APNs (ES256 provider token, VoIP push over HTTP/2) and FCM (service account, HTTP v1);scripts/lab.sh pushruns the C ABI asleep and woken through it against Asterisk, and with real keys an iPhone and an Android phone whose samples had been ended were woken by a call through a FreePBX (docs/15-mobile.md, "The lab's push gateway", "Device day"). -
The Android sample has a push build. Given a Firebase project's
google-services.json(-Psipral.googleServices=FILE, never committed), it is built with Firebase Cloud Messaging: the registration token and the project ride on every REGISTER as RFC 8599'spn-pridandpn-param, and the gateway's data messages wake it as the simulated push does. Without the file the build is unchanged and has nothing of Firebase, and no published artefact carries it (docs/15-mobile.md, "The push build";THIRD-PARTY-NOTICES.md). -
The Swift package hands RFC 8599's push parameters to an account (
SipralStack.addAccount(push:),SipralPush.apnsVoip), reads the registrar's answer (Account.pushEcho()), and places outgoing calls through CallKit (CallKitAdapter.startOutgoingCall(callee:dial:),request(_:)). -
The Swift package carries a registration across a process iOS ended:
SipralStack.suspending(),resumed(),coldStart(),interfaceLost(),nameResolutionLost(),Account.freeze(),thaw(_:asleepMs:)andtimeToReadyMs(), andSipralAppLifecycle, which writes the registration into the Keychain on the way into the background, then suspends, and in a process a push started reads it back into an account that comes up restored (docs/15-mobile.md, "C3 in the Swift package"). -
The Swift and Kotlin push bridges announce a pushed call with the push's
call-idwhen it carries one (VoipPush.callId,Account.announce(caller:callId:);TelecomBridge.pushArrived(..., callId),wakeForPush,SipralAccount.announce(caller, callId); ABI 1.3), the caller as the fallback. -
An account's RFC 5626 instance id and its own header fields from Swift, Kotlin and Java, React Native, Python, .NET and Dart, on every REGISTER.
SipralStack.addAccount(instanceId:headers:),SipralClient.addAccount(instanceId =, headers =)andSipralJava.addAccount,client.addAccount({instanceId, headers}),add_account(instance_id=, headers=),AddAccount(instanceId:, headers:)andaddAccount(instanceId:, headers:)hand the C ABI'sinstance_idandheadersover, so+sip.instanceand the fields ride on the first REGISTER, the answer to a challenge, each refresh and the de-registration; a push proxy (RFC 8599) refuses a REGISTER without the instance. The fields are checked as a call's are, and an account without a registrar refuses them. Node.js took both already; each layer now has the test that shows them on the wire. -
The Swift push adapter reads a payload through the application's decoder, and takes iOS 26.4's delivery with
PKVoIPPushMetadata.PushKitAdapter(decoder:)turns each payload intoVoipPushFields(caller,Call-ID, name), by default the clearcaller,call-idandname, so a push whose payload is sealed is opened before it is announced;pushRegistry(_:didReceiveIncomingVoIPPushWith:metadata:withCompletionHandler:)is implemented under@available(iOS 26.4, *), and a push whosemustReportis false is not shown: the binding is refreshed andnotShownis told.PushKitBridge.receive(_:mustReport:account:)is the same for an application with its ownPKPushRegistryDelegate, a use the README now describes. -
The caller's name on the iOS call screen.
CallKitAdaptersetsCXCallUpdate.localizedCallerNamefrom the push's name (VoipPush.displayName) or, for a pushed screen that carried none, from the INVITE once matched (CallKitProviding.reportCallerName);CallEventData.callerName(a trusted asserted identity's display name, else theFrom's) is the name to giveCallKitBridge.reportIncomingCall(callerId:displayName:)for a call that came without a push. -
CallKitBridge.endShown(uuid:reason:)is public. It takes a shown call off the screen, as unanswered by default, telling the system once: a kept Answer fails and the INVITE, if it comes, is declined with 603. -
An iPhone sample,
bindings/swift/samples/SipralPhone: account, dial pad, CallKit for every call, PushKit with RFC 8599's parameters on the REGISTER, the system's route picker, the registration carried across an ended process, and a Diagnostics screen whose "Share log" hands over one timed file with the stack's redacted trace and decision record.scripts/package/ios-app.shbuilds it for the simulator and a phone and exports an IPA for TestFlight;docs/15-mobile.mdsays what ran on the simulator and against a live PBX, and lists the steps for a real iPhone. -
A phone's lifecycle in the Kotlin layer, as in .NET MAUI.
SipralClient.suspending,resumed,interfaceLost,nameResolutionLostandcoldStart;SipralAccount.freeze,thaw,timeToReadyMsandpushEcho;SipralLifecycle, which writes every accepted registration down and suspends and resumes the client;wakeForPush, the cold start after a push in the order the platform needs it (the call rings first, the last process's registration is carried on); and on AndroidSipralKeystoreStoreandSipralAppLifecycle(docs/15-mobile.md, "Lifecycle on Android"). -
The Android telecom helper holds a call's foreground service and follows the network.
SipralCallService(typesphoneCallandmicrophone) from a call's first ring until the last call ends, throughSipralCallForeground;SipralNetworkMonitormoves the registration and every call when Android's default network changes, measured on an emulator at about a second without audio for Wi-Fi to mobile data.IdiomaticSipCallswith nomediaHostbinds each call's media on the network up when it starts. -
The Android telecom helper carries calls through Jetpack Core-Telecom as well as through its self-managed
ConnectionService.CoreTelecomPlatformputs each call theTelecomBridgereports or places in front of the framework withCallsManager.addCall, andSipralCoreCallcarries the bridge's states onto the call'sCallControlScopeand the framework's answer, disconnect, hold and resume back, with routes and mute inSipralTelecom.callRoutesunder either adapter;SipralTelecomAdapter.preferredpicks Core-Telecom from Android 14, wherePhoneAccount.CAPABILITY_SELF_MANAGEDis on its way out, and the sample offers both (docs/15-mobile.md, "Two telecom adapters"). The helper now depends onandroidx.core:core-telecom1.0.1. -
The Android sample is ready for a store and for a real phone. A Readiness screen (microphone, notifications, calls over the lock screen, battery optimisation, background restriction, standby bucket), the passwords sealed by the Keystore, no backups, a Diagnostics screen whose Share log hands over the sample's and the stack's logs, the decision records, the state and the application's logcat with no password in them, and a release APK and Play bundle, with or without Opus, signed by
scripts/package/android-sign.shon the machine that holds the key (scripts/package/android.sh --release).docs/15-mobile.mdsays what ran on an emulator against a live PBX and lists what to run on a real phone.
Fixed
- iOS: an idle registered stack no longer keeps a processor core busy. A signalling socket iOS took back while the application was suspended still polled readable and failed every read, so the Swift layer's poll loop spun on it, measured at a whole core for half an hour on a real iPhone; a socket that fails a read for any reason but an empty queue, or that
pollcalls invalid, is now replaced at its address and port, at most once a second, and the accounts register again if the port moved. Measured again: 0.2% of a core. - iOS: a ringtone picked in the application's settings rings the next call, not the next launch.
CallKitAdapterkept itsCXProviderto itself, so the configuration it was made with held until the application started again;updateRingtone(_:)andupdate(configuration:)change it in place,configurationreads a copy (bindings/swift/README.md). - Android: a call declined through
TelecomBridgecan be declined as busy.reject(id)always sent 603 Decline;reject(id, code)sends the final status given, 486 Busy Here for do-not-disturb or a call past the ones the phone takes, so a PBX routes it as busy, whether the INVITE was already there or arrives after the decline (bindings/kotlin/README.md). - A restored registration asks for the interval the account is added with now. A binding continued from a snapshot (
thaw_registration,sipral_account_thaw, the lifecycle helpers' restore) refreshed with theExpireswritten in the snapshot, so an application that changed an account's interval kept sending the old one until it unregistered; the refresh now carries the account's own (docs/15-mobile.md, "The snapshot"). The snapshot's layout is unchanged. - A subscription a notifier accepted and never notified no longer piles up at the notifier, nor is retried every half minute. When Timer N fired after a 200 with no NOTIFY, the attempt was dropped here while the notifier kept it for the hour it granted, and the retry, under a new
Call-ID, added another each time; the 200 also reset the back-off, so the retries never spread out. The attempt is now closed at the notifier with anExpires: 0in the dialog the 200 made there, as is one the application gives up before any NOTIFY came (Swift's and Kotlin'send()included), and only a NOTIFY resets the back-off. A NOTIFY that brought noRecord-Routewhen the 200 did, against RFC 6665 §4.3, routes the dialog as the 200 was routed (Endpoint::route_dialog_as_answered), so a refresh or anExpires: 0no longer goes straight to a notifier address only a proxy reaches (docs/04-ua.md, "Subscriptions"). - iOS: a real VoIP push no longer ends the application.
PushKitAdapterreported the call to CallKit from a task it started, after its delegate method had returned; iOS checks for the report as that method returns, so on a phone the first push ended the application (_terminateAppIfThereAreUnhandledVoIPPushes) and iOS stopped waking it until it was reinstalled. The adapter now reports before returning, through the newPushKitBridge.receive(_:mustReport:account:outcome:),handle(push:account:outcome:),reportUnusable(callerId:done:)andCallKitBridge.reportIncomingCall(callerId:displayName:reported:), which an application with its ownPKPushRegistryDelegatecalls in place of theasyncforms (bindings/swift/README.md;docs/15-mobile.md). - iOS and Android: the caller hears the call ring. A call the system's screen showed sent only 100 Trying until it was answered, against RFC 3261 §13.3.1.1, and a caller not behind a PBX that rings on its own heard nothing;
CallKitBridge,LiveCommunicationBridgeand Kotlin'sTelecomBridgenow send 180 once the screen is up and the INVITE bound, never for a call answered before its INVITE arrived. Found on a real phone. - iOS: a call taken back after a cellular call has its audio again. After Hold & Accept and the cellular call's end, the system posted an interruption's start and never its end, so
CallAudiostayed paused while the call ran with its packets flowing; CallKit activating the session now ends the interruption too. Found on a real phone. - A far end that moves to a new timestamp base no longer reports hours of jitter. A PBX passing from early media to the answered channel under one SSRC put the jump into RFC 3550's estimate as one transit difference, read as 2.6 hours and decaying by 15/16 a packet; a difference of more than two seconds of the stream's clock is now a new timeline, a new source starts its own estimate, and the jitter buffer rebases its delay on it. RFC 4733 events no longer count as late for the buffer's jitter, and events under a payload type this end did not plan are counted as received rather than as loss (
docs/05-media.md, "Jitter buffer"). - The SIP trace stays text. A STUN request, a keep-alive or any other datagram that is not SIP was written as raw octets, NUL and control characters included, and a binary body (an ISUP part) as well; such a datagram is now one line naming it (
a STUN Binding Request, transaction …,a keep-alive ping), a binary body is escaped in the diagnostic trace and withheld in the pseudonymised one, and WebSocket frames are traced as the SIP messages they carry (docs/17-observability.md). - The iPhone and Android samples. The iPhone sample no longer hangs up a call when PushKit's token arrives just after launch, says why a call ended, and can keep the screen on (Diagnostics); the Android sample dials a bare number or name at the account's domain as the iPhone sample does, accepts a registrar's name as well as its address, and logs why a call could not be placed.
- Swift: a pushed call's screen is taken only by the INVITE the stack matched to it, and none is left ringing.
PushKitBridgepaired a push with any INVITE whose caller had the same user part, so a call from100at one PBX could take the screen of a push for100at another; it now matches by the stack's announcement or the matched call handle alone. A push whose INVITE had already been handed to the application, or arrived while the push was being announced, left a second screen ringing that nothing filled or took down; the push is now recorded as it is announced, and a push for a call already handed over ends its own screen (docs/15-mobile.md). - Kotlin:
TelecomBridgefollows the announcement each event names. A push that arrived while its call was already ringing kept an announcement nothing waited for, and a missed call or an INVITE naming an announcement could end or take another push's screen; each now acts on the screen of the announcement it names (bindings/kotlin/README.md). Android'sSipralTelecomno longer drops a live call's audio routes when two calls' routes change at once. - .NET: a private authority's certificate issued for clients only is refused as a server's. The chain rebuilt under
SipralTlsTrust.PrivateAuthorityset no extended key usage, so a certificate the authority issued for TLS clients alone was accepted from a SIP server; the rebuilt chain now requiresserverAuth, as the platform's own check does. - A server found by SRV whose first host refuses the connection is reached at the second (RFC 3263 §4.3). An account on a TLS or TCP connection of its own waited out its ten seconds after the application reported that the connection to the first SRV target could not be opened, then failed as unreachable and backed off for up to a minute and a half, to try the same host again; the second target was never asked for. Now the failure, or the wait running out, sends the REGISTER at once to the next address the lookup gave and asks for a connection there, as a REGISTER that timed out already went (
UserAgent::flow_unavailable;docs/04-ua.md). - A request held back for a stream waits its own ten seconds. Requests too large for a datagram (RFC 3261 §18.1.1) shared one
STREAM_WAIT, armed by the first: a call challenged past the line nine seconds after another was ended a second later, when its own connection could still have come. And a connection that could not be opened, which names no server, ended every request waiting for any stream, so an account failing to reach its own TLS server ended another account's call to its PBX; the C ABI now takes such a failure as the answer only when it can be nothing else, one server asked a stream of and no account waiting for its own connection. - Dart: an account's own TCP or TLS connection the stack lets go of is opened again. When its server stopped answering keep-alive pings the stack retired the connection and asked for another, but the layer still held the old socket and refused the ask as a duplicate, so the account stayed unregistered while the server stayed silent.
- .NET: the local conference's 20 ms frames, and a DNS answer's wait, run on a monotonic clock. Both were timed on the wall clock, so setting the system's time stalled the mix or sent a burst of frames, and stretched the wait for a name server.
- The local conference no longer allocates on each frame to follow who is talking; the list is compared where it stands and rewritten only when it changed.
- The networking component dropped what a TCP or TLS connection carried when another thread was inside the stack at that moment, leaving a hole in the stream; it now hands it in again for up to half a second, as the bindings do.
- An account's own TLS connection in the .NET, Python, Dart and Node.js layers was checked against the address its server was located at, not the SIP domain it was configured with, so a server found by SRV failed every certificate a public authority signed unless
tlsServerNamewas given; it is held to the domain of the account'sserverUrinow (RFC 5922 §7.3), as in Swift and Kotlin. - Device mode on a Mac no longer lowers every other application's sound while no call is up, and lowers it the least during one. The stack built its voice-processing unit as it opened and kept it between calls, and the system ducks other applications' audio for as long as such a unit exists: to about -15 dB on a Mac's own speakers, by 60 dB on a virtual device, for as long as the application ran. The unit is now built while an incoming call rings or as a call is placed, and disposed of once no call needs the devices and when the stack is destroyed, on iOS too; in a call it asks for the system's minimum ducking, about -4 dB on the same speakers, from macOS 14 and iOS 17 (
docs/05-media.md, "The built-in engine: device mode"). - Kotlin: a TLS connection of an account named by
serverUrichecks the certificate against the URI's domain. It was checked against the address the SRV record led to, which a certificate rarely names, so the connection was refused as a name mismatch; the domain is now the default (RFC 5922 §7.3),tlsServerNamestill wins, and the account's pin and certificate apply on every address its server was located at (docs/22-tls.md). - Android: a ringing call keeps its process running.
SipralCallForegroundheld the call's foreground service only once a call was placed or answered, so a process a push started was frozen about ten seconds later while the call rang, and the announcement's timeout, the caller's CANCEL and the user's decline were never acted on: the call rang until dismissed. The service now starts with the push's announcement, asphoneCallalone (the type a background process may start;microphoneis added with the answer), and a call that ends while the service is still starting no longer stops it before it entered the foreground (docs/15-mobile.md, "Lifecycle on Android"). aar.sh assembleaccepts good libraries on macOS. BSDodends its output with an empty line, which the ELF check read as a second value for the machine, so every native was refused unless GNU coreutils came first inPATH;aar.sh,android.sh,jvm.shandqemu-verify.shnow sum the two bytes whatever lines they arrive on, andaar.shalso checks that the library is little-endian.ctutils0.4.5, past RUSTSEC-2026-0385, in the workspace and fuzz lock files.crypto-bigint0.7.9, past RUSTSEC-2026-0387 and the yanked 0.7.5, in the workspace and fuzz lock files.- Dart: closing a stack with TLS connections open no longer throws now and then.
SipralStack.closewalked the map of open connections while destroying them, and a connection's own done or error handler, whichdestroy()can run at once, took it out of that map mid-walk; it now walks a copy. android.shno longer fails its licence check on a month-old cache. Gradle's cache cleanup dropped the POMs it had not read for 30 days and kept the jars, so every artefact read as "no POM in the cache"; the build's Gradle cache is now never pruned.- Every VoIP push reaches CallKit, and no pushed screen is left ringing.
PushKitAdapterreturned without reporting a call for a push whose payload named no caller, which iOS answers by ending the application and, repeated, by no longer delivering its pushes; such a push, and one that arrives with no account, is now shown and ended at once. A screen whose announcement the stack refused, or whose INVITE never came within the announcement's twenty seconds, is ended instead of ringing until the user dismisses it, andPushKitBridge.matchIncomingCallreturns the pushed call an INVITE belongs to, by the stack's own match, so the application can bind it. - Answer tapped on a pushed call before its INVITE arrives answers it. CallKit offers Answer the moment a push raises the call screen, usually a second or more before the INVITE; the answer used to fail there because no call was bound yet, and the call ended.
CallKitBridgenow keeps the answer and carries it out when the INVITE is matched, fulfillingCXAnswerCallActiononly then and failing it if the announcement is refused or goes missing; an End tapped first declines the INVITE with 603 (docs/15-mobile.md, "The user answers before the INVITE"). - Swift: an account on TLS of its own, located by SRV, checks the certificate against its SIP domain. The connection checked the server's certificate against the address SRV and the lookup led to, so a certificate naming the domain failed as a name mismatch; it is checked against
tlsServerName, else the host of the account'sserverUri(RFC 5922 §7.3), else the address, as the C networking component does. The account's pin and name are found once the location is known, before the connection opens. - An account on a connection of its own registers the moment the connection is up, and asks for it once. A rebind to the same server while the connection was being opened, what the Swift layer does to move the
Contactonce the server is located, dropped the question: the REGISTER waited out the full ten seconds after the connection came, and a REGISTER asked for meanwhile, a push's refresh among them, asked for a second connection.UserAgent::rebindnow keeps a question still open for the same server. - .NET and .NET MAUI: an iOS application no longer ends on its first move to the background, and an account named by
serverUriregisters with a server off the machine.SipralStack.SuspendingandResumedthrewBusywhen the poll thread held the stack, which ended the process from iOS's background callback; an account located through RFC 3263 kept the stack's placeholder address in itsContactand every REGISTER was refused asUnreachableContact.SipralAppLifecycleraisesFrozenandResumedbesideSuspended; a stack asked for device mode where the build has no audio backend answersSIPRAL_STATUS_NOT_SUPPORTEDbefore checking its transmit callback. Run from the packedSipral.Mauion the iOS simulator and an Android emulator, registered and calling through a live FreePBX (docs/15-mobile.md, ".NET MAUI", "Consuming the packages", "32-bit ARM, under emulation"). - A Kotlin client that names no address registers at a server named by a URI elsewhere. The REGISTER the location released left with the loopback address the account had before its server was known and was refused as an unreachable
Contact; once the account is pointed at its route, the registration (or the withdrawal) is sent again from there, as in .NET. sipral-telecom.aarcompiles into an application on the Android Gradle Plugin's built-in Kotlin 2.2. Its classes carried Kotlin 2.4 metadata; they are compiled as 2.2, likesipral.aar's, andandroid.shchecks it.- A call with a browser carries audio both ways. The DTLS server read only a ClientHello that came whole, and Chromium's, which offers DTLS 1.3 with a post-quantum key share, is 1413 octets in two fragments: it is now put together before the cookie exchange answers it. And a description that holds no ICE candidate yet,
0.0.0.0and port 9 as a browser writes whenever it trickles, was read as the old hold, so this end sent nothing; on a stream ICE carries it no longer is (SessionDescription::holds_by_address).scripts/lab.sh browserputs a headless Chromium with JsSIP through Asterisk's secure WebSocket and through Kamailio's, trickled both ways there (docs/05-media.md, "A browser at the other end"). - A call whose end runs no ICE reads
0.0.0.0with port 9 as a hold, in its hold state as in its media plan. The user agent read it as a trickling placeholder whenever the far end's stream carried ICE, so a call answered without ICE, or a user agent that refuses trickled candidates, reported a held call as not held while no media flowed; the hold is now judged again once this end's answer is written (docs/04-ua.md).
Changed
- The interoperability matrix is read off a lab run of 28 October 2026 (
docs/11-testing.md), with rows it had no place for: a phone woken by a push (RFC 8599) through the lab's gateway, SIP-I calls with the ISUP beside the SDP, trickle ICE, the message hook on the wire, a phone that moved behind a NAT, a PBX WebRTC line and a browser at the other end, and Asterisk's direct media, which the identity step now checks by where the audio comes from instead of taking it as given. The narrowed inbound offer, until now run only when an account was named for it, runs on every lab run: Asterisk ringslabuser-widewith seven codecs and the answer keeps G.711 alone. - The release build is made for size where speed does not matter.
libsipral_ffi.dylibis 5.25 MB instead of 5.47 MB on macOS: the C ABI's own layer, NAT traversal, the DTLS handshake, STIR, the diagnostics and the device code are built withopt-level = "s", and everything a frame, a packet or a SIP message goes through keeps full speed, since built all for size SIP ran up to 76 % slower per transaction (docs/19-numbers.md, 27 October 2026). - The iPhone sample is shown as "Sipral sample" and identified as
org.sipral.sample, as the Android sample is (SIPRAL_PHONE_BUNDLE_IDstill replaces it). - The gate's
windowsarea also builds the WPF sample (net10.0-windows) on its Windows machine, with-warnaserroragainst the .NET layer as the tree has it. - The roadmap: 1.3 brings, beside real phones and a PBX WebRTC line, a registered phone's battery and background use measured on both platforms, and everything built ahead of the releases it was planned for: trickle ICE, a browser at the other end, SIP-T and SIP-I, a client certificate on SIP over TLS whose key the platform holds, networking ready to use from Rust and C, a C++ API and a hook that rewrites SIP messages in and out (
docs/10-roadmap.md, "Releases"). 1.4, in December, measures a phone in every situation (a cellular call over ours, wired and Bluetooth headsets, the car, Wi-Fi to mobile data, battery) and takes the sample apps through the stores' test tracks; there is no 1.5 any more. - The README and the documentation say what is not there yet, video and a WebRTC peer, instead of listing what Sipral leaves out;
docs/09-rfc-index.md's "Deliberately not implemented" table is gone, anddocs/07-headless.mdsays where the agent's work happens. The README anddocs/01-architecture.mdsay that the bindings open TLS and run NAPTR and SRV lookups with the platform's APIs, and that only the optional Rust reference loop lacks them.
Packages: PyPI sipral and sipral-opus, NuGet Sipral, Sipral.Opus and Sipral.Maui, Maven Central org.sipral (sipral, sipral-opus, sipral-telecom, sipral-jvm, sipral-jvm-opus), npm sipral and sipral-react-native, pub.dev sipral, crates.io sipral, and the Swift package from this repository with both XCFrameworks attached below.