Commit Graph
219 Commits
Author SHA1 Message Date
Dave Horton 54323cdf8a 0.9.12 v0.9.12 2026-09-24 09:51:21 -04:00
Dave HortonandClaude Opus 5.5 c58a1fc925 fix: set alert_type on OPTIONS-ping and registration alerts (#154)
* fix: set alert_type on OPTIONS-ping and registration alerts

The three writeAlerts() calls in sip-trunk-options-ping.js and the two in
regbot.js omitted alert_type, so the alerts were stored as 'undefined'.
Use AlertType.SIP_GATEWAY_OPTIONS_FAILURE / SIP_GATEWAY_REGISTRATION_FAILURE.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: bump @jambonz/time-series to ^0.5.4

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 09:50:21 -04:00
Dave HortonandClaude Fable 5.1 b51362ac04 fix: shared-roster expiry and sbc_addresses keepalive (two-SBC cutover bugs) (#153)
* fix: expire FS/RTP roster members on shared last-seen, not one SBC's local view

The active-fs, fs-service-url and active-rtp redis sets are shared by every
SBC in the cluster, but the expiry sweep in lib/options.js removed members
based solely on when THIS sidecar last received an OPTIONS ping from them.
An SBC that was taken out of active-sip (so FS/RTP servers stopped pinging
it) therefore deleted every feature server and rtpengine from the shared
rosters 60s later, rejecting all inbound calls until the other SBC re-added
them on its next ping cycle.

Each SBC now records the last ping it received per member in a shared redis
hash (<setName>:lastseen, member -> epoch ms) and the sweep removes a member
only when that shared timestamp is older than EXPIRES_INTERVAL. Members with
no shared timestamp are never expired by the sweep, so a parked or
mixed-version SBC cannot remove members the others are still hearing from.

Adds a unit test that reproduces the failure against the old code.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* fix: make sbc_addresses keepalive recurring instead of a single setTimeout

addSbcAddress() refreshes the row's last_updated and cleanSbcAddresses()
deletes rows older than DEAD_SBC_IN_SECOND (default 3600s), but app.js only
re-called addSbcAddress once, 15 minutes after connecting. The row then
went stale, and the next sidecar to start anywhere in the cluster deleted
the healthy SBC's row, so new sip realms were provisioned with one SBC IP
instead of two.

Run one recurring timer (SBC_PUBLIC_ADDRESS_KEEP_ALIVE_IN_MILISECOND, default
15 min) that refreshes this SBC's rows and only then reaps stale ones, so the
cleaner never runs ahead of this process's own keepalive. The timer is
unref'd and replaced (not stacked) on drachtio reconnect.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
v0.9.11
2026-09-21 10:58:05 -04:00
Dave Horton a4b9487623 0.9.11 2026-09-15 12:37:38 -04:00
Dave HortonandClaude Fable 5.1 9f00a513f8 feat: include jambonz and drachtio versions in X-Jambonz-Discover response (#152)
- jambonzVersion is read from the schema_version table via the existing
  db-helpers pool (now exposed on srf.locals); a DB error yields null
  rather than failing discovery
- drachtioVersion is captured from the drachtio connect handshake and
  stored on srf.locals
- README example updated

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-15 12:23:59 -04:00
Sam Machin ce05d91e6d restart regbots on drachtio reconnect (#151)
* restart regbots on drachtio reconnect

* PR feedback

* add check for multiple regbot instances
2026-09-09 15:02:23 +01:00
Dave Horton fe3f11a063 0.9.10 v0.9.10 2026-08-31 09:57:13 -04:00
Dave HortonandClaude Fable 5 3cee75163d chore: bump db-helpers to ^0.9.25 and resolve npm audit findings (#150)
* chore: bump @jambonz/db-helpers to ^0.9.25

0.9.24 moved to uuid ^11.1.1 (GHSA-w5hq-g745-h8pq) and 0.9.25 dropped
the uuid dependency entirely in favor of crypto.randomUUID.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: resolve npm audit findings

- npm audit fix: ajv, brace-expansion, flatted, js-yaml, minimatch, qs
- short-uuid ^4.2.2 -> ^6.0.3 (drops vulnerable uuid <11.1.1,
  GHSA-w5hq-g745-h8pq; generate() API unchanged)
- nyc (dev-only) -> ^18.0.0 (clears istanbul-lib-processinfo uuid
  advisory)

npm audit now reports 0 vulnerabilities.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-31 09:56:00 -04:00
Sam Machin ba5ce5269d get correct expiry for multi-contact registraitons (#149) 2026-08-20 17:33:23 -04:00
Dave Horton f7aaf58ebd 0.9.9 v0.9.9 2026-08-20 09:15:30 -04:00
Ed RobbinsandClaude Opus 4.6 2f2f522133 fix: prevent concurrent regbot rebuilds, raise min expires (#147)
* 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>
2026-08-19 08:28:08 -04:00
Dave Horton 55c8495970 0.9.8 v0.9.8 2026-07-20 08:44:16 -04:00
Sam Machin 3122de4316 Feat/auth trunk register (#141)
* allow REGISTER for auth trunks

* use db-helpers

* bump db-helpers
2026-07-14 09:17:31 -04:00
Dave Horton bf6362ec73 0.9.7 v0.9.7 2026-07-11 12:39:16 -04:00
Dave HortonandClaude Opus 4.8 8f47038f59 fix(docker): drop hardcoded --platform=linux/amd64 for arm64 builds
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>
2026-07-11 10:24:32 -04:00
Dave HortonandClaude Opus 4.8 13c82830d3 ci(docker): build multi-arch (amd64+arm64) image via Build Cloud (#144)
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>
2026-07-11 10:19:22 -04:00
Sam Machin a8455ad9f1 Bump drachtio-srf to 5.0.27 (#143)
Brings in fix for case-insensitve Digest header
2026-07-10 10:43:48 -04:00
Sam Machin 1841110ef7 add server discovery to options (#142) 2026-07-09 10:30:50 -04:00
Sam Machin c61eb8523d only accept fs/rtp options from internal CIDR (#140) 2026-07-07 08:20:09 -04:00
Dave HortonandClaude Opus 4.8 14beeedf71 chore: bump drachtio-srf to ^5.0.25 (#138)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 12:28:05 -04:00
Hoan Luu Huu 805b1f855c update realtimedb helper (#137) 2026-06-15 20:55:07 -04:00
Dave Horton 03cdfc390f bump dbhelpers 2026-06-04 14:06:15 -04:00
Hoan Luu Huu ba3c520a4a update diest util 0.0.9 (#136)
* update diest util 0.0.9

* update realtimedb-helper
2026-06-04 09:06:30 -04:00
Hoan Luu Huu 86c85b6406 update drachtio srf 5.0.21 (#133) v0.9.7-rc1 0.9.7-rc1 2026-04-13 21:24:56 -04:00
Dave Horton 61ff475060 update deps 0.9.6 v0.9.6 2026-03-30 21:06:17 -04:00
Ed Robbins ce4ac89179 fix timing issue of ephemeral gateways update/deletion (#132)
* fix timing issue of ephemeral gateways update/deletion

* Fix for potential regbot Zombie, and other concerns

* address performance concerns in regbot behavior
2026-03-26 10:03:12 -04:00
Sam Machin 03dc4964b6 Fix/111 - require multiple reg failures (#131)
* only disable registraion after X consecutive failures

* move counter outside of regbot object

prevents it being constantly re-created
v0.9.6-rc6
2026-03-19 15:15:38 -04:00
Sam Machin f909c6e077 Regbot persistent call-id and other fixes (#130)
* 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
v0.9.6-rc4 v0.9.6-rc5
2026-02-19 08:14:04 -05:00
rhondahollisandrhonda hollis a21269cb19 remove send_options_bots array (#129)
fixes ticket #1983

Co-authored-by: rhonda hollis <rhonda@jambonz.org>
v0.9.6-rc3
2026-02-12 12:15:47 -05:00
Dave Horton 6f9c629379 add configurable backup for outbound reg failure (#128) v0.9.6-rc2 2026-02-09 10:32:57 -05:00
Dave Horton 9cacbdb994 update db-helpers (#127) v0.9.6-rc1 v0.9.5-10 v0.9.5-11 2026-01-19 08:23:13 -05:00
Dave Horton e6a691d366 fix support for using writer/reader nodes properly (#126) 2026-01-15 08:48:06 -05:00
Ed Robbins 40cd14bff0 If no SRV record found when no port specifiec, look for A record. (#125)
* If no SRV record found when no port specifiec, look for A record.

* update log statement to info level
v0.9.5-9 v0.9.5-8
2025-12-11 23:55:39 -05:00
Sam Machin 93095fcdab add ephemeral gateways for ip regtrunk (#124)
* add ephemeral gateways for ip regtrunk

* linting
2025-12-10 10:43:44 -05:00
Dave Horton c4278be34d when running under K8S set JAMBONES_NETWORK_CIDR as private ip address space v0.9.5-3 v0.9.5-4 v0.9.5-5 v0.9.5-6 v0.9.5-7 2025-11-24 11:25:43 -06:00
Hoan Luu Huu 9c6134d5dc fixed Array.prototype.push.apply will throw Maximum call stack size exceeded (#119)
* fixed Array.prototype.push.apply will throw Maximum call stack size exceeded

* fixed review comment
2025-11-11 07:44:18 -05:00
Sam Machin 56df3a6b34 Fix/regtrunks (#118)
* restore only use port if proxy is IPv4 address

broke in this commit https://github.com/jambonz/sbc-sip-sidecar/commit/543f52d3dd6fb2070fb06b94d5c3ca70e649fb1f

* use sip gateway host for DNS lookup of ephemeral gw and only if not  an IP address
v0.9.5-2
2025-11-06 18:19:24 -05:00
Anton Voylenko 1f7980d772 chore: bump node version (#117) 2025-11-04 18:02:19 -05:00
Hoan Luu Huu 55ace7820f Feat/cli remove fs (#116)
* 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
v0.9.5 v0.9.5-1
2025-10-28 19:26:24 -04:00
Hoan Luu Huu 658cb6ae7d remove empheral gateways if regbot is stopped (#115)
* remove empheral gateways if regbot is stopped

* wip

* wip

* update realtime db version
2025-10-28 08:02:43 -04:00
Dave Horton e94ae431d8 add support for registration trunks which result in a set of ephemera… (#112)
* 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
v0.9.5-rc19
2025-10-21 07:32:06 -04:00
Sam Machin d08496840e bump dbhelpers for cache change (#114) v0.9.5-rc18 2025-10-15 11:39:10 -04:00
Sam Machin 52e1fc78b9 Store the private IP in redis when a client registers (#113)
* add srf.locals.privateSipAddress

* add private SBC address in client redis data

* lint
v0.9.5-rc17 v0.9.5-rc16 v0.9.5-rc15
2025-10-04 20:08:42 -04:00
Sam Machin 3f8fb53390 add expires and timestamp to database status (#110)
* add expires and timestamp to database status

* remove await
v0.9.5-rc14 v0.9.5-rc12 v0.9.5-rc11
2025-09-01 14:02:51 -04:00
Dave Horton 4cb58b304e bump version v0.9.5-rc8 v0.9.5-rc10 v0.9.5-rc3 v0.9.5-rc4 v0.9.5-rc5 v0.9.5-rc6 v0.9.5-rc7 v0.9.5-rc9 2025-07-15 11:47:18 -04:00
sathish kumar pasham 2adc18d034 Fix security vulnerabilities by upgrading to @babel/helpers version 7.26.10. (#109) v0.9.5-rc1 v0.9.5-rc2 v0.9.4-5 2025-06-27 10:15:51 -04:00
Hoan Luu Huu 3cfa0a94aa support trunk register with account sip realm if available (#107)
* support trunk register with account sip realm if available

* wip

* wip

* wip

* wip
v0.9.4-4
2025-06-23 08:34:39 -04:00
Sam Machin 1ef25e2c7f add user-agent to regbot (#106)
* add user-agent to regbot

* lint

* remove regbot from string
v0.9.4-3
2025-06-11 17:08:58 +02:00
Hoan Luu Huu ae5b05e9e9 allow registration if checkAccountLimits cannot reach DB (#104) v0.9.4-2 v0.9.4-rc4 v0.9.4-rc3 v0.9.4-rc2 v0.9.4-rc5 v0.9.4-1 v0.9.4 2025-05-22 08:14:39 -04:00
Dave Horton 0bb72ed09f update version v0.9.4-rc1 2025-05-14 15:42:59 -04:00