Skip to content

Introduction

Implementing a SIP/SIP-I proxy provides a versatile and scalable solution for telecom operators who need to bridge the gap between legacy and modern IP networks. In scenarios where customers still rely on older equipment that requires SIP-I (Session Initiation Protocol with ISUP encapsulation), a SIP/SIP-I proxy becomes essential.

OpenSIPS, an open-source SIP server platform, is well-suited to act as this intermediary, allowing seamless interworking between SIP and SIP-I protocols. This solution ensures that legacy telecommunication infrastructure, which uses ISDN or traditional circuit-switched networks, remains operational without needing costly upgrades, while still benefiting from modern IP-based communication systems.

Installation

Download Proxy package from SRE software delivery portal. You can find it in the following location:

SRE/Supporting_packages/dependencies SRE 4.1/opensips-3.4.6_linux_x86_64.tar.gz

Unpack it starting from / folder:

shell
cd /
tar xzvf opensips-3.4.6_linux_x86_64.tar.gz

Download all files from:

https://gitea.bxl.netaxis.be/sre/sre/src/tag/4.1.0/etc/opensips

And upload them to /etc/opensips directory on target machine.

Create opensips user and group:

shell
/usr/sbin/groupadd -r opensips
/usr/sbin/useradd -r -s /sbin/nologin -g opensips opensips

Create systemd service for opensips launch:

shell
cat > /usr/lib/systemd/system/opensips.service <<EOF
[Unit]
Description=OpenSIPS is a very fast and flexible SIP (RFC3261) server
Documentation=man:opensips
After=network.target mysqld.service postgresql.service rtpproxy.service
[Service]
Type=forking
User=opensips
Group=opensips
RuntimeDirectory=opensips
RuntimeDirectoryMode=775
Environment=P_MEMORY=32 S_MEMORY=32
EnvironmentFile=-/etc/sysconfig/opensips
PermissionsStartOnly=yes
PIDFile=%t/opensips/opensips.pid
ExecStart=/usr/local/sbin/opensips -P %t/opensips/opensips.pid -f /etc/opensips/opensips.cfg -m $S_MEMORY -M $P_MEMORY $OPTIONS
ExecStop=/usr/bin/pkill --pidfile %t/opensips/opensips.pid
Restart=always
TimeoutStopSec=30s
LimitNOFILE=262144
[Install]
WantedBy=multi-user.target
EOF
shell
cat > /etc/sysconfig/opensips <<EOF
S_MEMORY=64
P_MEMORY=4
OPTIONS="-p /etc/opensips/opensips-preproc.py"
EOF

Reload systemd to read new service description:

shell
systemctl daemon-reload

Configuration

Edit env.json with:

shell
vi /etc/opensips/env.json

You can customize the following settings:

  • listenAddress: address to listen for SIP signaling, you can put 0.0.0.0 to listen on all addresses.
  • listenPort: port to listen for SIP signaling, typical setting is 5060
  • protocol: udp or tcp
  • numWorkers: how many workers to start for SIP processing 8 are recommended (1 for local testing)
  • debugMode: if enable with true more logs will be printed. Recommended setting: false
  • enableStatistics: if enable with true http endpoint is available to collect metrics in prometheus format.
  • nationalCountryCode: country code that the first part of the number from P-Asserted-Identity is tested against when trying to map the Calling Party Number ISUP parameter from SIP by default. If there is a match, the value assigned to the Nature of Address Indicator subfield is 3(national), otherwise it is 4(international).
  • isupVersionContentType: the string to be used for the Content-Type header field of the ISUP MIME body when creating a new ISUP message.
  • diversionInterworking: if enabled diversion header information will be reflected in ISUP message, recommended setting: true
  • historyInfoInterworking: if enabled history-info header information will be reflected in ISUP message, recommended setting: true

Starting the proxy

shell
systemctl start opensips
systemctl enable opensips

Sample call flows

SIP to SIP-I

In this scenario an incoming INVITE without ISUP is forwarded to Proxy to do the necessary interworking with SIP-I.

SIP-I to SIP

In this scenario an incoming INVITE with ISUP is forwarded to Proxy which takes care of removing ISUP message for request towards the UAS and adding ISUP information to responses coming from the UAS.

SIP to SIP-I hold/resume scenario

In this scenario an incoming INVITE without ISUP is forwarded to Proxy to do the necessary interworking with SIP-I. Hold and Resume information is delivered in ISUP CPG messages.