fix: close caller analytics SIP integration gaps
This commit is contained in:
@@ -21,13 +21,19 @@ for file in /etc/lisglosips/caller-analytics.env /etc/rsyslog.d/35-caller-analyt
|
||||
if test -f "$file"; then cp -a "$file" "$backup/$(basename "$file")"; fi
|
||||
done
|
||||
changed=0
|
||||
was_running=$(systemctl is-active lisglosips@caller-analytics || true)
|
||||
rollback() {
|
||||
rc=$?
|
||||
if test "$changed" = 1; then
|
||||
systemctl stop lisglosips@caller-analytics || true
|
||||
cp -a "$backup/opensips.cfg" /etc/opensips/opensips.cfg
|
||||
for file in /etc/lisglosips/caller-analytics.env /etc/rsyslog.d/35-caller-analytics.conf; do
|
||||
if test -f "$backup/$(basename "$file")"; then cp -a "$backup/$(basename "$file")" "$file"; else rm -f "$file"; fi
|
||||
done
|
||||
ln -sfn "$old" /opt/lisglosips/current
|
||||
systemctl restart rsyslog || true
|
||||
systemctl restart opensips lisglosips@api || true
|
||||
if test "$was_running" = active; then systemctl start lisglosips@caller-analytics || true; fi
|
||||
fi
|
||||
echo "FAILED rc=$rc backup=$backup (additive analytics tables retained)"
|
||||
exit "$rc"
|
||||
@@ -44,6 +50,8 @@ if grep -q 'CRA1|' "$source_cfg"; then
|
||||
else
|
||||
/usr/bin/node "$new/scripts/instrument-caller-analytics.mjs" "$source_cfg" "$new/opensips-candidate.cfg"
|
||||
fi
|
||||
python3 "$new/infra/server-b/caller-analytics/verify-hotpath.py" "$new/opensips-candidate.cfg"
|
||||
systemctl start lisglosips-redis-hotpath-load.service
|
||||
opensips -C -f "$new/opensips-candidate.cfg"
|
||||
set -a
|
||||
source /etc/lisglosips/secrets/mysql-migrate.env
|
||||
|
||||
Reference in New Issue
Block a user