Software & Stacks

rtpengine (media proxy / relay)

rtpengine is an open-source kernel-accelerated RTP proxy maintained by Sipwise. Kamailio and OpenSIPS handle SIP signaling but not media; rtpengine is the standard companion that handles the actual RTP packets — relaying, transcoding, recording, encrypting/decrypting SRTP. Together (signaling + media) they form a complete carrier-grade SIP stack.

Why you need rtpengine

Kamailio/OpenSIPS only see SIP. RTP normally flows directly between endpoints. But:

That's rtpengine.

How it integrates with Kamailio/OpenSIPS

You add a few lines to your routing config: when an INVITE comes in, rewrite the SDP to point media to rtpengine, send the original SDP to rtpengine via control protocol, get the rewritten SDP back, forward INVITE. RTP now flows: caller → rtpengine → callee.

# In Kamailio config (rtpengine module)
loadmodule "rtpengine.so"
modparam("rtpengine", "rtpengine_sock", "udp:127.0.0.1:2223")

route[MEDIA_BRIDGE] {
    rtpengine_offer();      # on INVITE
    t_on_reply("REPLY_BRIDGE");
    t_relay();
}
onreply_route[REPLY_BRIDGE] {
    rtpengine_answer();     # on 200 OK
}

Kernel-accelerated forwarding

The killer feature: rtpengine has a kernel module (xt_RTPENGINE) that forwards RTP packets without leaving kernel space. Once a call is established, packets bypass userspace entirely — allowing one server to relay 100K+ concurrent calls. Userspace handles only call setup and edge cases.

Common deployment

Related terms

Ready to get a number?

Pick a DID in 130+ countries from $1.99/month. Activates instantly on most numbers.