Commit Graph
19 Commits
Author SHA1 Message Date
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
Sam Machin ba5ce5269d get correct expiry for multi-contact registraitons (#149) 2026-08-20 17:33:23 -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
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
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
2026-02-19 08:14:04 -05:00
Dave Horton 6f9c629379 add configurable backup for outbound reg failure (#128) 2026-02-09 10:32:57 -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
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
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
2025-11-06 18:19:24 -05: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
2025-10-21 07:32:06 -04:00
Sam Machin 3f8fb53390 add expires and timestamp to database status (#110)
* add expires and timestamp to database status

* remove await
2025-09-01 14:02: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
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
2025-06-11 17:08:58 +02:00
Sam Machin 543f52d3dd use outbound proxy for registrations where set (#103)
* 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
2025-05-12 07:58:55 -04:00
Sam Machin 446bb06142 move lookupSystemInformation up to parent function and add a timer (#93)
* move lookupSystemInformation up to parent function and add a timer

* lint
2025-04-03 14:56:28 -04:00
Sam Machin a22ab38aab Disable Options and Registration on certain failures (#90)
* disable options ping on defined errors

* correct sid

* disable reg on error

* fix path

* fixes from testing

* fixes from testing

* lint

* update dbhelpers dep

* remove whitespace in CONFIG strings

* lint

* this seems like a better way of convering and matching status codes
2025-04-02 08:22:52 -04:00
Hoan Luu Huu e687d772d8 fix regbot issue with invalid sip_realm (#79)
* fix regbot issue with invalid sip_realm

* wip

* wip

* wip
2025-02-04 23:57:33 -05:00