...
Переход на OpenSIPS 3.4 LTS
Code Block |
---|
|
curl https://apt.opensips.org/opensips-org.gpg -o /usr/share/keyrings/opensips-org.gpg
echo "deb [signed-by=/usr/share/keyrings/opensips-org.gpg] https://apt.opensips.org bookworm 3.4-releases" >/etc/apt/sources.list.d/opensips.list
echo "deb [signed-by=/usr/share/keyrings/opensips-org.gpg] https://apt.opensips.org bookworm cli-nightly" >/etc/apt/sources.list.d/opensips-cli.list
apt update && apt upgrade
apt install opensips-auth-modules opensips-tls-wolfssl-module |
...
Code Block |
---|
|
su postgres
cd ~
psql webitel -qxc "ALTER DATABASE webitel SET timescaledb.restoring='on';"
psql -1 -f /usr/share/postgresql/15/webitel/migration/23.09-23.12.sql webitel
psql webitel -qxc "ALTER DATABASE webitel SET timescaledb.restoring='off';"
exit |
Очищаем старые пакеты:
...
Code Block |
---|
|
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 |
Code Block |
---|
language | sql |
---|
title | After update |
---|
linenumbers | true |
---|
collapse | true |
---|
|
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; |