Skip to content

Sipral 1.2.3

Choose a tag to compare

@samybalasa samybalasa released this 21 Oct 12:58
· 165 commits to main since this release
bae1025

A move behind a NAT keeps the account registered at an Asterisk that rewrites the Contact: the old address is withdrawn on its own before the new one is added, and a 200 that lists no binding is asked again.
At C ABI 1.2, unchanged: an application built on 1.0, 1.1 or 1.2.x works unchanged.

Fixed

  • A move behind a NAT no longer leaves the account unregistered at Asterisk with rewrite_contact. When a STUN answer moved an account onto a new public address, the REGISTER that added it also removed the old address with expires=0. Asterisk's rewrite_contact, on by default for FreePBX extensions behind a NAT, rewrites a REGISTER's Contact to the request's source address, so a removal sent from the new socket can name the new binding. On an Asterisk 18.9 PBX a phone that moved from a cable to Wi-Fi lost its new binding to the REGISTER sent right after the move, was answered 200 with no Contact, and read as registered while calls to it went nowhere until the next refresh, up to an hour later. The old address is now removed in a REGISTER of its own, first, and the new one added once that is answered, so whatever a rewritten removal takes is added back (docs/06-nat.md, "When the mapping changes"); an old address the registrar's last 2xx showed it holds under another one is not removed at all, since that removal would be rewritten too. A 2xx that lists no Contact at all is asked once more before the account reads as registered; a registrar that never lists any is believed the second time. The lab runs the move against an account set up the way FreePBX sets one up (scripts/lab.sh natmove). At C ABI 1.2, unchanged.

Packages: crates.io sipral, and the Swift package from this repository with the XCFramework attached below. The other registries (PyPI, NuGet, Maven Central, npm, pub.dev) stay at 1.2.1 for now; an application that builds Sipral from source takes the fix from this tag.