Ring2All SBC - RTPEngine Media Relay & WebRTC Gateway Documentation
Table of Contents
Section titled “Table of Contents”- Module Overview (Technical)
- Module Overview (Commercial/Business)
- Module Overview (End User/Administrator)
- Configuration Sections
- Settings Reference
- Common Scenarios & Examples
- Limitations & Important Notes
- Troubleshooting Tips
- Glossary
1. Module Overview (Technical)
Section titled “1. Module Overview (Technical)”What Is the RTPEngine Media Relay Module?
Section titled “What Is the RTPEngine Media Relay Module?”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.
Architecture
Section titled “Architecture”┌─────────────────────────────────────────────────────────────────┐│ 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) │ ││ └──────────────────────────────────────────────────────────┘ ││ │└─────────────────────────────────────────────────────────────────┘2. Module Overview (Commercial/Business)
Section titled “2. Module Overview (Commercial/Business)”Business Benefits
Section titled “Business Benefits”- Seamless WebRTC Integration: Enables softphones, browsers, and mobile apps to communicate directly with traditional SIP trunks without expensive hardware SBCs.
- Sub-Millisecond Latency: Kernel-level media forwarding guarantees crystal-clear voice quality without CPU bottlenecking.
- 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)”What Can You Do in This Module?
Section titled “What Can You Do in This Module?”- 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.
4. Configuration Sections
Section titled “4. Configuration Sections”1. RTPEngine Service Settings
Section titled “1. RTPEngine Service Settings”Configures daemon socket control, kernel module bindings, and thread pools.
2. Media Bridge Rules
Section titled “2. Media Bridge Rules”Defines rules for converting SRTP to RTP, rewriting SDP IPs, and managing ICE candidates.
5. Settings Reference
Section titled “5. Settings Reference”| 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. |
6. Common Scenarios & Examples
Section titled “6. Common Scenarios & Examples”Scenario: WebRTC Browser to PSTN Call Bridging
Section titled “Scenario: WebRTC Browser to PSTN Call Bridging”- WebRTC client connects via WebSocket (
wss://sbc.ring2all.xyz). - Kamailio invokes
rtpengine_offer("ICE=force DTLS=passive SDES-off RTP/SAVPF"). - RTPEngine negotiates DTLS-SRTP with browser and plain RTP with PSTN gateway.
- Media flows smoothly with zero audio degradation.
7. Limitations & Important Notes
Section titled “7. Limitations & Important Notes”- Ensure
xt_RTPENGINEkernel module is loaded for maximum performance (modprobe xt_RTPENGINE).
8. Troubleshooting Tips
Section titled “8. Troubleshooting Tips”| 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. |
9. Glossary
Section titled “9. Glossary”- ICE: Interactive Connectivity Establishment for WebRTC NAT traversal.
- DTLS-SRTP: Datagram Transport Layer Security for SRTP media key exchange.

