• Stars
    star
    411
  • Rank 105,247 (Top 3 %)
  • Language Makefile
  • License
    BSD 2-Clause "Sim...
  • Created over 10 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The RTPproxy is a high-performance software proxy for RTP streams that can work together with Sippy B2BUA, Kamailio, OpenSIPS and SER.

Clean Build@GitHub All-inclusive Build@GitHub Functional Testing@GitHub Glitching@GitHub OSSFuzz@GitHub Docker Image Build@GitHub Coverage Status Coverity

About

The RTPproxy is a extremely reliable and reasonably high-performance software proxy for RTP streams that can work together with OpenSIPS, Kamailio or Sippy B2BUA.

Originally created for handling NAT scenarios, back in 2004-2005, it can also act as a generic real time datagram relay as well as gateway Real-Time Protocol (RTP) sessions between IPv4 and IPv6 networks.

The RTPproxy supports many advanced features and is controllable over multitude of Layer 4 protocols, including Unix Domain, UDP, UDPv6, TCP and TCPv6.

The software allows building scalable distributed SIP networks. The rtpproxy module included into the OpenSIPS or Kamailio SIP Proxy software allows using multiple RTPproxy instances running on remote machines for fault-tolerance and load-balancing purposes.

Advanced high-capacity clustering and load balancing is available through the use of RTP Cluster middleware.

The software also supports MOH/pre-recorded media injection, video relaying and session recording to a local file or remote UDP listener(s). As well as makes available array of real-time or near real-time session counters, both per-session and per-instance.

The RTPproxy has been designed by Maxim Sobolev and now is being actively maintained by the Sippy Software, Inc. With the great help of numerous community contributors, both private and institutional. Not to mention army of robots gracefully dispatched at need by CI.

The original idea has inspired and directly influenced multitude of independent implementations, including but not limited to the Mediaproxy, erlrtpproxy, and most recently RTP Engine, each project focusing on its own area of the vast functionality space.

How it works

This proxy works as follows:

  • When SIP Controller, either proxy or B2BUA, receives INVITE request, it extracts call-id from it and communicates it to the proxy via control channel. Proxy looks for an existing sessions with such id, if the session exists it returns UDP port for that session, if not, then it creates a new session, binds to a first available randomly selected pair of UDP ports and returns number of the first port. After receiving reply from the proxy, SIP Controller replaces media ip:port in the SDP to point to the proxy and forwards request as usually;

  • when SIP Controller receives non-negative SIP reply with SDP it again extracts call-id along with session tags from it and communicates it to the proxy. In this case the proxy does not allocate a new session if it doesn't exist, but simply performs a lookup among existing sessions and returns either a port number if the session is found, or error code indicating that there is no session with such id. After receiving positive reply from the proxy, SIP Controller replaces media ip:port in the SIP reply to point to the proxy and forwards reply as usually;

  • after the session has been created, the proxy listens on the port it has allocated for that session and waits for receiving at least one UDP packet from each of two parties participating in the call. Once such packet is received, the proxy fills one of two ip:port structures associated with each call with source ip:port of that packet. When both structures are filled in, the proxy starts relaying UDP packets between parties;

  • the proxy tracks idle time for each of existing sessions (i.e. the time within which there were no packets relayed), and automatically cleans up a sessions whose idle times exceed the value specified at compile time (60 seconds by default).

Building from github

$ git clone -b master https://github.com/sippy/rtpproxy.git
$ git -C rtpproxy submodule update --init --recursive
$ cd rtpproxy
$ ./configure
$ make

For detailed compilation instructions please check User Manual.

Feedback & Support

Open a ticket on the github issue tracker, or post a message on the mailing list

More Repositories

1

b2bua

Sippy B2BUA is a RFC3261-compliant Session Initiation Protocol (SIP) stack and Back-to-back user agent (B2BUA) server software.
Python
172
star
2

go-b2bua

The GO port of the Sippy B2BUA
Go
65
star
3

voiptests

Meta-repository to test interop between latest versions of opensips, kamailio, sippy b2bua and rtpproxy
Python
43
star
4

rtp_cluster

RTP Cluster is a front-end for multiple RTPproxies
Python
39
star
5

libg722

The ITU G.722 codec, Copyright (C) 2005 Steve Underwood, Copyright (c) CMU 1993 Computer Science, Speech Group Chengxiang Lu and Alex Hauptmann
C
34
star
6

libsinet

A lightweight user land implementation of the UDP/IPv4 stack designed to plug into the netmap framework. The 's' stands for speed.
C
10
star
7

go-rtp_cluster

GoLang version of the rtp_cluster
Go
10
star
8

Infernos

Real-time multi-modal inference server for interacting with humans and other intelligences around
Python
9
star
9

elecirc

SIP-Pecker: Bot to Monitor and Report Status and Availability of SIP Endpoints
5
star
10

vapp

A Python framework to create multilingual IVR applications
Python
5
star
11

hepconnector

Client library to integrate HEPv3 Encapsulation Protocol
C
4
star
12

sip_test_data

Some real-world looking test data and python code to use it.
Python
4
star
13

webrtc_phone

WebRTC -> SIP phone built using Sippy B2BUA and Sippy RTPProxy.
Shell
3
star
14

opensips2019_tutorial

Scrips and configuration files related to the "Advanced RTP media handling using OpenSIPS and RTPProxy: distributed media processing, stream injection, call recording & lawful intercept" tutorial
Roff
3
star
15

librtpsynth

Low-level library optimized to generate/process sequence of the RTP packets.
C
2
star
16

py-xmlrpc

Fast XMLRPC Python Library by Shilad Sen
C
1
star
17

socket_server

UDP socket server that can work as a front-end for multiple Sippy B2BUA processes to hide topology
C
1
star
18

Sippy_Recorder

Example SIP Recorder Server (RFC 7866) build on top of Sippy Python SIP Stack/UA and RTPProxy
Python
1
star