30.10.2020

Asterisk. hints. States.

Получить данные о состоянии пиров можно так:

Подключаемся по AMI: telnet 127.0.0.1 5038

Action: Login
ActionID: 1
Username: manager
Secret: password

получаем данные:

Action: Getvar
ActionID: 1
Variable: DEVICE_STATE(SIP/1000)

ответ:

ActionID: 1 
Variable: DEVICE_STATE(SIP/1003) 
Value: INUSE

18.10.2020

Protected: Pavel Eremin

This content is password protected. To view it please enter your password below:

| Posted in Без рубрики | Enter your password to view comments.
1.10.2020

opensips 3.1 centos 7

Установка Opensips 3.1\opensips-cli\database на centos 7

устанавливаем репозиторий для centos 7:

yum install epel-release
yum install https://yum.opensips.org/3.1/releases/el/7/x86_64/opensips-yum-releases-3.1-6.el7.noarch.rpm

устанавливаем все пакеты в репозитории opensips (если нужно конечно все модули opensips поставить)
yum repo-pkgs opensips install

opensips-cli можно поставить из репозитория:

yum install opensips-cli -y

А можно из github:

yum install git -y
git clone https://github.com/OpenSIPS/opensips-cli.git
yum install python36 python36-pip python36-devel gcc mysql-devel python36-mysql python36-sqlalchemy python36-pyOpenSSL
cd opensips-cli
python3 setup.py install

Далее обновим и поставим mysql: mariadb и установим рутовый пароль:

cat > /etc/yum.repos.d/mariadb.repo <<EOF
# MariaDB 10.5 CentOS repository list - created 2020-10-09 07:01 UTC 
# http://downloads.mariadb.org/mariadb/repositories/ 
[mariadb] 
name = MariaDB 
baseurl = http://yum.mariadb.org/10.5/centos7-amd64 
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB 
gpgcheck=1
EOF

yum install mariadb-server -y
systemctl start mariadb
mysql_secure_installation

сделаем так чтобы всё запускалось при перезапуске:

systemctl enable opensips
systemctl enable mariadb
vi /etc/systemd/system/multi-user.target.wants/opensips.service

вместо mysqld.service в строчке After, запишем mariadb.service

systemctl daemon-reload