* fix: add mutex to prevent concurrent regbot rebuilds (#2719)
updateCarrierRegbots was called via .then() (not awaited) from checkStatus,
allowing concurrent invocations to race on the shared regbots array. The
last writer wins, and concurrent cleanup can stop() regbots still in use,
permanently breaking their timer chain.
Add a boolean mutex (rebuildInProgress) with try/finally to skip concurrent
invocations. Promote rebuild completion log from debug to info for production
visibility. Add standalone test demonstrating both the bug and the fix.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* raise default minimum registration expires from 30s to 90s
Prevents overly aggressive re-registration cycles when the registrar
returns a short Expires value, reducing regbot churn.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
The base image was pinned to linux/amd64, so the arm64 build leg pulled the
amd64 image and failed with 'exec format error'. Remove the pin so each
platform builds on its native base (jambonz v11 arm64 support).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a cloud-driver buildx step and platforms: linux/amd64,linux/arm64 so the
published image supports arm64 (jambonz v11 arm64 support). Mirrors the house
pattern (upload-recordings / drachtio-server).
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix timing issue of ephemeral gateways update/deletion
* Fix for potential regbot Zombie, and other concerns
* address performance concerns in regbot behavior
* use gw sid as call id and fix bug on updateing regbots
we must not mutate gw directly, as it is cached in the gateways array
and adding properties would cause the JSON.stringify comparison to detect a
false change on every checkStatus cycle, triggering unnecessary re-registrations.
* fix tests
add influx and also the registered now changes to remove previous reg on update
* better test scenario
still checks that we have 1 registered as expires now at 600s so it doesn't expire before the 65sec delay
* support draining feature server manually
* support draining feature server manually
* support CLI to add or remove feature server
* wip
* wip
* wip
* add redis key for feature server and integration test
* wip
* add support for registration trunks which result in a set of ephemeral sip gateways to be stored in redis
* wip
* refactor createEphemeralGateways into realtime dbhelpers
* minor
* update eslint
* use outbound proxy for registrations where set
* remove requirement that port can only be set on IP address not host
* switch logging back to debug and remove unused function
* Update regbot.js
* create regbog in batch with delay, filter inique gateway before creating regbot
* update review comment
* do not register outbound if no sip password was provided
---------
Co-authored-by: Dave Horton <daveh@beachdognet.com>