All Projects → daimoc → Kurento-SIP-GW

daimoc / Kurento-SIP-GW

Licence: Apache-2.0 license
No description or website provided.

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects
shell
77523 projects
Batchfile
5799 projects

Projects that are alternatives of or similar to Kurento-SIP-GW

gateway
API proxy gateway base on netty and okHttp.
Stars: ✭ 21 (-34.37%)
Mutual labels:  gateway
RAK831-Zero
Pi Zero RAK831 Adapter board
Stars: ✭ 98 (+206.25%)
Mutual labels:  gateway
laravel-viva-payments
A Laravel package for integrating the Viva Payments gateway
Stars: ✭ 29 (-9.37%)
Mutual labels:  gateway
QuickStart-admin-Cloud
基于spring boot 2.0.8 目前集成了spring security oauth2 (server and client)、springboot-admin、openfeign、hystrix,zuul(后续会替换成gateway),config.....等组件
Stars: ✭ 25 (-21.87%)
Mutual labels:  gateway
microservices-v9
Learn Microservices with Spring Boot - v9
Stars: ✭ 40 (+25%)
Mutual labels:  gateway
emerald-web3-gateway
The Web3 Gateway for the Oasis Emerald ParaTime.
Stars: ✭ 19 (-40.62%)
Mutual labels:  gateway
safe-client-gateway
Gateway service for Safe apps that serves transaction data conforming with the UI of our mobile apps
Stars: ✭ 33 (+3.13%)
Mutual labels:  gateway
ibeam
IBeam is an authentication and maintenance tool used for the Interactive Brokers Client Portal Web API Gateway.
Stars: ✭ 244 (+662.5%)
Mutual labels:  gateway
mbed-edge
The Mbed Edge
Stars: ✭ 24 (-25%)
Mutual labels:  gateway
piccolo
Netty4长连接网关
Stars: ✭ 19 (-40.62%)
Mutual labels:  gateway
LoraGW-Setup
SX1301 Lora Concentrator Raspberry PI based gateway setup
Stars: ✭ 70 (+118.75%)
Mutual labels:  gateway
scimgateway
Using SCIM protocol as a gateway for user provisioning to other endpoints
Stars: ✭ 98 (+206.25%)
Mutual labels:  gateway
laravel-hyperpay
Laravel package for Hyperpay payment gateway in MENA.
Stars: ✭ 14 (-56.25%)
Mutual labels:  gateway
SerialToTCPBridgeProtocol
An error tolerant serial UART to TCP connection, raw data bridge.
Stars: ✭ 16 (-50%)
Mutual labels:  gateway
gnatsd-gw
A utility pkg make it easy to write a gateway in front of gnatsd with middlewares
Stars: ✭ 16 (-50%)
Mutual labels:  gateway
PSAVanCanBridge
VAN - CAN protocol bridge (V2C) for cars made by PSA Group (Peugeot, Citroen)
Stars: ✭ 67 (+109.38%)
Mutual labels:  gateway
torbox
Container-based Tor access point (Anonymizing Middlebox).
Stars: ✭ 52 (+62.5%)
Mutual labels:  gateway
graphql-gateway
SDL-based GraphQL gateway for REST and GraphQL-based micro-services
Stars: ✭ 55 (+71.88%)
Mutual labels:  gateway
Consul.ServiceDiscovery.Demo
This demo shows how to implement simple containerized (Docker) microservice architecture with gateway, load balancer (Ocelot) and automatic service discovery (Consul).
Stars: ✭ 24 (-25%)
Mutual labels:  gateway
gateway.js
The gateway to Discord.
Stars: ✭ 23 (-28.12%)
Mutual labels:  gateway

Synopsis

This project is a basic WebRTC to SIP gateway. It uses drachtio for SIP signaling and Kurento for the Media Server. This node application was made using Kurent-tutorial-node/helloworld. Html client UI is made using Login/Logout Animation Concept by Nikolay Talanov http://codepen.io/suez/pen/dPqxoM.

Motivation

This gateway was made to easily connect a browser to any classic SIP endpoint like Softphone, PABX or MCU. It was firstly designed to work with Asterisk and it works with it.

Architecture

Kurento-SIP-GW architecture

Installation on Ubuntu 18.04

First, install Kurento-media-server (with a coturn server it's better) :

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5AFA7A83
source /etc/upstream-release/lsb-release 2>/dev/null || source /etc/lsb-release

sudo tee "/etc/apt/sources.list.d/kurento.list" >/dev/null <<EOF
# Kurento Media Server - Release packages
deb [arch=amd64] http://ubuntu.openvidu.io/6.15.0 bionic kms6
EOF

sudo apt-get update && sudo apt-get install --no-install-recommends --yes \
    kurento-media-server

Now, install coturn

sudo apt-get install coturn

Edit cotrun startup script /etc/init.d/coturn

  • If you're behind a NAT add :
EXTERNAL_IP=$(curl http://169.254.169.254/latest/meta-data/public-ipv4)
LOCAL_IP=$(curl http://169.254.169.254/latest/meta-data/local-ipv4)

DAEMON_ARGS="-c /etc/turnserver.conf -f -o -a -v -r kurento.org
-u kurento:kurento --no-stdout-log --external-ip $EXTERNAL_IP/$LOCAL_IP"

Next, install drachtio-server :

Note : we must install devlop branch to support sip info.

sudo apt-get install autoconf automake libtool-bin g++ libcurl4-openssl-dev libssl-dev
git clone --depth=50 --branch=develop git://github.com/davehorton/drachtio-server.git && cd drachtio-server
git submodule update --init --recursive
./bootstrap.sh
mkdir build && cd $_
../configure CPPFLAGS='-DNDEBUG'
make
sudo make install
# Put Drachtio as a Deamon service with sytemd
cp drachtio-server.service /etc/systemd/system
# Put Drachtio as a Deamon service with init.d
cp drachtio-init-script /etc/systemd/system


cd ../..
cp drachtio-conf.xml /etc

#start service
service drachtio-server start
#or
service drachtio-init-script start

Install nodejs 8 LTS vesion :

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs

And finally, install node modules :

npm install

Server Configuration

Change config.serverPublicIP in file config.js to expose external public IP used for SIP sdp generation.

  • config.kurento.as_uri is for HTTPS node server, default=8443.
  • config.kurento.ws_uri is for Kurento-media-sever uri, default='ws://localhost:8888/kurento'
  • config.maxCallSeconds is for Call time limitation to control and limit long call usage (Demo server is limited to 60 seconds calls)
  • config.maxConcurentCalls is for limiting max concurrent call on a server.

Client Configuration

Change client gateway option in static/js/config_client.js

  • wsUrl : Kurneto-SIP-GW websocket server URL (default to 'wss://' + location.host + '/sip-gw' ).

  • dtmfTransport : "inband" for audio inband DTMF || "sip" for SIP INFO dtmf (Default to inband).

  • renegotiateMode : set how SIP calls deals with remote re-invite

    • none = only reply to SIP but not change anything in media stack
    • rtp = restart the rtp connection part on media stack (default value)
    • rtp-webrtc = restart the rtp connection part on media stack and restart the peerconnectino on browser part

To run

node server.js

Open https://localhost:8443/ and fill a userName and a destination number like [email protected] and click on Start Call.

Kurento-SIP-GW will send an invite to destination and connect media after call accept by remote end.

Reduce CPU usage by disabling H264 encoding in Kurento

By removing VP8 support in Kurento server configuration you can disable h264 encoding and reduce CPU usage by a factor 4 (from 40% to 10% of 1 core on a i7-7820HQ CPU per call).

Take care that removing transcoding in Kurento add some stability issues (Maybe due to keyframe generation on browser side).

First install openh264 gstreamer plugin

sudo apt-get install openh264-gst-plugins-bad-1.5

Then remove vp8 from /etc/kurento/modules/kurento/SdpEndpoint.conf.json by commenting VP8 line "name" : "VP8/90000" in VideoCodecs Array.

Restart Kurento

sudo kurent-mediaserver-6.0 restart

Tested with

  • Linphone
  • Asterisk 11 video echo diaplan application
  • Scopia Elite 6000 Series MCU - Avaya
  • Cisco MSE 8000 Series MCU

Current Limitations

  • Only a SIP inviter to other endpoint
  • No STUN/TURN/ICE support on SIP/RTP side
  • DTMF sending only not receiving

Roadmap

  1. Provide Demo ready server (still waiting purchasing department agreement....)
  2. Codec selection
  3. Call control API and administrator UI
  4. Build unit Test

Not planified yet :

  1. Run load Test
  2. Add RFC 4733 DTMF sending support
  3. Add SIP REGISTER
  4. Add incoming call support

Contributors

Damien Fétis

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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].