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>
* added ip in cidr utilities
* middleware add ms teams cidr check
* use cidr-matcher lib
* removed redundant require
* moved cidr-matcher require to top of file
* moved express require to top of file
---------
Co-authored-by: ajukes <ajukes@callable.io>
* update node image to the latest and most secure (#61)
Co-authored-by: Guilherme Rauen <g.rauen@cognigy.com>
* #62: dont modify refer-to host unless we have a dns name as outbound gateway
* added some tests and cleanup
* update drachtio-srf to latest
* gh action use node lts version
* revert and use node 18.x
* 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
* 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