Scale-in completion never happened: app.js holds the placeholder
Emitter that autoscale-manager returns synchronously (the real
SnsNotifier replaces it later inside an async IIFE), so the completion
poller never saw operationalState change; it also called the
nonexistent scaleIn() rather than completeScaleIn(). Instances in
Terminating:Wait therefore always burned the full lifecycle hook
heartbeat timeout.
In addition, nothing consumed dryUpCalls: a draining SBC kept accepting
new INVITEs sent directly to its public address right up until
termination.
Changes:
- complete the scale-in from within the ScaleIn handler in
autoscale-manager, where the real notifier is in scope
- while draining, reject new INVITEs with 503 so senders fail over to
another SBC (INVITE with Replaces is allowed through since it targets
a call already in progress here)
- a server may run several sbc-inbound and sbc-outbound processes, and
completing the hook when only this process is idle would terminate
the instance while sibling processes still have calls; each process
now reports its call count to redis (lib/call-count-reporter.js, with
a companion change in sbc-outbound) and the draining process
completes only when the server-wide count is zero on two consecutive
checks, falling back to its own count if no reports are present
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
The error handler was using (req, res, next, err) but drachtio-srf
error middleware expects (err, req, res, next). This caused
"res.send is not a function" errors when the handler was invoked.
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* support incoming calls from registration trunks with ephemeral gateways
* fix bug with multiple ephemeral gateways
* update to pino 10.1.0
* update eslint
* reject late media call with 488 and X-Reason
* test added
* changed X-Reason, clarified test
---------
Co-authored-by: Andre Heber <a.heber@cognigy.com>
* Move parseHostPorts to utils and cover with test suite
* fix tabs
* comment pre commit hook
* add test
* wip
* remove only
* fix 2 critical, 12 high vulnerabilities via npm audit fix
---------
Co-authored-by: Markus Frindt <m.frindt@cognigy.com>
* write cdrs and alerts with service_provider_sid
* update to latest @jambonz/http-authenticator which sends sip headers
* add call_sid to cdr when call is connected
* write call counts by SP as well as account, bugfix to allow digit '0' in dtmf-relay
* changes to handle siprec invites
* retain xml for sending
* send multipart body for siprec
* fixup sdp
* possibly trim xml string
* fix prev commit
* fix prev commit
* still tweaking sdp
* tweaks
* tweaking
* bit of refactoring
* refactor siprec client stuff into a library
* add direction in siprec metadata
* fix
* initial changes to use udp and dns in K8s for rtpengine ng
* github actions
* logging
* remove port from service name before dns lookup
* query rtpengine dns immediately on startup
* bugfix prev checkin
* use dns.lookup instead of resolve4 (k8s does not appear to consult search patterns in resolve.conf with the latter)
* return all rtpengine endpoints in dns lookup
* bugfix: polling rtpengine endpoints
* fix prev commit
* catch error on rtpengine failure
* update deps
* require node 14 in gh action build
* specify node version in gh actions
* K8S changes
* k8s: test explicit dns lookup of service
* bugfix prev commit
* typo
* k8s: more dns
* k8s: more dns
* k8s: more dns fun
* k8s cleanup
* k8s: user service for rtpengine location
* k8s cleanup
* typo
* change env name for fs in k8s
* change k8s service name for feature server
* add support for outbound connection mode
* k8s change for outbound
* minor
* bugfix: drachtio connection was dropped after successful connect
* drop drachtio connection on call end
* Dockerfile
* k8s pre-stop hook
* actual hook committed
* make hjook executable
* dockerfile change
* time series fix
* bugfix: teams transfer using replaces
* support for sip refer to transfer an incoming call
* when sending REFER for call transfer, format Refer-To with carrier trunk if applicable
* better handling of e164 on Refer-To header
* add support for sitting behind a sip proxy that adds X-Forwarded-For header
* feature: release media from freeswitch
* handle mute/unmute
* fix for relaying INFO
* support for relaying dtmf via SIP INFO to FS
* deps