Human-friendlier interface to interact with a X1/X2/X3 node. Intended to test the ETSI TS 103 221 implementations of Network Elements.
This repository contains tests that validate the behaviour of Simulator against a stable network element (which is provided by a Wiremock instance with Stubs). These tests can then also be used to validate a moving/in-development implementation of X1/X2/X3.
git clone
the repository- Run
npm install
for git hooks and prettier (code formatting) - For TLS setup and running the simulator, run
docker compose up --build
The API documentation is available at http://localhost:8080/swagger-ui.html
.
We're using the Maven release plugin.
When ready, run ./mvnw release:prepare
and follow the instructions. This will create, tag and push a new release.
Run e2e-tests via ./scripts/run-e2e-tests.sh
For details about test scenarios within wiremock, see Network Element README
Start the simulator environment using docker. There is a binary x2 file in src/test/misc/x2-demo-01.bin
that you can
copy into the container and then send to the server:
docker compose cp src/test/misc/x2-demo-01.bin simulator:/tmp/x2-demo-01.bin
docker compose exec -i simulator \
/bin/bash -c "cat /tmp/x2-demo-01.bin | openssl s_client \
-connect 127.0.0.1:42069 \
-cert /mutual-tls-stores/certs/network-element.crt \
-key /mutual-tls-stores/keys/network-element.key"
The simulator can be used to dump all received RTP audio packets and create an MP3. To do this, send your RTP stream via X3 to the simulator on port 42069. It is out of scope how you do this - use your NE for example.
Given ffmpeg
in PATH, and after you have sent the RTP stream, you can retrieve the audio by using the following
commands:
python3 -m venv .venv
source .venv/bin/activate
pip3 install -r scripts/requirements.txt
python3 scripts/download-x3rtp-and-convert.py http://localhost:8080 [XID] [in|out]
Replace [XID]
with the XID of the call you want to retrieve and [in|out]
with the direction of the call. The script
will download the RTP packets and convert them to an MP3 file called [XID]-[DIRECTION].mp3
.
Be sure to reset the X2X3 in-memory receiver after you have downloaded the audio.
curl -X POST "http://localhost:8080/x2x3/reset"
- EVE Explains: ETSI TS 103 221 - X1/X2/X3 https://www.lawfulinterception.com/explains/etsi-ts-103-221/
If you find any vulnerabilities in our software, please refer to sipgate's security team who will coordinate a disclosure with you. Thanks for reporting any issues.