Skip to content

Ring2All SBC - RTPEngine Media Relay & WebRTC Gateway Documentation

3 min readUpdated: Sep 26, 2026
View as Markdown
  1. Module Overview (Technical)
  2. Module Overview (Commercial/Business)
  3. Module Overview (End User/Administrator)
  4. Configuration Sections
  5. Settings Reference
  6. Common Scenarios & Examples
  7. Limitations & Important Notes
  8. Troubleshooting Tips
  9. Glossary

The RTPEngine Media Relay & WebRTC Gateway Module in Ring2All SBC manages real-time audio/video proxying, NAT traversal, SRTP encryption/decryption, and WebRTC-to-SIP bridging (ICE, DTLS-SRTP, Opus/G.711 codec transcoding).

Using kernel-space packet forwarding (xt_RTPENGINE), Ring2All SBC routes media streams directly through the Linux kernel network stack, achieving high-throughput, sub-millisecond audio latency for thousands of concurrent channels.

┌─────────────────────────────────────────────────────────────────┐
│ Ring2All SBC - RTPEngine Architecture │
├─────────────────────────────────────────────────────────────────┤
│ │
│ WebRTC Client (Browser) PSTN / Telephony Server │
│ WSS / ICE / DTLS-SRTP UDP / RTP (G.711 / G.729) │
│ │ │ │
│ ▼ ▼ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ Ring2All SBC │ │
│ │ ┌──────────────────┐ ┌──────────────────────┐ │ │
│ │ │ Kamailio Signaling│ <-----> │ RTPEngine Media Proxy│ │ │
│ │ └──────────────────┘ └──────────────────────┘ │ │
│ │ (xt_RTPENGINE Kernel) │ │
│ └──────────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘

  1. Seamless WebRTC Integration: Enables softphones, browsers, and mobile apps to communicate directly with traditional SIP trunks without expensive hardware SBCs.
  2. Sub-Millisecond Latency: Kernel-level media forwarding guarantees crystal-clear voice quality without CPU bottlenecking.
  3. Enterprise Encryption & Security: Enforces mandatory DTLS-SRTP encryption for remote endpoints over public Internet.

3. Module Overview (End User/Administrator)

Section titled “3. Module Overview (End User/Administrator)”
  • Configure Media Proxies: Set listening interfaces, UDP port ranges (10000-20000), and TOS/QoS audio flags.
  • Enable WebRTC Gateway: Auto-bridge WebSockets (ICE/SDP) to traditional UDP SIP.
  • Monitor Active Media Sessions: Track active call streams, jitter, packet loss, and codec stats.

Configures daemon socket control, kernel module bindings, and thread pools.

Defines rules for converting SRTP to RTP, rewriting SDP IPs, and managing ICE candidates.


Field Name Type Options / Format Description
listen_ng Input IP:Port (e.g. 127.0.0.1:2223) Control socket for Kamailio-to-RTPEngine communication.
port_min Integer 10000 Minimum UDP port for media streams.
port_max Integer 20000 Maximum UDP port for media streams.
rtpengine_flags String trust-address replace-origin replace-session-connection SDP manipulation parameters.

Scenario: WebRTC Browser to PSTN Call Bridging

Section titled “Scenario: WebRTC Browser to PSTN Call Bridging”
  1. WebRTC client connects via WebSocket (wss://sbc.ring2all.xyz).
  2. Kamailio invokes rtpengine_offer("ICE=force DTLS=passive SDES-off RTP/SAVPF").
  3. RTPEngine negotiates DTLS-SRTP with browser and plain RTP with PSTN gateway.
  4. Media flows smoothly with zero audio degradation.

  • Ensure xt_RTPENGINE kernel module is loaded for maximum performance (modprobe xt_RTPENGINE).

Symptom Probable Cause Solution
One-way audio NAT / Public IP mismatch in SDP Verify advertised_ip in RTPEngine config.
WebRTC call drops instantly ICE candidate negotiation failure Ensure TURN/STUN servers or public ICE IPs are configured.

  • ICE: Interactive Connectivity Establishment for WebRTC NAT traversal.
  • DTLS-SRTP: Datagram Transport Layer Security for SRTP media key exchange.