-
Perform a system backup!
-
Updating to Debian 12 Linux requires server reboot.
-
Updating OpenSIPS to version 3.4 LTS requires manual configuration file update.
Algorithm of update
-
Stop Webitel services
-
Update Debian Linux to version 12
-
Update Webitel applications to v23.12
-
Transition to OpenSIPS 3.4 LTS
-
Database migration from Webitel v23.09 to v23.12
-
Restart all Webitel services
Stopping Webitel services:
systemctl stop webitel-api webitel-app webitel-uac messages-bot messages-srv \
engine call_center storage flow_manager rabbitmq-server consul \
freeswitch ngcp-rtpengine-daemon opensips grafana-server nginx
Updating Debian Linux and updating Webitel to v23.12.
sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list
sed -i 's/23.09-releases/23.12-releases/g;s/bullseye/bookworm/g' /etc/apt/sources.list.d/*
echo "deb https://deb.sipwise.com/spce/mr11.5.1 bookworm main" > /etc/apt/sources.list.d/rtpengine.list
apt update
apt upgrade --without-new-pkgs
apt full-upgrade
sudo -u postgres psql webitel -qxc "ALTER DATABASE webitel REFRESH COLLATION VERSION;"
sudo -u postgres psql webitel -qxc "ALTER EXTENSION timescaledb UPDATE;"
shutdown -r now
systemctl stop webitel-api webitel-app webitel-uac messages-bot messages-srv \
engine call_center storage flow_manager rabbitmq-server consul \
freeswitch ngcp-rtpengine-daemon opensips grafana-server nginx
apt install --reinstall linux-headers-`uname -r` \
ngcp-rtpengine-daemon ngcp-rtpengine-iptables ngcp-rtpengine-kernel-dkms
Transition to OpenSIPS 3.4 LTS
echo "deb https://apt.opensips.org bookworm 3.4-releases" > /etc/apt/sources.list.d/opensips.list
apt update && apt upgrade
apt install opensips-auth-modules opensips-tls-wolfssl-module
After the update, it is necessary to make changes to the configuration file:
curl https://git.webitel.com/projects/WEP/repos/opensips/raw/opensips.cfg \
-o /etc/opensips/opensips-34.cfg
vimdiff /etc/opensips/opensips.cfg /etc/opensips/opensips-34.cfg
If you use SIP TLS, it is recommended to replace the "tls_openssl.so" module with "tls_wolfssl.so". Other changes can be found in the official documentation:
-
https://www.opensips.org/Documentation/Migration-3-2-0-to-3-3-0
-
https://www.opensips.org/Documentation/Migration-3-3-0-to-3-4-0
Database migration from Webitel v23.09 to v23.12
su postgres
cd ~
psql -1 -f /usr/share/postgresql/15/webitel/migration/23.09-23.12.sql webitel
exit
Remove old packages:
apt --purge autoremove
Restart Webitel v23.12
systemctl restart consul
systemctl restart postgresql
systemctl restart rabbitmq-server
systemctl restart webitel-app webitel-uac webitel-api engine \
messages-srv flow_manager messages-bot call_center storage webitel-logger \
freeswitch ngcp-rtpengine-daemon opensips grafana-server nginx
with q as (
select h.id, string_agg(distinct nums.from_number, '|') filter ( where nums.from_number != '' and nums.from_number notnull ) numbers
from call_center.cc_calls_history h
left join call_center.cc_calls_history h2 on h2.parent_id = h.id
left join lateral (
select h.from_number
union distinct
select h.to_number
union distinct
select h.destination
union distinct
select h2.from_number
union distinct
select h2.to_number
union distinct
select h2.destination
) nums on true
where h.created_at between now()::date - interval '30d' and now()
group by 1
)
update call_center.cc_calls_history h
set search_number = q.numbers
from q
where q.id = h.id;