How to md5 auth SIP client manually if you have access to DB with passwords:in short words: # How to calculate manual response to send into Authorization header # HA1=MD5(username:realm:password) # HA2=MD5(method:digestURI) # response=MD5(HA1:nonce:HA2) route[auth] { if (!is_present_hf(“Authorization”)) return; # < converts string with ‘,’ to string with ‘;’ $var(raw_auth) = $hdr(Authorization); $var(reg_input)=$var(raw_auth); xlog(“$var(reg_input) [$ci]”); […]
Tag: opensips
Update opensips 3.2.2 -> 3.2.6 centos 7
процедура такая получилась:1. удаляем новую Libmicrohttpd2. обновляем Opensips и ставим http и prometheus модули со старой либой2.1 копируем модули от нового в tmp3. Удаляем старую либу(она удаляется с модулями http и prometheus)4. ставим новую либу Libmicrohttpd5. копируем модули httpd и prometheus из tmp в папку с Opensips lib6. делаем копию файла libmicrohttpd.12 -> libmicrohttpd.107. после […]
Opensips. MI. Json. Zabbix.
Opensips 3.2 have beautiful statistics module. For example you may get Data about average count of incoming sip messages directly from MI interface. Also you can output it on Zabbix graph. Enable mi_http module, add into opensips.conf:loadmodule “httpd.so”loadmodule “mi_http.so”modparam(“mi_http”, “root”, “mi”) Load statistics module and define statistics profiles and add update_stat_series() functions to script, check […]
Opensips 3.2, Homer 7
Advantages of using Opensips + Homer is possibility to see webrtc\tls traffic There is how to set simplest configuration on opensips side and Homer side. Homer 7 instruction for Debian 10. OPENSIPS: socket=hep_udp:ens5:9000 socket=hep_tcp:ens5:9000 … loadmodule “proto_hep.so” loadmodule “tracer.so” modparam(“proto_hep”, “hep_capture_id”, 5002) modparam(“proto_hep”, “hep_id”, “[hid]homer_ip:9060; transport=tcp; version=3”) modparam(“tracer”, “trace_id”, “[tid]uri=hep:hid”) ####### Routing Logic ######## # […]
Permission denied interface 80, 443
If you get permission denied for interface when start opensips. Like 44 interface for TLS, solution is here (https://superuser.com/questions/710253/allow-non-root-process-to-bind-to-port-80-and-443) in short words:setcap CAP_NET_BIND_SERVICE=+eip /usr/sbin/opensips
Ansible Part II. Install opensips,opensips-cli,opensips control panel.
You can use this Ansible roles to install full Opensips + Control Panel with one command. For some reason roles to install Opensips from ansible galaxy not working as expected. I have modified some roles to make it works. This will good only for Debian 10 and Centos 7. Most popular systems. Roles will install […]
183 ringback. OPensips + Rtpproxy.
Задача подменить КПВ идущее от провайдера на 10 секунд, далее прокидывать КПВ от провайдера. Задача решается при помощи opensips 3.1 + rtpproxy 2.1 и минимальной конфигурацией. rtpproxy прекрасно компилируется на базу Ubuntu 20opensips 3.1 устанавливается из репозиториев с конфигурацией по умолчанию для проигрывания своего приветсвия необходимо сделать 2 вещи: а) подключить rtpproxy и использовать rtpproxy_stream2uac […]
opensips as SBC
Example of opensips SBC with 2 interfaces with full RTP proxy and g729 transcoding. Software: opensips 3.1, rtpengine, bcg729. example settings for rtpengine: OPTIONS=”-i external/172.18.254.50!EXTERNAL_IP -i internal/172.25.150.242 -n 127.0.0.1:2223 -m 35000 -M 65000 -L 4 –log-facility=local1 –table=0 –delete-delay=0 –timeout=60 –silent-timeout=600 –final-timeout=7200 –offer-timeout=60 –num-threads=4 –tos=184 –no-fallback” example opensips config: git clone https://bitbucket.org/yooxy/opensips-sbc-local-external-transcode.git
opensips 3.1 centos 7
Установка Opensips 3.1\opensips-cli\database на centos 7 отключаем в epel пакеты с opensips 1.10 (add to epel.repo: exclude=opensips*) устанавливаем репозиторий для centos 7: yum install epel-release yum install https://yum.opensips.org/3.1/releases/el/7/x86_64/opensips-yum-releases-3.1-5.el7.noarch.rpm устанавливаем все пакеты в репозитории opensips yum repo-pkgs opensips install далее установим opensips-cli, делать это лучше с git-hub: yum install git -y git clone https://github.com/OpenSIPS/opensips-cli.git yum install python36 […]
TCP\TLS NAT Zoiper
Столкнулся с проблемой, когда через sip прокси (opensips) не проходили пакеты (OPTIONS, NOTIFY, INVITE) в сторону uac при использовании TCP и TLS протоколов. при TLS opensips ругался 477/Send Error, при использовании TCP – 408 timeout. И действительно пакеты с opensips уходили, но не доходили до UAC. Причина была в использовании STUN, если его отключить на […]