All Projects → havfo → Webrtc To Sip

havfo / Webrtc To Sip

Setup for a WEBRTC client and Kamailio server to call SIP clients

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Webrtc To Sip

Routr
Routr: Next-generation SIP Server
Stars: ✭ 788 (+355.49%)
Mutual labels:  sip, webrtc
Giggle
📞 Giggle Jingle library for XMPP, implementation of XEP-0166.
Stars: ✭ 55 (-68.21%)
Mutual labels:  sip, webrtc
Baresip
Baresip is a modular SIP User-Agent with audio and video support
Stars: ✭ 817 (+372.25%)
Mutual labels:  sip, webrtc
Gb28181.solution
Linux/Win/Docker/kubernetes/Chart/Kustomize/GB28181/SIP/RTP/SDP/WebRTC/作为上下级域/平台级联互联
Stars: ✭ 323 (+86.71%)
Mutual labels:  sip, webrtc
Browser Phone
A fully featured browser based WebRTC SIP phone for Asterisk
Stars: ✭ 95 (-45.09%)
Mutual labels:  sip, webrtc
Re
Generic library for real-time communications with async IO support
Stars: ✭ 444 (+156.65%)
Mutual labels:  sip, webrtc
Vialer Js
Pluggable WebRTC softphone and communication platform.
Stars: ✭ 988 (+471.1%)
Mutual labels:  sip, webrtc
mumsi
SIP to Mumble gateway/bridge using PJSUA stack.
Stars: ✭ 33 (-80.92%)
Mutual labels:  sip, bridge
Sip.js
A simple, intuitive, and powerful JavaScript signaling library
Stars: ✭ 1,282 (+641.04%)
Mutual labels:  sip, webrtc
Freeswitch
FreeSWITCH is a Software Defined Telecom Stack enabling the digital transformation from proprietary telecom switches to a versatile software implementation that runs on any commodity hardware. From a Raspberry PI to a multi-core server, FreeSWITCH can unlock the telecommunications potential of any device.
Stars: ✭ 1,213 (+601.16%)
Mutual labels:  sip, webrtc
sbcOS
Barebone Opensource Powered SBC
Stars: ✭ 59 (-65.9%)
Mutual labels:  sip, webrtc
Restcomm Android Sdk
Android Mobile SDK to easily integrate communication features (WebRTC, messaging, presence, voice, video, screensharing) based on RestComm into native Mobile Applications
Stars: ✭ 139 (-19.65%)
Mutual labels:  sip, webrtc
visual-ts-game-engine
Typescript project based on matter.ts implementation."This version 2 of visualjs game engine, totally different approach. Whole project is based fully dependency build. Main file is app.ts and ioc.ts. Class ioc saves singleton instances also bind. In this project html and css is also present, webpack helps and handle this type of files. GamePlay…
Stars: ✭ 15 (-91.33%)
Mutual labels:  sip, webrtc
Sipsorcery
A WebRTC, SIP and VoIP library for C# and .NET Core. Designed for real-time communications apps.
Stars: ✭ 449 (+159.54%)
Mutual labels:  sip, webrtc
sdp
A Go implementation of the SDP
Stars: ✭ 89 (-48.55%)
Mutual labels:  sip, webrtc
Homer
HOMER - 100% Open-Source SIP / VoIP Packet Capture & Monitoring
Stars: ✭ 855 (+394.22%)
Mutual labels:  sip, webrtc
Flutter Webrtc
WebRTC plugin for Flutter Mobile/Desktop/Web
Stars: ✭ 2,764 (+1497.69%)
Mutual labels:  sip, webrtc
Siprtcproxy
网关服务:Sip与Rtc互通,实现Web,Android,iOS,小程序,SIP座机,PSTN电话,手机互通。
Stars: ✭ 217 (+25.43%)
Mutual labels:  sip, webrtc
Pade
Pàdé (Yoruba word for Meet) is a browser extension (Chrome/Edge) based unified communications desktop client for Openfire.
Stars: ✭ 72 (-58.38%)
Mutual labels:  sip, webrtc
Kamailio
Kamailio - The Open Source SIP Server for large VoIP and real-time communication platforms -
Stars: ✭ 1,358 (+684.97%)
Mutual labels:  sip, webrtc

WEBRTC to SIP client and server

How to setup Kamailio + RTPEngine + TURN server to enable calling between WebRTC client and legacy SIP clients. This config is IPv6 enabled by default. This setup will bridge SRTP --> RTP and ICE --> nonICE to make a WebRTC client (sip.js) be able to call legacy SIP clients. The WebRTC client can be found here.

This setup is for Debian 10 Buster.

This setup is configured to run with the following services:

  • Kamailio + RTPEngine + Nginx (proxy + WebRTC client) + coturn

The configuration is setup to always bridge via RTPEngine. To change the behavior, take a look in the NATMANAGE route.

Architecture

WebRTC - SIP architecture

Get certificates

For the certificates you need, a simple solution is Let's Encrypt certificates. They will work for both Kamailio TLS, Nginx TLS and TURN TLS. Run the following (you must stop services running on port 443 during certificate request/renewal):

apt-get install certbot
certbot certonly --standalone -d YOUR-DOMAIN

You will then find the certificates under:

/etc/letsencrypt/live/YOUR-DOMAIN/privkey.pem
/etc/letsencrypt/live/YOUR-DOMAIN/fullchain.pem

Get configuration files

All files needed to setup all components on Debian 9 Stretch.

git clone https://github.com/havfo/WEBRTC-to-SIP.git
cd WEBRTC-to-SIP
find . -type f -print0 | xargs -0 sed -i 's/XXXXXX-XXXXXX/PUT-IPV6-OF-YOUR-SIP-SERVER-HERE/g'
find . -type f -print0 | xargs -0 sed -i 's/XXXXX-XXXXX/PUT-IPV4-OF-YOUR-SIP-SERVER-HERE/g'
find . -type f -print0 | xargs -0 sed -i 's/XXXX-XXXX/PUT-DOMAIN-OF-YOUR-SIP-SERVER-HERE/g'

Install RTPEngine

This will do the SRTP-RTP bridging needed to make WebRTC clients talk to legacy SIP server/clients. You can find the latest build instructions in their readme.

The easiest way of installing is to get it from Sipwise repository:

echo 'deb https://deb.sipwise.com/spce/mr8.5.1/ buster main' > /etc/apt/sources.list.d/sipwise.list
echo 'deb-src https://deb.sipwise.com/spce/mr8.5.1/ buster main' >> /etc/apt/sources.list.d/sipwise.list
wget -q -O - https://deb.sipwise.com/spce/sipwise.gpg | apt-key add -
apt-get update
apt-get install -y ngcp-keyring ngcp-rtpengine

After you have successfully installed RTPEngine, copy the configuration from this repository.

cd WEBRTC-to-SIP
cp etc/default/ngcp-rtpengine-daemon /etc/default/
cp etc/rtpengine/rtpengine.conf /etc/rtpengine/
/etc/init.d/ngcp-rtpengine-daemon restart

Install IPTables firewall (optional)

RTPEngine handles the chain for itself, but make sure to not block the RTP-ports it is using. Take a look in iptables.sh for details, and apply it by doing the following. This will persist after reboot. You can run the iptables.sh script at any time after it is set up.

cd WEBRTC-to-SIP
chmod +x iptables.sh
cp etc/network/if-up.d/iptables /etc/network/if-up.d/
chmod +x /etc/network/if-up.d/iptables
touch /etc/iptables/firewall.conf
touch /etc/iptables/firewall6.conf
./iptables.sh

Install Kamailio

apt-get install kamailio kamailio-websocket-modules kamailio-mysql-modules kamailio-tls-modules kamailio-presence-modules mysql-server
cd WEBRTC-to-SIP
cp etc/kamailio/* /etc/kamailio/
kamdbctl create

Select yes (Y) to all options.

kamctl add websip websip
service kamailio restart

Install WebRTC client

This will install the client that can be found here.

To be able to support running HTTP(S) and TURN on the same port (443), we need a newer version of nginx that supports streams the way we need. Get it from official repo:

echo 'deb http://nginx.org/packages/mainline/debian/ buster nginx' > /etc/apt/sources.list.d/nginx.list
curl -fsSL https://nginx.org/keys/nginx_signing.key | apt-key add -
apt-get update
apt-get install nginx
cd WEBRTC-to-SIP
cp etc/nginx/nginx.conf /etc/nginx/
cp etc/nginx/conf.d/default.conf /etc/nginx/conf.d/
cp -r client/* /var/www/html/
service nginx restart

Install TURN server

apt-get install coturn
cp etc/default/coturn /etc/default/
cp etc/turnserver.conf /etc/
service coturn restart

Testing

You should now be able to go to https://XXXX-XXXX/ and call legacy SIP clients. Click the account icon in the top right corner and add the following settings:

  • Display name: Whatever
  • SIP URI: [email protected]
  • Password: websip
  • Outbound Proxy: wss://XXXX-XXXX/ws

To manually configure other TURN servers, change the config in client/config.js.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].