RTPEngine is a media relay that handles the heaviest part of a voice over IP call, namely the RTP packets carrying speech and video. It is developed by Sipwise, a Vienna based vendor of telecom platforms, which releases it under the GPL v3 licence and ships it inside its own switching products. The GitHub repository even uses its full name, Sipwise NGCP rtpengine.
The project grew up alongside Kamailio. The module that lets this SIP server control it was called rtpproxy-ng until it was renamed rtpengine in March 2014, according to the Kamailio developers mailing list.
What RTPEngine is for
In a VoIP design, the SIP proxy deals with signalling, which means setting calls up and tearing them down, but it leaves the audio alone. When two parties sit behind NAT routers, on separate networks or with mismatched protocols, something has to receive media packets on one side and send them out on the other. Kamailio or OpenSIPS then ask RTPEngine, over a control protocol called ng, to open ports, and rewrite the SDP session description so that each endpoint sends its stream to the relay.
What sets it apart is kernel forwarding. Once a call is negotiated, a Linux module loaded as nft_rtpengine on kernels 4.4 and newer moves packets without going back through the main program, cutting both latency and CPU use. If the module is missing, the daemon keeps working in user space. This is the main difference from the older rtpproxy, which RTPEngine replaces without changes to the Kamailio configuration.
The feature set goes well past plain relaying. It handles ICE, trickle mode included, SRTP and DTLS-SRTP encryption and RTP/RTCP multiplexing, which is what lets a WebRTC browser talk to a conventional SIP network. It transcodes and repacketises audio, with codecs such as G.711, G.722, G.729, Opus, AMR or EVS according to the Sipwise product page, converts DTMF tones, turns T.38 fax into PCM, plays announcements and records calls through a dedicated daemon. The documentation also mentions partial compatibility with the control protocol of the Janus gateway. ZRTP encryption is not supported, although its packets pass through untouched.
RTPEngine can also send statistics in HEP format to HOMER, the capture tool covered in our software library, and SIPp is a common choice for load testing it before going live.
Who is it for?
It fits carriers, hosted PBX providers and video conferencing services already running Kamailio or OpenSIPS that need to cross NAT, encrypt media or connect WebRTC to the phone network. Large platforms value its ability to carry many simultaneous calls on modest hardware, thanks to kernel forwarding and to sessions stored in a database that survive a restart.
It is not a PBX. It cannot register phones, route calls or run voicemail, and it does nothing without a SIP proxy giving it instructions. It runs only on Linux, and a full build requires a long list of libraries, ffmpeg among them for transcoding. A small business that simply wants a phone system will be better off with an IP PBX such as Asterisk or FreeSWITCH, which handle their own media.
Download RTPEngine safely
Source code lives in the sipwise/rtpengine repository on GitHub, and the official documentation at rtpengine.readthedocs.io describes two ways to install it. One is to build the Debian packages yourself, which split the daemon, the kernel module as a DKMS package and the recording daemon. The other relies on the prebuilt packages from the dfx.at repository that the documentation links to, covering recent Debian and Ubuntu releases on amd64, i386, armhf and arm64, with a current branch, several LTS branches and daily builds.
The software is free of charge. Sipwise sells support and lists on its website a transcoding add-on accelerated by Nvidia graphics processors, to be discussed with its sales team. Because the kernel module runs with full system privileges, a package fetched from an unknown site could compromise the entire server, so checking the repository signing key before installing anything is worth the extra minute.
Frequently asked questions
Does RTPEngine work with OpenSIPS?
Yes. OpenSIPS has an rtpengine module that controls the relay in much the same way as Kamailio does. The project README mostly talks about Kamailio, the server it was originally designed for.
Can it run on Windows or macOS?
No. The documentation states that it runs on GNU/Linux only, and accelerated forwarding depends on a Linux kernel module. It can, however, run inside a Linux virtual machine.
Which version should I pick?
The package repository separates the newest branch, 26.2 when we checked, from LTS branches such as 26.0, 13.5 or 12.5. A production platform is better served by staying on an LTS release.