SlideShare a Scribd company logo
1 of 21
Download to read offline
SIP AND MSRP OVER WEBSOCKET
1
SIP and MSRP over WebSocket in Kamailio

SIP and MSRP over WebSocket in Kamailio
Peter Dunkley, Technical Director, Crocodile RCS Ltd

Email:
Twitter:

peter.dunkley@crocodile-rcs.com
@pdunkley
What is WebRTC?
●

WebRTC is about media
–

–

SDP

–

RTP/SAVPF

–

ICE

–
●

PeerConnection, GetUserMedia, MediaStreams,
and DataChannel

Codecs (G.711, OPUS, H.264 vs VP8)

It doesn't help with the signalling part of the
trapezoid/triangle
The trapezoid/triangle

Signalling

Server

Sig
nal
ling

Server

Browser

WebRTC media or DataChannel

Browser
What is WebSocket?
●

●

Safe, client-originated, connection to servers
Often used from web-browsers - but does not
have to be

●

It is an asynchronous protocol

●

Traffic from the client is masked

●

●

Although carried over TCP WebSocket is a
frame based protocol
RFC 6455, “The WebSocket Protocol”
WebSocket framing
●

RFC 6455, section 5.2
0
1
2
3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-------+-+-------------+-------------------------------+
|F|R|R|R| opcode|M| Payload len |
Extended payload length
|
|I|S|S|S| (4) |A|
(7)
|
(16/64)
|
|N|V|V|V|
|S|
|
(if payload len==126/127)
|
| |1|2|3|
|K|
|
|
+-+-+-+-+-------+-+-------------+ - - - - - - - - - - - - - - - +
|
Extended payload length continued, if payload len == 127 |
+ - - - - - - - - - - - - - - - +-------------------------------+
|
|Masking-key, if MASK set to 1 |
+-------------------------------+-------------------------------+
| Masking-key (continued)
|
Payload Data
|
+-------------------------------- - - - - - - - - - - - - - - - +
:
Payload Data continued ...
:
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
|
Payload Data continued ...
|
+---------------------------------------------------------------+
SIP over WebSocket
(draft-ietf-sipcore-sip-websocket)
●

Why use SIP?
–

It's the “Session Initiation Protocol”

–

Islands are good but you don't want to be marooned

–

Many regulatory issues already dealt with
●
●
●

–

Billing
CALEA/LI
Privacy

It's taken almost 10 years to sort out the SIP issues.
Why start from scratch and make the same
mistakes all over again?
SIP over WebSocket
(draft-ietf-sipcore-sip-websocket)
●

WebSocket has limitations
–

●

You can't know your local IP address

Use SIP Outbound (RFC 5626)
–

Sorts out NAT traversal issues

–

Separates Edge Proxy (client connection and
network protection) from Registrar and dynamic
routing logic

–

SIP Outbound uses GRUU (RFC 5627) to identify
User Agents and Path (RFC 3327) to enable clients
to use Registrars that are not their first-hop
SIP over WebSocket
(draft-ietf-sipcore-sip-websocket)
●

Open-source server implementations
–

●

Asterisk, Kamailio, OverSIP, reSIProcate

Open-source client implementations
–

JAIN SIP JavaScript

–

JsSIP

–

QoffeeSIP

–

sipML5
MSRP over WebSocket
(draft-pd-dispatch-msrp-websocket)
●

Why use MSRP over WebSocket?
–
–

●

It's a natural companion to SIP
Can be used for IM, file transfer, or any other data
streaming you need

WebSocket limitations
–

●

Same as SIP

Use an MSRP Relay (RFC 4976)
–

Sorts out NAT traversal issues
MSRP over WebSocket
(draft-pd-dispatch-msrp-websocket)
●

Open-source server implementations
–

●

Kamailio

Open-source client implementations
–

Crocodile MSRP
Kamailio support
●

The following modules enable you to use SIP
and MSRP over WebSocket in Kamailio
–
–

●

msrp

–
●

websocket
nathelper or outbound

nathelper based example configuration is in the
source tree “examples/websocket.cfg”
outbound based example configuration TBD
Kamailio configuration
●

Handle WebSocket handshake using 
event_route[xhttp:request]

event_route[xhttp:request] {
set_reply_close();
set_reply_no_connect();
if ($hdr(Upgrade)=~"websocket"
&& $hdr(Connection)=~"Upgrade"
&& $rm=~"GET") {
# Validate as required (Host:, Origin:, Cookie:) and perform
# HTTP authentication if required
if (ws_handle_handshake())
exit;
}
xhttp_reply("404", "Not Found", "", "");
}
Demo
The demo is built on the Crocodile SDK
●

●

●

Open source Javascript library for real-time
communication
Web API for provisioning and third-party
website integration
Free-to-use SIP and MSRP network
Crocodile Javascript library example
<html>
<script src="http://www.example.com/jquery.crocsdk.js"></script>
<script>
$(document).ready(function(){
  var croc = $.croc({
    apiKey: "1dsku21#4598­21wks8=",
  });
  var session = croc.media.connect("sip:bob@example.com");
  session.remoteAudioElement = $('#audio');
})
</script>
<body>
  <audio id="audio" />
</body>
</html>
Crocodile Javascript library components
●

JsSIP (Javascript stack)
–
–

●

Best-of-breed
Easily to extend (good object model)

Crocodile MSRP Client (Javascript stack)
–

Similar object model to JsSIP

–

Known to work with JsSIP (with JsSIP.Session
overridden)
Crocodile Javascript library architecture

Web App

Crocodile SDK
(jQuery Plugin)

SIP Stack
(JsSIP)

jQuery

MSRP Stack
(Crocodile)

Browser

SIP
over
Websockets

MSRP
over
Websockets

WebRTC
Crocodile network
●

Cloud based (Amazon EC2)

●

Kamailio core
–
–

SIP Proxy/Registrar

–
●

SIP Outbound Edge Proxy (SIP over WebSocket)
MSRP Relay (MSRP over WebSocket)

Other open-source platforms used for
–

STUN/TURN servers

–

Accounting/Billing

–

Media gateway
Network and SDK Launch on 22 May 2013
●

Launch event at Google Campus, London
Crocodile RCS Ltd
www.crocodile-rcs.com

More Related Content

What's hot

Using SmartNICs to Provide Better Data Center Security - Jack Matheson - 44CO...
Using SmartNICs to Provide Better Data Center Security - Jack Matheson - 44CO...Using SmartNICs to Provide Better Data Center Security - Jack Matheson - 44CO...
Using SmartNICs to Provide Better Data Center Security - Jack Matheson - 44CO...44CON
 
ciso-platform-annual-summit-2013-Fgont-ipv6-myths-dynamic
ciso-platform-annual-summit-2013-Fgont-ipv6-myths-dynamicciso-platform-annual-summit-2013-Fgont-ipv6-myths-dynamic
ciso-platform-annual-summit-2013-Fgont-ipv6-myths-dynamicPriyanka Aash
 
WebRTC standards update - November 2014
WebRTC standards update - November 2014WebRTC standards update - November 2014
WebRTC standards update - November 2014Victor Pascual Ávila
 
Cisco - OpenStack Summit 2016/Red Hat NFV Mini Summit
Cisco - OpenStack Summit 2016/Red Hat NFV Mini Summit Cisco - OpenStack Summit 2016/Red Hat NFV Mini Summit
Cisco - OpenStack Summit 2016/Red Hat NFV Mini Summit kimw001
 
WebRTC Overview
WebRTC OverviewWebRTC Overview
WebRTC OverviewArin Sime
 
IPv6 SenD
IPv6 SenDIPv6 SenD
IPv6 SenDrabdoul
 
Building a WiFi Hotspot with NodeJS: Cisco Meraki - ExCap API
Building a WiFi Hotspot with NodeJS: Cisco Meraki - ExCap APIBuilding a WiFi Hotspot with NodeJS: Cisco Meraki - ExCap API
Building a WiFi Hotspot with NodeJS: Cisco Meraki - ExCap APICisco DevNet
 
F5 Networks - - OpenStack Summit 2016/Red Hat NFV Mini Summit
F5 Networks -  - OpenStack Summit 2016/Red Hat NFV Mini SummitF5 Networks -  - OpenStack Summit 2016/Red Hat NFV Mini Summit
F5 Networks - - OpenStack Summit 2016/Red Hat NFV Mini Summitkimw001
 
Model-driven Telemetry: The Foundation of Big Data Analytics
Model-driven Telemetry: The Foundation of Big Data AnalyticsModel-driven Telemetry: The Foundation of Big Data Analytics
Model-driven Telemetry: The Foundation of Big Data AnalyticsCisco Canada
 
FIWARE Wednesday Webinars - The Use of DDS Middleware in Robotics (Part 2)
FIWARE Wednesday Webinars - The Use of DDS Middleware in Robotics (Part 2)FIWARE Wednesday Webinars - The Use of DDS Middleware in Robotics (Part 2)
FIWARE Wednesday Webinars - The Use of DDS Middleware in Robotics (Part 2)FIWARE
 
WebRTC and Telehealth
WebRTC and TelehealthWebRTC and Telehealth
WebRTC and TelehealthArin Sime
 
Web rtc 핵심 기술에 대한 이해
Web rtc 핵심 기술에 대한 이해Web rtc 핵심 기술에 대한 이해
Web rtc 핵심 기술에 대한 이해Dahyun Kim
 
pfSense presentation
pfSense presentationpfSense presentation
pfSense presentationSimon Vass
 
Decrypting and Selectively Inspecting Modern Traffic
Decrypting and Selectively Inspecting Modern TrafficDecrypting and Selectively Inspecting Modern Traffic
Decrypting and Selectively Inspecting Modern TrafficShain Singh
 
Webinar: Customer Scale
Webinar: Customer ScaleWebinar: Customer Scale
Webinar: Customer ScaleForgeRock
 
Presentación Red Hat evento NFV movilforum
Presentación Red Hat evento NFV movilforumPresentación Red Hat evento NFV movilforum
Presentación Red Hat evento NFV movilforumvideos
 

What's hot (16)

Using SmartNICs to Provide Better Data Center Security - Jack Matheson - 44CO...
Using SmartNICs to Provide Better Data Center Security - Jack Matheson - 44CO...Using SmartNICs to Provide Better Data Center Security - Jack Matheson - 44CO...
Using SmartNICs to Provide Better Data Center Security - Jack Matheson - 44CO...
 
ciso-platform-annual-summit-2013-Fgont-ipv6-myths-dynamic
ciso-platform-annual-summit-2013-Fgont-ipv6-myths-dynamicciso-platform-annual-summit-2013-Fgont-ipv6-myths-dynamic
ciso-platform-annual-summit-2013-Fgont-ipv6-myths-dynamic
 
WebRTC standards update - November 2014
WebRTC standards update - November 2014WebRTC standards update - November 2014
WebRTC standards update - November 2014
 
Cisco - OpenStack Summit 2016/Red Hat NFV Mini Summit
Cisco - OpenStack Summit 2016/Red Hat NFV Mini Summit Cisco - OpenStack Summit 2016/Red Hat NFV Mini Summit
Cisco - OpenStack Summit 2016/Red Hat NFV Mini Summit
 
WebRTC Overview
WebRTC OverviewWebRTC Overview
WebRTC Overview
 
IPv6 SenD
IPv6 SenDIPv6 SenD
IPv6 SenD
 
Building a WiFi Hotspot with NodeJS: Cisco Meraki - ExCap API
Building a WiFi Hotspot with NodeJS: Cisco Meraki - ExCap APIBuilding a WiFi Hotspot with NodeJS: Cisco Meraki - ExCap API
Building a WiFi Hotspot with NodeJS: Cisco Meraki - ExCap API
 
F5 Networks - - OpenStack Summit 2016/Red Hat NFV Mini Summit
F5 Networks -  - OpenStack Summit 2016/Red Hat NFV Mini SummitF5 Networks -  - OpenStack Summit 2016/Red Hat NFV Mini Summit
F5 Networks - - OpenStack Summit 2016/Red Hat NFV Mini Summit
 
Model-driven Telemetry: The Foundation of Big Data Analytics
Model-driven Telemetry: The Foundation of Big Data AnalyticsModel-driven Telemetry: The Foundation of Big Data Analytics
Model-driven Telemetry: The Foundation of Big Data Analytics
 
FIWARE Wednesday Webinars - The Use of DDS Middleware in Robotics (Part 2)
FIWARE Wednesday Webinars - The Use of DDS Middleware in Robotics (Part 2)FIWARE Wednesday Webinars - The Use of DDS Middleware in Robotics (Part 2)
FIWARE Wednesday Webinars - The Use of DDS Middleware in Robotics (Part 2)
 
WebRTC and Telehealth
WebRTC and TelehealthWebRTC and Telehealth
WebRTC and Telehealth
 
Web rtc 핵심 기술에 대한 이해
Web rtc 핵심 기술에 대한 이해Web rtc 핵심 기술에 대한 이해
Web rtc 핵심 기술에 대한 이해
 
pfSense presentation
pfSense presentationpfSense presentation
pfSense presentation
 
Decrypting and Selectively Inspecting Modern Traffic
Decrypting and Selectively Inspecting Modern TrafficDecrypting and Selectively Inspecting Modern Traffic
Decrypting and Selectively Inspecting Modern Traffic
 
Webinar: Customer Scale
Webinar: Customer ScaleWebinar: Customer Scale
Webinar: Customer Scale
 
Presentación Red Hat evento NFV movilforum
Presentación Red Hat evento NFV movilforumPresentación Red Hat evento NFV movilforum
Presentación Red Hat evento NFV movilforum
 

Similar to Kamailio World 2013 - SIP and MSRP over WebSocket

PLNOG15: Practical deployments of Kea, a high performance scalable DHCP - Tom...
PLNOG15: Practical deployments of Kea, a high performance scalable DHCP - Tom...PLNOG15: Practical deployments of Kea, a high performance scalable DHCP - Tom...
PLNOG15: Practical deployments of Kea, a high performance scalable DHCP - Tom...PROIDEA
 
An hour with WebRTC FIC UDC
An hour with WebRTC FIC UDCAn hour with WebRTC FIC UDC
An hour with WebRTC FIC UDCQuobis
 
DPDK summit 2015: It's kind of fun to do the impossible with DPDK
DPDK summit 2015: It's kind of fun  to do the impossible with DPDKDPDK summit 2015: It's kind of fun  to do the impossible with DPDK
DPDK summit 2015: It's kind of fun to do the impossible with DPDKLagopus SDN/OpenFlow switch
 
DPDK Summit 2015 - NTT - Yoshihiro Nakajima
DPDK Summit 2015 - NTT - Yoshihiro NakajimaDPDK Summit 2015 - NTT - Yoshihiro Nakajima
DPDK Summit 2015 - NTT - Yoshihiro NakajimaJim St. Leger
 
Upperside Webinar- WebRTC from the service provider prism-final
Upperside Webinar- WebRTC from the service provider prism-finalUpperside Webinar- WebRTC from the service provider prism-final
Upperside Webinar- WebRTC from the service provider prism-finalAmir Zmora
 
Achieving Network Deployment Flexibility with Mirantis OpenStack
Achieving Network Deployment Flexibility with Mirantis OpenStackAchieving Network Deployment Flexibility with Mirantis OpenStack
Achieving Network Deployment Flexibility with Mirantis OpenStackEric Zhaohui Ji
 
Implementation Lessons using WebRTC in Asterisk
Implementation Lessons using WebRTC in AsteriskImplementation Lessons using WebRTC in Asterisk
Implementation Lessons using WebRTC in AsteriskMoises Silva
 
Cisco's Open Device Programmability Strategy: Open Discussion
Cisco's Open Device Programmability Strategy: Open DiscussionCisco's Open Device Programmability Strategy: Open Discussion
Cisco's Open Device Programmability Strategy: Open DiscussionCisco DevNet
 
65% Performance Gains at Cryptocurrency Platform CoinGecko: An Argo Smart Rou...
65% Performance Gains at Cryptocurrency Platform CoinGecko: An Argo Smart Rou...65% Performance Gains at Cryptocurrency Platform CoinGecko: An Argo Smart Rou...
65% Performance Gains at Cryptocurrency Platform CoinGecko: An Argo Smart Rou...Cloudflare
 
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE Global Summit - Real-time Media Stream Processing Using KurentoFIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE Global Summit - Real-time Media Stream Processing Using KurentoFIWARE
 
IPv6 Security - Myths and Reality
IPv6 Security - Myths and RealityIPv6 Security - Myths and Reality
IPv6 Security - Myths and RealitySwiss IPv6 Council
 
Panel with IPv6 CE Vendors
Panel with IPv6 CE VendorsPanel with IPv6 CE Vendors
Panel with IPv6 CE VendorsAPNIC
 
Workshop web rtc customers and use cases
Workshop web rtc customers and use casesWorkshop web rtc customers and use cases
Workshop web rtc customers and use casesDouglas Tait
 
Approaching hyperconvergedopenstack
Approaching hyperconvergedopenstackApproaching hyperconvergedopenstack
Approaching hyperconvergedopenstackIkuo Kumagai
 

Similar to Kamailio World 2013 - SIP and MSRP over WebSocket (20)

ITSPA May 2013 - WebRTC, TURN, and WebSocket
ITSPA May 2013 - WebRTC, TURN, and WebSocketITSPA May 2013 - WebRTC, TURN, and WebSocket
ITSPA May 2013 - WebRTC, TURN, and WebSocket
 
Astricon 10 (October 2013) - SIP over WebSocket on Kamailio
Astricon 10 (October 2013) - SIP over WebSocket on KamailioAstricon 10 (October 2013) - SIP over WebSocket on Kamailio
Astricon 10 (October 2013) - SIP over WebSocket on Kamailio
 
WebRTC Summit November 2013 - WebRTC Interoperability (and why it is important)
WebRTC Summit November 2013 - WebRTC Interoperability (and why it is important)WebRTC Summit November 2013 - WebRTC Interoperability (and why it is important)
WebRTC Summit November 2013 - WebRTC Interoperability (and why it is important)
 
PLNOG15: Practical deployments of Kea, a high performance scalable DHCP - Tom...
PLNOG15: Practical deployments of Kea, a high performance scalable DHCP - Tom...PLNOG15: Practical deployments of Kea, a high performance scalable DHCP - Tom...
PLNOG15: Practical deployments of Kea, a high performance scalable DHCP - Tom...
 
An hour with WebRTC FIC UDC
An hour with WebRTC FIC UDCAn hour with WebRTC FIC UDC
An hour with WebRTC FIC UDC
 
WebRTC eduCONF
WebRTC eduCONFWebRTC eduCONF
WebRTC eduCONF
 
DevCon 5 (July 2013) - WebSockets
DevCon 5 (July 2013) - WebSocketsDevCon 5 (July 2013) - WebSockets
DevCon 5 (July 2013) - WebSockets
 
Open v ran
Open v ranOpen v ran
Open v ran
 
DPDK summit 2015: It's kind of fun to do the impossible with DPDK
DPDK summit 2015: It's kind of fun  to do the impossible with DPDKDPDK summit 2015: It's kind of fun  to do the impossible with DPDK
DPDK summit 2015: It's kind of fun to do the impossible with DPDK
 
DPDK Summit 2015 - NTT - Yoshihiro Nakajima
DPDK Summit 2015 - NTT - Yoshihiro NakajimaDPDK Summit 2015 - NTT - Yoshihiro Nakajima
DPDK Summit 2015 - NTT - Yoshihiro Nakajima
 
Upperside Webinar- WebRTC from the service provider prism-final
Upperside Webinar- WebRTC from the service provider prism-finalUpperside Webinar- WebRTC from the service provider prism-final
Upperside Webinar- WebRTC from the service provider prism-final
 
Achieving Network Deployment Flexibility with Mirantis OpenStack
Achieving Network Deployment Flexibility with Mirantis OpenStackAchieving Network Deployment Flexibility with Mirantis OpenStack
Achieving Network Deployment Flexibility with Mirantis OpenStack
 
Implementation Lessons using WebRTC in Asterisk
Implementation Lessons using WebRTC in AsteriskImplementation Lessons using WebRTC in Asterisk
Implementation Lessons using WebRTC in Asterisk
 
Cisco's Open Device Programmability Strategy: Open Discussion
Cisco's Open Device Programmability Strategy: Open DiscussionCisco's Open Device Programmability Strategy: Open Discussion
Cisco's Open Device Programmability Strategy: Open Discussion
 
65% Performance Gains at Cryptocurrency Platform CoinGecko: An Argo Smart Rou...
65% Performance Gains at Cryptocurrency Platform CoinGecko: An Argo Smart Rou...65% Performance Gains at Cryptocurrency Platform CoinGecko: An Argo Smart Rou...
65% Performance Gains at Cryptocurrency Platform CoinGecko: An Argo Smart Rou...
 
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE Global Summit - Real-time Media Stream Processing Using KurentoFIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
 
IPv6 Security - Myths and Reality
IPv6 Security - Myths and RealityIPv6 Security - Myths and Reality
IPv6 Security - Myths and Reality
 
Panel with IPv6 CE Vendors
Panel with IPv6 CE VendorsPanel with IPv6 CE Vendors
Panel with IPv6 CE Vendors
 
Workshop web rtc customers and use cases
Workshop web rtc customers and use casesWorkshop web rtc customers and use cases
Workshop web rtc customers and use cases
 
Approaching hyperconvergedopenstack
Approaching hyperconvergedopenstackApproaching hyperconvergedopenstack
Approaching hyperconvergedopenstack
 

More from Crocodile WebRTC SDK and Cloud Signalling Network (9)

DevCon5 (July 2014) - Acision SDK
DevCon5 (July 2014) - Acision SDKDevCon5 (July 2014) - Acision SDK
DevCon5 (July 2014) - Acision SDK
 
DevCon5 (July 2014) - Intro to WebRTC
DevCon5 (July 2014) - Intro to WebRTCDevCon5 (July 2014) - Intro to WebRTC
DevCon5 (July 2014) - Intro to WebRTC
 
WebRTC Summit (June 2014) - WebRTC Interoperability (and why it is important)
WebRTC Summit (June 2014) - WebRTC Interoperability (and why it is important)WebRTC Summit (June 2014) - WebRTC Interoperability (and why it is important)
WebRTC Summit (June 2014) - WebRTC Interoperability (and why it is important)
 
Kamailio World 2014 - Kamailio - The Platform for Interoperable WebRTC
Kamailio World 2014 - Kamailio - The Platform for Interoperable WebRTCKamailio World 2014 - Kamailio - The Platform for Interoperable WebRTC
Kamailio World 2014 - Kamailio - The Platform for Interoperable WebRTC
 
Asterisk World (January 2014) - Taking Enterprise Telephony into the Web World
Asterisk World (January 2014) - Taking Enterprise Telephony into the Web WorldAsterisk World (January 2014) - Taking Enterprise Telephony into the Web World
Asterisk World (January 2014) - Taking Enterprise Telephony into the Web World
 
DevCon 5 (December 2013) - WebRTC & WebSockets
DevCon 5 (December 2013) - WebRTC & WebSocketsDevCon 5 (December 2013) - WebRTC & WebSockets
DevCon 5 (December 2013) - WebRTC & WebSockets
 
WebRTC Conference and Expo (November 2013) - Signalling Workshop
WebRTC Conference and Expo (November 2013)  - Signalling WorkshopWebRTC Conference and Expo (November 2013)  - Signalling Workshop
WebRTC Conference and Expo (November 2013) - Signalling Workshop
 
VUC 24-May-2013 - Crocodile
VUC 24-May-2013 - CrocodileVUC 24-May-2013 - Crocodile
VUC 24-May-2013 - Crocodile
 
Crocodile RTC Launch (Google Campus) - 1: Introduction
Crocodile RTC Launch (Google Campus) - 1: IntroductionCrocodile RTC Launch (Google Campus) - 1: Introduction
Crocodile RTC Launch (Google Campus) - 1: Introduction
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 

Recently uploaded (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 

Kamailio World 2013 - SIP and MSRP over WebSocket

  • 1. SIP AND MSRP OVER WEBSOCKET 1
  • 2. SIP and MSRP over WebSocket in Kamailio SIP and MSRP over WebSocket in Kamailio Peter Dunkley, Technical Director, Crocodile RCS Ltd Email: Twitter: peter.dunkley@crocodile-rcs.com @pdunkley
  • 3. What is WebRTC? ● WebRTC is about media – – SDP – RTP/SAVPF – ICE – ● PeerConnection, GetUserMedia, MediaStreams, and DataChannel Codecs (G.711, OPUS, H.264 vs VP8) It doesn't help with the signalling part of the trapezoid/triangle
  • 5. What is WebSocket? ● ● Safe, client-originated, connection to servers Often used from web-browsers - but does not have to be ● It is an asynchronous protocol ● Traffic from the client is masked ● ● Although carried over TCP WebSocket is a frame based protocol RFC 6455, “The WebSocket Protocol”
  • 6. WebSocket framing ● RFC 6455, section 5.2 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-------+-+-------------+-------------------------------+ |F|R|R|R| opcode|M| Payload len | Extended payload length | |I|S|S|S| (4) |A| (7) | (16/64) | |N|V|V|V| |S| | (if payload len==126/127) | | |1|2|3| |K| | | +-+-+-+-+-------+-+-------------+ - - - - - - - - - - - - - - - + | Extended payload length continued, if payload len == 127 | + - - - - - - - - - - - - - - - +-------------------------------+ | |Masking-key, if MASK set to 1 | +-------------------------------+-------------------------------+ | Masking-key (continued) | Payload Data | +-------------------------------- - - - - - - - - - - - - - - - + : Payload Data continued ... : + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + | Payload Data continued ... | +---------------------------------------------------------------+
  • 7. SIP over WebSocket (draft-ietf-sipcore-sip-websocket) ● Why use SIP? – It's the “Session Initiation Protocol” – Islands are good but you don't want to be marooned – Many regulatory issues already dealt with ● ● ● – Billing CALEA/LI Privacy It's taken almost 10 years to sort out the SIP issues. Why start from scratch and make the same mistakes all over again?
  • 8. SIP over WebSocket (draft-ietf-sipcore-sip-websocket) ● WebSocket has limitations – ● You can't know your local IP address Use SIP Outbound (RFC 5626) – Sorts out NAT traversal issues – Separates Edge Proxy (client connection and network protection) from Registrar and dynamic routing logic – SIP Outbound uses GRUU (RFC 5627) to identify User Agents and Path (RFC 3327) to enable clients to use Registrars that are not their first-hop
  • 9. SIP over WebSocket (draft-ietf-sipcore-sip-websocket) ● Open-source server implementations – ● Asterisk, Kamailio, OverSIP, reSIProcate Open-source client implementations – JAIN SIP JavaScript – JsSIP – QoffeeSIP – sipML5
  • 10. MSRP over WebSocket (draft-pd-dispatch-msrp-websocket) ● Why use MSRP over WebSocket? – – ● It's a natural companion to SIP Can be used for IM, file transfer, or any other data streaming you need WebSocket limitations – ● Same as SIP Use an MSRP Relay (RFC 4976) – Sorts out NAT traversal issues
  • 11. MSRP over WebSocket (draft-pd-dispatch-msrp-websocket) ● Open-source server implementations – ● Kamailio Open-source client implementations – Crocodile MSRP
  • 12. Kamailio support ● The following modules enable you to use SIP and MSRP over WebSocket in Kamailio – – ● msrp – ● websocket nathelper or outbound nathelper based example configuration is in the source tree “examples/websocket.cfg” outbound based example configuration TBD
  • 13. Kamailio configuration ● Handle WebSocket handshake using  event_route[xhttp:request] event_route[xhttp:request] { set_reply_close(); set_reply_no_connect(); if ($hdr(Upgrade)=~"websocket" && $hdr(Connection)=~"Upgrade" && $rm=~"GET") { # Validate as required (Host:, Origin:, Cookie:) and perform # HTTP authentication if required if (ws_handle_handshake()) exit; } xhttp_reply("404", "Not Found", "", ""); }
  • 14. Demo
  • 15. The demo is built on the Crocodile SDK ● ● ● Open source Javascript library for real-time communication Web API for provisioning and third-party website integration Free-to-use SIP and MSRP network
  • 16. Crocodile Javascript library example <html> <script src="http://www.example.com/jquery.crocsdk.js"></script> <script> $(document).ready(function(){   var croc = $.croc({     apiKey: "1dsku21#4598­21wks8=",   });   var session = croc.media.connect("sip:bob@example.com");   session.remoteAudioElement = $('#audio'); }) </script> <body>   <audio id="audio" /> </body> </html>
  • 17. Crocodile Javascript library components ● JsSIP (Javascript stack) – – ● Best-of-breed Easily to extend (good object model) Crocodile MSRP Client (Javascript stack) – Similar object model to JsSIP – Known to work with JsSIP (with JsSIP.Session overridden)
  • 18. Crocodile Javascript library architecture Web App Crocodile SDK (jQuery Plugin) SIP Stack (JsSIP) jQuery MSRP Stack (Crocodile) Browser SIP over Websockets MSRP over Websockets WebRTC
  • 19. Crocodile network ● Cloud based (Amazon EC2) ● Kamailio core – – SIP Proxy/Registrar – ● SIP Outbound Edge Proxy (SIP over WebSocket) MSRP Relay (MSRP over WebSocket) Other open-source platforms used for – STUN/TURN servers – Accounting/Billing – Media gateway
  • 20. Network and SDK Launch on 22 May 2013 ● Launch event at Google Campus, London