SlideShare a Scribd company logo
3
Most read
14
Most read
20
Most read
rtpengine
media processing for fun and profit
Andreas Granig ‱ 09.05.2017
<agranig@sipwise.com>
Media Processing?
TranscodingRelaying
Recording
Transscribing
Encrypting
Injecting
Monitoring
Capturing
Agenda
Introduction
Relaying
Capturing
Encrypting
Recording
Monitoring
Introduction
rtpengine is

○ a media relay
○ used by (but not limited to) Kamailio
○ kernel based
○ highly available
○ doing crypto stuff for WebRTC
○ hosted at github.com/sipwise/rtpengine
○ much more!
Relaying
rtpengine Kamailio Module
controlling
rtpengine Daemon
driving
rtpengine Kernel Module
Relaying
rtpengine
Kamailio
SIP
RTP
original SDP +
meta info
modified SDP +
meta info
Relaying
Kamailio
loadmodule “rtpengine.so”
modparam(“rtpengine”, “rtpengine_sock”,
“udp:127.0.0.1:12221”)
route {
...
rtpengine_manage();
...
}
Daemon
# rtpengine 
--interface=ext/1.2.3.4 
--listen-ng=127.0.0.1:12221
Encrypting
Transform SDP Profiles
for bridging SIP and WebRTC,
Encrypt/Decrypt DTLS-SRTP
in Kernel
Encrypting (eg. WebRTC Bridging)
rtpengine
Kamailio
SIP
RTP
original SDP +
meta info
modified SDP:
● changed profile
● added ICE candidates
● RTCP mux
DTLS-SRTP
Encrypting
Kamailio
loadmodule “rtpengine.so”
modparam(“rtpengine”, “rtpengine_sock”,
“udp:127.0.0.1:12221”)
route {
rtpengine_offer(“RTP/SAVPF ICE=force ”);
}
reply_route {
rtpengine_answer(“RTP/AVP ICE=remove
rtcp-mux-demux”);
}
Daemon
# rtpengine 
--interface=ext/1.2.3.4 
--listen-ng=127.0.0.1:12221
Capturing
Write Streams as PCAP
into spool directory,
Inspect with Wireshark
for further analysis.
Capturing
metainfo
/var/spool/recordings/meta//var/spool/recordings/pcap/
rtpengine
Kamailio
out.pcap
SIP
RTP
Capturing
Kamailio
loadmodule “rtpengine.so”
modparam(“rtpengine”, “rtpengine_sock”,
“udp:127.0.0.1:12221”)
route {
...
rtpengine_manage(“record-call”);
...
}
Daemon
# rtpengine 
--interface=ext/1.2.3.4 
--listen-ng=127.0.0.1:12221 
--recording-method=pcap 
--recording-dir=/tmp/rtp 
--recording-format=eth
Recording
Expose call data in meta files
to pick up new calls,
Emit RTP via /proc
for further processing,
Read, transcode & store Data
as WAV or MP3
Recording
recorder
metainfo /var/spool/recordings/
/proc/rtpengine/0/calls/
rtpengine
Kamailio
out.wav
/nfs/recordings/Packet
Queue
SIP
RTP
Recording
Kamailio
loadmodule “rtpengine.so”
modparam(“rtpengine”, “rtpengine_sock”,
“udp:127.0.0.1:12221”)
route {
...
rtpengine_manage(“record-call
metadata=uuid:$var(aid)|uuid:$var(bid)”);
...
}
Daemon
# rtpengine 
--interface=ext/1.2.3.4 
--listen-ng=127.0.0.1:12221 
--recording-method=proc 
--recording-dir=/var/spool/rtpengine
Monitoring
Collect and Analyze RTP & RTCP
to calculate MOS
or duplicate to Homer,
Expose to Kamailio on delete
for storing and reporting
Monitoring
Monitoring (Homer)
Kamailio
loadmodule “rtpengine.so”
modparam(“rtpengine”, “rtpengine_sock”,
“udp:127.0.0.1:12221”)
route {
...
rtpengine_manage();
...
}
Daemon
# rtpengine 
--interface=ext/1.2.3.4 
--listen-ng=127.0.0.1:12221 
--homer=10.10.10.5:9060 
--homer-protocol=udp 
--homer-id=99
Monitoring (native)
Kamailio
loadmodule “rtpengine.so”
modparam(“rtpengine”, “rtpengine_sock”,
“udp:127.0.0.1:12221”)
modparam(“rtpengine”, “mos_min_pv”,
“$avp(mos_min)“)
modparam(“rtpengine”, “mos_max_pv”,
“$avp(mos_max)“)
modparam(“rtpengine”, “mos_average_pv”,
“$avp(mos_avg)“)
route {
# invite:
rtpengine_offer();
# session-timer:
rtpengine_query();
# bye:
rtpengine_delete(“to-tag”);
xlog(“L_INFO”, “Call-ID $ci MOS
$avp(mos_min)/$avp(mos_max)/$avp(mos_avg)”);
# curl, acc, db/ndb for further exposure
}
Questions?
<agranig@sipwise.com>

More Related Content

PDF
rtpengine and kamailio - or how to simulate calls at scale
PDF
rtpengine - Media Relaying and Beyond
PDF
Kamailio - SIP Routing in Lua
ODP
Using Asterisk and Kamailio for Reliable, Scalable and Secure Communication S...
PDF
Kamailio, FreeSWITCH, and You
PDF
SIP Attack Handling (Kamailio World 2021)
ODP
Expanding Asterisk with Kamailio
PDF
Kamailio :: A Quick Introduction
rtpengine and kamailio - or how to simulate calls at scale
rtpengine - Media Relaying and Beyond
Kamailio - SIP Routing in Lua
Using Asterisk and Kamailio for Reliable, Scalable and Secure Communication S...
Kamailio, FreeSWITCH, and You
SIP Attack Handling (Kamailio World 2021)
Expanding Asterisk with Kamailio
Kamailio :: A Quick Introduction

What's hot (20)

PDF
Kamailio with Docker and Kubernetes
PDF
Continuous Integration and Kamailio
PPTX
FreeSWITCH as a Kickass SBC
PPTX
Introduction to Kamailio (TADSummit 2020 Asia)
PDF
Three Ways Kamailio Can Help Your FreeSWITCH Deployment
PPTX
Understanding DPDK
PDF
Scaling FreeSWITCH Performance
PPT
Si pp introduction_2
PDF
SIPREC RTPEngine Media Forking
PDF
Getting started with SIP Express Media Server SIP app server and SBC - workshop
PDF
Kamailio - Load Balancing Load Balancers
PDF
IOS Cisco - Cheat sheets
PPTX
Sangoma SBC Training Presentation
PDF
珏7ć›žć‹‰ćŒ·äŒš ăƒăƒƒăƒˆăƒŻăƒŒă‚ŻăźćŸș瀎
PDF
Kamailio on Docker
PDF
DPDK In Depth
PPTX
TRex Realistic Traffic Generator - Stateless support
PPTX
IMS + VoLTE Overview
PDF
Astricon 10 (October 2013) - SIP over WebSocket on Kamailio
PDF
VoLTE Interfaces , Protocols & IMS Stack
Kamailio with Docker and Kubernetes
Continuous Integration and Kamailio
FreeSWITCH as a Kickass SBC
Introduction to Kamailio (TADSummit 2020 Asia)
Three Ways Kamailio Can Help Your FreeSWITCH Deployment
Understanding DPDK
Scaling FreeSWITCH Performance
Si pp introduction_2
SIPREC RTPEngine Media Forking
Getting started with SIP Express Media Server SIP app server and SBC - workshop
Kamailio - Load Balancing Load Balancers
IOS Cisco - Cheat sheets
Sangoma SBC Training Presentation
珏7ć›žć‹‰ćŒ·äŒš ăƒăƒƒăƒˆăƒŻăƒŒă‚ŻăźćŸș瀎
Kamailio on Docker
DPDK In Depth
TRex Realistic Traffic Generator - Stateless support
IMS + VoLTE Overview
Astricon 10 (October 2013) - SIP over WebSocket on Kamailio
VoLTE Interfaces , Protocols & IMS Stack
Ad

Similar to Sipwise rtpengine (20)

PDF
Automate your Kamailio Test Calls - Kamailio World 2024
PDF
Pcapy and dpkt - tcpdump on steroids - Ran Leibman - DevOpsDays Tel Aviv 2018
PDF
The SaltStack Pub Crawl - Fosscomm 2016
ODP
Salt Stack pt. 2 : Configuration Management
PDF
Designing High Performance RTC Signaling Servers
PDF
PLAM 2015 - Evolving Backups Strategy, Devploying pyxbackup
PDF
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
PDF
Puppet Camp NYC 2014: Safely storing secrets and credentials in Git for use b...
 
PDF
Everything you didn't know you needed
PDF
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
 
PDF
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
 
ODP
FOSDEM 2013 - SIP and MSRP over WebSocket in Kamailio
PPTX
Building an Automated Behavioral Malware Analysis Environment using Free and ...
PPT
Fileextraction with suricata
PDF
Tomcat from a cluster to the cloud on RP3
PPT
Ganglia monitoring
PDF
Jitsi Videobridge, Octopodes, and Kotlin
PDF
JavaOne - A Sip Of Java - RJ Auburn
PDF
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
 
PDF
HKNOG 6.0 Next Generation Networks - will automation put us out of jobs?
Automate your Kamailio Test Calls - Kamailio World 2024
Pcapy and dpkt - tcpdump on steroids - Ran Leibman - DevOpsDays Tel Aviv 2018
The SaltStack Pub Crawl - Fosscomm 2016
Salt Stack pt. 2 : Configuration Management
Designing High Performance RTC Signaling Servers
PLAM 2015 - Evolving Backups Strategy, Devploying pyxbackup
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Puppet Camp NYC 2014: Safely storing secrets and credentials in Git for use b...
 
Everything you didn't know you needed
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
 
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
 
FOSDEM 2013 - SIP and MSRP over WebSocket in Kamailio
Building an Automated Behavioral Malware Analysis Environment using Free and ...
Fileextraction with suricata
Tomcat from a cluster to the cloud on RP3
Ganglia monitoring
Jitsi Videobridge, Octopodes, and Kotlin
JavaOne - A Sip Of Java - RJ Auburn
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
 
HKNOG 6.0 Next Generation Networks - will automation put us out of jobs?
Ad

Recently uploaded (20)

PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
Online Work Permit System for Fast Permit Processing
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
AI in Product Development-omnex systems
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
ai tools demonstartion for schools and inter college
PPTX
L1 - Introduction to python Backend.pptx
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
top salesforce developer skills in 2025.pdf
PPT
Introduction Database Management System for Course Database
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
Transform Your Business with a Software ERP System
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Online Work Permit System for Fast Permit Processing
How to Choose the Right IT Partner for Your Business in Malaysia
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
AI in Product Development-omnex systems
Design an Analysis of Algorithms I-SECS-1021-03
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
2025 Textile ERP Trends: SAP, Odoo & Oracle
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
ai tools demonstartion for schools and inter college
L1 - Introduction to python Backend.pptx
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Upgrade and Innovation Strategies for SAP ERP Customers
top salesforce developer skills in 2025.pdf
Introduction Database Management System for Course Database
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Transform Your Business with a Software ERP System
Operating system designcfffgfgggggggvggggggggg
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...

Sipwise rtpengine