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

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 

Recently uploaded (20)

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 

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