universalss7

The universal SS7 Library

The Universal SS7 library is a set of open source libraries to process signalling system 7 messages as used in the GSM world and transported over IP (So called Sigtran family of protocols)

Universal SS7 consists of:

ulibUniversal Library abstracting general use things (config files, webserver, layer objects etc)
ulibdba libary to query MySQL Postgres and Redis databases (in release 6 merged into ulib)
ulibasn1a library to make it easier to deal with ASN1 encoded objects (in release 6 merged into ulib)
ulibsmppa library to deal with the SMPP protocol
ulibsctpa library to extend ulib with SCTP specific sockets (in release 6 merged into ulib)
ulibm2paa library implementing the SS7 M2PA (MTP2 over IP) protocol (in release 6 merged into ulibmtp3)
ulibmtp3a library implementing the SS7 MTP3 and M3UA protocols
ulibgta library implementing SS7 SCCP Global Title handling (in release 6 merged into ulibsccp)
ulibsccpa library implementing the SS7 SCCP protocol
ulibtcapa library implementing the SS7 TCAP protocol
ulibgsmmapa library implementing the SS7 GSM-MAP protocol
ulibsmsa library implementing SMS encoding/decoding functions
ulibss7configa library implementing config file, api and basic stuff to tie an ss7 app together
ulibdiametera library implementing Diameter encoding/decoding functions
ulibpcapa library allowing to read/write ss7 packets using pcap files
ulibcamela library dealing with CAMEL files (still incomplete)

Related stuff

Used libraries

ulibdnsa library doing DNS functionality
schrittmachera system daemon for hot/standby configurations
schrittmacherclienta library for applications to implement a hot/standby mechanism
operatordba library to translate MNC/MCC into operator names
umscriptscripting engine used in some ss7 products
pointcodecommand line tool 'pc' to convert pointcodes in different formats
hlrclientclient for hlr lookups
libiconv-1.17library to convert character sets
libdispatchlibdispatch (aka GrandCentral Dispatch)
gnustep build scriptsThe GNUSTEP build scripts
gnustep makeThe GNUSTEP make environment
libobjc2The ObjectiveC 2.0 runtime
gnustep-baseThe GNUSTEP base library (Foundation)
gnustep-corebaseTHE GUSTEP corebase library (CoreFoundation)
gnustep-guiThe GNUSTEP libraries for GUI (AppKit, not used by universalss7)
gnustep-backThe GNUSTEP libraries for GUI backend (driver for X11, not used by universalss7)

The GNUSTEP libraries have to be compiled with libobjc2 support. The standard gnustep installation under Debian and Ubunut do not work. You must uninstall them first and compile gnustep from source or use the prebuilt versions from repo.gnustep.ch For Universal SS7 only gnustep-base is needed.

Install from Repository (Debian/Ubuntu):

3.1 Add the repository keys

wget -4 -O - http://repo.universalss7.ch/debian/key.asc  > /etc/apt/trusted.gpg.d/repo.universalss7.ch.asc
wget -4 -O - http://repo.gnustep.ch/key.asc  > /etc/apt/trusted.gpg.d/repo.gnustep.ch.asc

3.2 Add the universalss7 repository

Debian 13 Trixie (amd64, arm64)
echo "deb http://repo.gnustep.ch/ubuntu/ noble gnustep"  > /etc/apt/sources.list.d/gnustep.ch.list
echo "deb http://repo.universalss7.ch/ubuntu/ noble universalss7" > /etc/apt/sources.list.d/universalss7.list
apt-get update
apt-get install universalss7
apt-get install universalss7-dev
ubuntu 24.04 LTS Noble (amd64,arm64)
echo "deb http://repo.gnustep.ch/ubuntu/ noble gnustep"  > /etc/apt/sources.list.d/gnustep.ch.list
echo "deb http://repo.universalss7.ch/ubuntu/ noble universalss7" > /etc/apt/sources.list.d/universalss7.list
apt-get update
apt-get install universalss7
apt-get install universalss7-dev

ubuntu 26.04 LTS Resolute (amd64,arm64)
echo "deb http://repo.gnustep.ch/ubuntu/ resolute universalss7"  > /etc/apt/sources.list.d/gnustep.ch.list
echo "deb http://repo.universalss7.ch/ubuntu/ resolute universalss7" > /etc/apt/sources.list.d/universalss7.list
apt-get update
apt-get install universalss7
apt-get install universalss7-dev

FreeBSD 15.1
FreeBSD has no packages yet. You need to install from source. (see below) Install the dependencies by running install_dependencies_freebsd.sh in the ulib repository first
MacOS 12.4 and newer
MacOS has no packages yet. You need to install from source. (see below) Install the dependencies by running install_dependencies_macos.sh in the ulib repository first

The arm64 architecture runs on Raspberry Pi4, a arm64 VM running Debian under Apple M1 or powerful ARM servers such as these. Main development currently occurs on Debian 13 arm64 and amd64 architectures while Ubuntu 26 and FreeBSD 15.1 being frequently updated.

Building from Source

To build UniversalSS7 under Linux and FreeBSD you should have a working gnustep version installed supporting libobjc2 and ARC and the clang compiler. Under MacOS, you do not need GNUStep as Apple's Foundation Framework is taking its place.

make sure the following environment variables are set:

export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
export PATH=/opt/buildtools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
export RUNTIME_VERSION=gnustep-2.0
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
Your path must include the correct gnustep-config tool and PKG_CONFIG_PATH should include /usr/local/lib/pkgconfig as all the pkgconfig files will be written there. now check out the source libraries
git clone https://github.com/andreasfink/ulib
git clone https://github.com/andreasfink/ulibmtp3	
git clone https://github.com/andreasfink/ulibsccp
git clone https://github.com/andreasfink/ulibtcap	
git clone https://github.com/andreasfink/ulibgsmmap	
git clone https://github.com/andreasfink/ulibsms	
git clone https://github.com/andreasfink/ulibpcap	
git clone https://github.com/andreasfink/ulibcamel	
git clone https://github.com/andreasfink/ulibdiameter	
git clone https://github.com/andreasfink/ulibtransport 	
git clone https://github.com/andreasfink/ummessage
git clone https://github.com/andreasfink/ulibsmpp	
git clone https://github.com/andreasfink/umscript	
git clone https://github.com/andreasfink/schrittmacherclient
git clone https://github.com/andreasfink/uliblicense
git clone https://github.com/andreasfink/ulibss7config	
Now we need to compile ulib first check out the ulib repository first and apply the commands according to your operating system.
install_dependencies_debian.sh
install_dependencies_freebsd.sh
install_dependencies_macos.sh
Under MacOS this installs the pkg files from the dependencies directories. These are packages which are precompiled for arm64 and x86_64 architectures and install into /usr/local/include and /usr/local/lib. Under FreeBSD "pkg" is used to install the needed source packages and under Linux Debian and Ubuntu, the apt tool is used to install dependencies. Now that all should be prepared correctly, the way to compile is simply
./configure
make -j20
sudo make install
do this for every subdirectory checked out above in the order above.

Limitations:
Under MacOS, there is no support for SCTP in the kernel. If you have an older MacOS and a corresponding SCTP kernel extension, it should work. The userspace side of it is compiled into ulib. Under newer versions of MacOS, you can not use SCTP. M3UA over TCP is thus recommended to be used instead if the other side does support M3UA over TCP. If not our ESTP can be used to route packets on M3UA TCP to your application adn M2PA or M3UA over SCTP on the other side.

Current State of the project

The Release-6.0.0 branch is stable for use as SS7 endpoint and to run as STP. Serveral commercial based products are using it to transport millions (if not billions) of packets over it.