SlideShare a Scribd company logo
1 of 19
Download to read offline
27-04-2016	
SA8T2	Internal	Deliverable	
Technology	Scout:	WebRTC2SIP	Gateway	
SA8T2	Internal	Deliverable	
Contractual	Date:	 30-04-2016	
Actual	Date:	 27-04-2016	
Grant	Agreement	No.:	 691567	
Activity:	 12/SA8	
Task	Item:	 Task	2	–	WebRTC	
Nature	of	Deliverable:	 R	(Report)	
Dissemination	Level:	 PU	(Public)	
Lead	Partner:	 NORDUnet	(UNINETT)	
Authors:	 Stefan	Otto	(UNINETT)	
	
©	GEANT	Limited	on	behalf	of	the	GN4	Phase	1	project.	
The	research	leading	to	these	results	has	received	funding	from	the	European	Union’s	Horizon	2020	research	and	
innovation	programme	under	Grant	Agreement	No.	691567	(GN4-1).	
Abstract	
This	 document	 reports	 on	 results	 and	 findings	 from	 a	 technical	 investigation	 into	 a	 WebRTC-to-SIP	 Gateway.	 The	
technology	scout	was	conducted	by	the	Service	Activity	8	(SA8,	Real	Time	Communication	and	Media),	Task	2	(WebRTC)	
team	as	part	of	the	GN4-1	project.	This	report	should,	as	such,	be	read	in	context	of	the	related	work	produced	by	GN4-1	
SA8-T2.
Deliverable	SA8T2	Internal	Deliverable	
Technology	Scout:	WebRTC2SIP	Gateway		
Document	Code:		
i	
Table	of	Contents	
1	 Introduction	 3	
1.1	 About	this	document	 3	
1.1.1	 Target	audience	 3	
1.1.2	 Responsible	task	members	 3	
1.2	 Background	 3	
1.3	 Rationale	 5	
1.4	 Tech	scout	objective	and	methodology	 5	
2	 Challenges	 6	
2.1	 Transfer	Protocol	 6	
2.2	 Codecs	 6	
2.3	 Encryption	 6	
2.4	 ICE	 7	
3	 Possible	candidates	 8	
3.1	 FreeSWITCH	 8	
3.2	 Doubango	webrtc2sip	 9	
3.3	 Janus	 9	
3.4	 Kamailio	+	rtpengine	 9	
4	 Solution	Overview	 10	
5	 Limitations	 12	
6	 Performance	and	Scalability	 13	
7	 Security	considerations	 14	
8	 Conclusions	 15	
Appendix	A	 Setup	WebRTC2SIP-gateway	 16	
A.1	 Get	certificates	 16	
A.2	 Get	configuration	files	 16	
A.3	 Install	rtpengine	 17
Introduction	
SA8T2	Internal	Deliverable	
Technology	Scout:	WebRTC2SIP	Gateway	 ii	
A.4	 Install	IPTables	firewall	(optional)	 17	
A.5	 Install	Kamailio	 17	
A.6	 Install	WebRTC	client	 18	
A.7	 Install	TURN	server	 18	
A.8	 Testing	 18	
	
Table	of	Figures		 	
Figure	1:	WebRTC	Signalling	and	media	 4	
Figure	2:	SIP	Signalling	and	media	 4	
Figure	3:	WebRTC2SIP	gateway	 8	
Figure	4:	WebRTC2SIP-Gateway	overview	 10
SA8T2	Internal	Deliverable	
Technology	Scout:	WebRTC2SIP	Gateway	 3	
1 Introduction	
1.1 About	this	document	
This	 document	 reports	 on	 results	 and	 findings	 from	 a	 technology	 scout	 into	 a	 WebRTC-to-SIP	
Gateway	conducted	by	the	Service	Activity	8	(SA8),	Task	2	team	of	the	GN4-1	project.	This	report	
should,	as	such,	be	read	in	context	of	the	related	work	produced	by	GN4-1	SA8-T2.	
The	WebRTC	task	ran	from	1	May	2015	to	30	April	2016.	
1.1.1 Target	audience	
This	 document	 targets	 technical	 management	 and	 specialists,	 in	 particular	 those	 working	 in	 the	
fields	of	real	time	communications,	eLearning	and	eResearch.	
1.1.2 Responsible	task	members	
Stefan	 Otto	 (UNINETT)	 had	 the	 lead	 on	 this	 tech	 scout.	 Jan	 Meijer	 (UNINETT)	 and	 Simon	 Skrødal	
(UNINETT)	were	the	document	editors.	
1.2 Background	
The	Session	Initiation	Protocol	(SIP)	is	a	system	of	rules	that	governs	the	signalling	and	controlling	of	
multimedia	communication	sessions.	This	technology	scout	investigates	how	the	WebRTC	ecosystem	
may	integrate	and	support	legacy	SIP	equipment.		
There	are	a	number	of	scenarios	where	it	would	make	sense	to	enable	audio/video	communication	
between	legacy	SIP	clients	and	web	browsers.	While	participation	in	a	classical	SIP	video	meeting	
with	 a	 WebRTC-enabled	 browser	 is	 already	 possible,	 the	 other	 way	 around	 is	 not.	 You	 can	 not	
participate	 in	 a	 WebRTC	 browser	 meeting	 using	 a	 SIP	 client.	 This	 will	 never	 work	 via	 a	 universal	
gateway	because	there	is	no	standardized	signalling	protocol	in	WebRTC,	meaning	that	you	would	
need	to	implement	your	own	gateway	for	each	WebRTC-service.		
Other,	more	feasible	and	value-adding	use	cases	include:
Introduction	
SA8T2	Internal	Deliverable	
Technology	Scout:	WebRTC2SIP	Gateway	 4	
• easy	 to	 integrate	 call	 buttons	 where	 web	 page	 visitors	 can	 ring	 to	 your	 organization's	
internal	telephony	network	by	pressing	a	button	in	their	browser	
• participate	with	a	browser	in	a	classic	audio	only	conference	
• build	Point-of-Presence	systems	which	can	interact	both	with	classical	telephony	and	legacy	
video	systems		
• wherever	you	want	to	connect	a	browser	to	telephony	or	legacy	SIP	video	systems	
	
WebRTC	and	SIP	media	sessions	have	many	similarities	(see	Figure	1:	WebRTC	Signalling	and	media	
and	 Figure	 2:	 SIP	 Signalling	 and	 media).	 Since	 WebRTC	 standardization	 began,	 there	 have	 been	
ongoing	 discussions	 and	 efforts	 towards	 maintaining	 compatibility	 with	 classic	 SIP	 audio/video	
equipment.	For	this	reason,	there	are	no	specific	signalling	protocols	defined	for	WebRTC,	meaning	
you	can	use	SIP	if	you	want.	Further,	the	Session	Description	Protocol	(SDP)	is	used	by	SIP	as	well	as	
WebRTC	to	describe	media	session	and	communication	parameters,	such	as	key-fingerprints	and	IP-
address	candidates.	In	WebRTC,	this	SDP	"blob"	has	to	be	sent	with	the	signalling	protocol	of	your	
choice.	Hence,	there	are	several	similarities	worth	investigating	further	in	order	to	bridge	WebRTC	
and	SIP.	
	
	
Figure	1:	WebRTC	Signalling	and	media	
	
	
Figure	2:	SIP	Signalling	and	media
Introduction	
SA8T2	Internal	Deliverable	
Technology	Scout:	WebRTC2SIP	Gateway	 5	
1.3 Rationale	
There	is	a	large	installed	base	of	SIP	infrastructure	in	the	R&E	community.	Effectively	every	Unified	
Communication	installation	adds	to	this.	That	makes	it	very	interesting	to	investigate	how	WebRTC	
can	be	used	to	add	value	to	this	installed	base,	and	how	the	installed	base	can	be	used	to	facilitate	
WebRTC	adoption.	
1.4 Tech	scout	objective	and	methodology	
The	objective	for	this	tech	scout	was	to	investigate	how	the	WebRTC	ecosystem	may	integrate	and	
support	legacy	SIP	equipment	and	what	type	of	value-adding	use	cases	could	be	addressed	using	the	
solution(s)	identified.	
The	concept	and	architecture	of	a	WebRTC2SIP	gateway	was	explored	upon	which	a	PoC	was	built	
using	open	source	components.
SA8T2	Internal	Deliverable	
Technology	Scout:	WebRTC2SIP	Gateway	 6	
2 Challenges	
A	closer	look	identifies	a	number	of	issues	that	must	be	addressed.		
2.1 Transfer	Protocol	
SIP-clients	use	direct	TCP	or	UDP	to	transport	SIP	packets.	The	web	browser,	on	the	other	hand,	can	
only	communicate	using	HTTP/WebSocket.	Since	the	web	developer	cannot	make	the	web	browser	
send	 or	 receive	 SIP-messages	 to/from	 a	 specified	 IP-address/port,	 the	 transfer	 protocol	 must	 be	
converted.	 This	 may	 be	 achieved	 by	 using	 the	 WebSocket	 protocol	 as	 transport	 for	 SIP	 (see	
https://tools.ietf.org/html/rfc7118)	or	to	translate	to	SIP	on	the	WebRTC-signalling	server	and	send	
forwards.	
2.2 Codecs	
The	next	challenge	involves	the	video/audio	codec	negotiation.	Current	WebRTC-enabled	browsers	
(e.g.	Firefox/Chrome)	support	the	following	codecs:	
Video	—	VP8	(MTI),	VP9	and	H264	(MTI	-	supported	on	Firefox,	experimental	support	in	Chrome-
M50)	
Audio	—	opus	(MTI),	G.711	(MTI),	iSAC	and	G.722	
SIP	clients	usually	understand	several	codecs,	but	if	there	is	no	single	match	to	the	ones	from	the	
browser	they	will	not	be	able	to	talk	to	each	other.	A	gateway	could	decode	and	encode	the	streams	
to	 the	 supported	 codec,	 but	 this	 would	 add	 significant	 CPU	 workload,	 additional	 latency	 and	
compatibility	issues.		
2.3 Encryption	
For	WebRTC	connections	it	is	mandatory	to	use	DTLS	to	establish	a	secure	SRTP	connection.	Only	a	
few	legacy	systems	support	this.
Challenges	
SA8T2	Internal	Deliverable	
Technology	Scout:	WebRTC2SIP	Gateway	 7	
2.4 ICE	
	
In	order	to	establish	connections	through	firewalls	and	NAT,	routers,	WebRTC	clients	and	SIP-clients	
use	ICE	(Interactive	Connectivity	Establishment,	see	https://tools.ietf.org/html/rfc5245).	There	exist	
several	improving	extensions,	e.g.	TCP	Candidates	with	ICE	(https://tools.ietf.org/html/rfc6544)	and	
the	 Trickle	 ICE	 draft	 (https://tools.ietf.org/html/draft-ietf-mmusic-trickle-ice-02),	 which	 legacy	 SIP	
equipment	usually	does	not	know	about,	but	WebRTC	clients	do.	
Other	 issues	 include	 RTP/RTCP	 muxing	 into	 one	 UDP	 port	 (http://tools.ietf.org/html/rfc5761)	 and	
bundling	 several	 media	 streams	 in	 one	 address:port	 combination	 (BUNDLE	 draft	 —	
https://tools.ietf.org/html/draft-ietf-mmusic-sdp-bundle-negotiation-27),	 used	 by	 WebRTC-clients	
and	preventing	direct	communication	with	SIP	legacy	clients.
SA8T2	Internal	Deliverable	
Technology	Scout:	WebRTC2SIP	Gateway	 8	
3 Possible	candidates	
A	possible	gateway	architecture	is	suggested	by	Figure	3:	WebRTC2SIP	gateway.	
	
	
Figure	3:	WebRTC2SIP	gateway	
The	gateway	consists	of	a	SIP-proxy	and	an	RTP-proxy.	The	SIP-proxy	accepts	SIP	packets	via	the	web	
client's	WebSocket.	SDP	is	translated	(delete,	generate,	replace	ICE	candidates,	BUNDLE	lines,	DTLS	
fingerprints,	 ...)	 and	 the	 RTP-proxy	 then	 bridges	 media	 traffic	 (IPv4/IPv6,	 SRTP/RTP,	 RTP/RTCP	
multiplexing/demultiplexing,	BUNDLE/unBUNDLE	media	streams,	...).	
Since	the	technology	scout	is	restricted	to	consider	open	source	solutions	only,	several	commercial	
solutions	 were	 disregarded.	 However,	 for	 the	 sake	 of	 completeness,	 we	 want	 to	 mention	 Acano	
(https://www.acano.com)	and	Pexip	(https://www.pexip.com),	which	include	WebRTC2SIP	gateway	
functionality	in	their	products.		
3.1 FreeSWITCH	
While	FreeSWITCH	(https://freeswitch.org)looks	like	a	promising	candidate	worth	testing,	we	were	
unable	to	do	so	due	to	time	constraints.		
It	 features	 a	 scalable	 telephony	 platform	 designed	 to	 route	 and	 interconnect	 popular	
communication	 protocols	 using	 audio,	 video,	 text	 or	 any	 other	 form	 of	 media,	 support	
communication	technologies	such	as	Skype,	SIP,	H.323	and	WebRTC.	FreeSWITCH	can	perform	full	
video	transcoding	and	MCU	functionality	using	its	conferencing	module.		
Web-browser SIP
UA
Gateway
SIP-Proxy
RTP-proxy
Control commands
wss:443
5060
wss:SIP/SDP tcp/udp:SIP/SDP
UDP
range
udp:DTLS/ICE/SRTP udp:RTP/SRTP
UDP
range
Possible	candidates	
SA8T2	Internal	Deliverable	
Technology	Scout:	WebRTC2SIP	Gateway	 9	
3.2 Doubango	webrtc2sip	
Doubango	Telecom	is	a	young	telecom	company	located	in	France,	with	a	big	focus	on	open	source	
solutions	 in	 IMS/SIP	 and	 WebRTC	 area.	 SIPml5,	 a	 browser	 JavaScript	 SIP	 library,	 is	 provided	 by	
Doubango	Telecom.		
Their	Doubango	webrtc2sip	media	gateway	(https://www.doubango.org/webrtc2sip/)	consists	of	4	
modules	(SIP	Proxy,	RTCWeb	Breaker,	Media	Coder,	Click-to-Call)	following	the	same	philosophy	as	
described	in	this	document.	Additionally,	it	features	audio/video	transcoding	abilities.	In	our	tests	
one	year	ago	we	experienced	the	solution	as	slightly	unstable.	There	are	no	binary	packages,	so	you	
have	to	build	everything	on	your	own.	After	updating	openSSL	due	to	security	issues,	we	were	no	
longer	able	to	build	it	and	thus	ended	our	testing	of	webrtc2sip	at	that	point.	
3.3 Janus		
The	 Italian	 company	 Meetecho,	 located	 in	 Naples,	 provides	 an	 open	 source	 general	 purpose	
WebRTC	 Gateway	 called	 Janus	 (https://janus.conf.meetecho.com).	 Janus	 consists	 of	 a	 small	
footprint	core,	which	can	be	extended/customized	with	a	number	of	plugins.	There	are	already	a	few	
plugins	available,	e.g.	audiobridge,	echotest,	recordplay,	 SIP,	streaming,	videocall,	videoroom	and	
voicemail.	The	SIP	plugin	enables	peers	to	register	through	Janus	to	a	SIP	server	and	call	in	and	out.	
The	functionality	is	marked	as	unstable	and	need	further	testing	-	for	now	tested	successfully	audio	
only.		
The	SIP	plugin	is	based	on	Sofia	SIP	(http://sofia-sip.sourceforge.net).	No	documentation	was	found	
in	regard	to	SDP	translating	between	legacy	SIP	equipment	and	WebRTC.		
3.4 Kamailio	+	rtpengine	
The	author	of	this	document	is	part	of	the	Norwegian	real-time	group	at	UNINETT,	and	we	built	a	SIP	
infrastructure	based	on	the	solid	SIP	router	Kamailio	(https://www.kamailio.org).	It	therefore	made	
sense	to	focus	our	attention	on	a	SIP-proxy	solution	based	on	Kamailio.
Solution	Overview	
SA8T2	Internal	Deliverable	
Technology	Scout:	WebRTC2SIP	Gateway	 10	
4 Solution	Overview	
	
Figure	4:	WebRTC2SIP-Gateway	overview	
The	 implemented	 solution	 utilizes	 Kamailio	 as	 the	 SIP-proxy	 and	 Sipwise	 rtpengine	
(https://github.com/sipwise/rtpengine)	 as	 the	 RTP-proxy.	 Kamailio	 controls	 rtpengine	 with	 the	
integrated	 rtpengine	 module	 to	 facilitate	 the	 following:	 Kamailio	 passes	 a	 received	 SDP	 body	 to	
rtpengine	à	rtpengine	rewrites	the	body	and	returns	it	à	Kamailio	forwards	the	rewritten	body.	
This	 flow	 guarantees	 that	 each	 SIP-client	 (WebRTC	 SIP.js	 clients	 as	 well)	 gets	 only	 ICE	 candidates	
from	 rtpengine.	 In	 result	 RTP	 traffic	 will	 flow	 via	 rtpengine.	 Additionally,	 rtpengine	 takes	 care	 of	
BUNDLEd	media	and	muxed	RTP/RTCP	channels	and	rewrites	these	lines	in	the	SDP	body	as	well.	
Hence,	 rtpengine	 effectively	 talks	 to	 each	 client	 side	 and	 translates	 in	 the	 middle	 (this	 does	 not	
include	media	transcoding).	
The	web	server	is	the	entry	point	for	the	web	browser	and	its	naming	should	be	user	friendly	(e.g.	
call-the-ancient-world.net).	 Running	 the	 HTML/Javascript-code	 from	 the	 web	 server	 turns	 the	
browser	into	a	WebRTC	SIP	client	that	registers	on	Kamailio.	The	client	is	then	callable	via	a	SIP-URI	
world-wide	or	can	place	its	own	calls.	In	this	example	configuration,	the	SIP-URI	is	websip@gateway-
domain.no	
Should	the	WebRTC	client	be	unable	to	connect	directly	to	rtpengine	it	will	receive	support	from	the	
TURN-server,	which	listens	on	TCP/TLS	port	443	and	forwards	the	media	traffic	to	rtpengine	via	UDP.	
This	is	needed	to	pass	restrictive	firewalls	on	the	client	side.	rtpengine	does	not	support	RTP	media	
over	TCP	for	now	—	if	this	will	be	the	case	in	the	(near)	future,	there	will	no	longer	be	a	need	for	a	
TURN	server.
Solution	Overview	
SA8T2	Internal	Deliverable	
Technology	Scout:	WebRTC2SIP	Gateway	 11	
	
All	 components	 could	 be	 located	 on	 the	 same	 server,	 but	 in	 order	 to	 get	 listening	 on	 port	 443	
working	for	all	servers	for	firewall	traversal,	web-server,	Kamailio	and	TURN	server	each	will	need	an	
independent	IP-address.
SA8T2	Internal	Deliverable	
Technology	Scout:	WebRTC2SIP	Gateway	 12	
5 Limitations	
rtpengine	is	just	a	proxy	so	there	is	no	media	transcoding.	SIP	clients	that	do	not	support	VP8/H264	
video	 codecs	 cannot	 be	 called	 or	 make	 calls.	 For	 now,	 only	 Firefox	 supports	 both	 video	 codecs,	
Chrome’s	support	for	H264	is	not	stable	yet	and	Microsoft	Edge	supports	only	H264.	As	the	IETF	
rtcweb-standardization	group	has	decided	to	make	both	video-codecs	mandatory	to	implement,	I	
sooner	or	later	expect	support	for	both	codecs	in	all	WebRTC-enabled	browsers.	On	the	other	side,	
legacy	SIP	clients	usually	support	H264.	Some	modern	systems	and	software	clients	integrate	VP8	as	
well.	Acano,	for	example,	has	both	on	their	system.
SA8T2	Internal	Deliverable	
Technology	Scout:	WebRTC2SIP	Gateway	 13	
6 Performance	and	Scalability		
Since	there	is	no	media	transcoding,	the	limiting	factor	would	be	the	network	bandwidth	for	media	
traffic	 over	 rtpengine.	 For	 large	 scale	 installations,	 rtpengine	 could	 be	 distributed	 over	 several	
instances	 on	 different	 locations.	 For	 a	 1	 Gigabit	 Ethernet	 interface	 there	 should	 be	 roughly	 100	
concurrent	calls	possible.
SA8T2	Internal	Deliverable	
Technology	Scout:	WebRTC2SIP	Gateway	 14	
7 Security	considerations		
User	 credentials	 for	 the	 SIP-proxy	 and	 for	 the	 TURN	 server	 are	 publicly	 available	 from	 the	 web	
server.	Some	kind	of	authentication	should	therefore	be	established	in	front	of	the	web	server.	The	
TURN	server	should	be	protected	with	time-limited	secret-based	authentication	(see	A	REST	API	For	
Access	To	TURN	Services,	https://tools.ietf.org/html/draft-uberti-behave-turn-rest-00)	or	an	oAuth-
based	 client	 authorization,	 which	 is	 experimentally	 supported	 by	 the	 coTURN	 TURN	 server.	 To	
protect	Kamailio,	we	could	generate	user	accounts	dynamically	on	the	web	server	and	push	these	to	
Kamailio’s	user-database.	
Since	media	traffic	is	decrypted	in	the	Gateway,	it	is	possible	to	intercept	the	media	traffic	between	
the	gateway	and	legacy	SIP	equipment.	Metadata	interception	is	possible	if	you	intercept	network	
traffic	to	and	from	the	gateway.	You	can	get	IP-address	based	call	information	(when,	how	long,	SIP	
header	information).
SA8T2	Internal	Deliverable	
Technology	Scout:	WebRTC2SIP	Gateway	 15	
8 Conclusions	
We	have	demonstrated	that	it	is	possible	to	build	a	scalable	WebRTC	gateway	from	open	source	
components.	It	was	possible	to	get	stable	connections	to:	
	
- Alcatel-Lucent	PSTN-Gateway	(audio)	
- Asterisk	based	conference	system	(audio)	
- Several	softphones	such	as	Ekiga	or	Linphone	(audio	+	video)	
- Acano	video	meeting	(audio	+	video)	
	
The	solution	is	far	away	from	being	interoperable	with	the	whole	SIP	legacy	world,	but	it	is	a	starting	
point.	There	is	still	a	video	codec	problem,	which	hopefully	will	be	solved	soon.	There	are	also	issues	
with	several	SIP	systems	that	must	be	analyzed	further.	However,	it	is	already	possible	to	deliver	a	
stable	 "call	 button"	 solution,	 or	 an	 alternative	 video	 client,	 for	 calling	 modern	 videoconferencing	
systems	like	Acano.
SA8T2	Internal	Deliverable	
Technology	Scout:	WebRTC2SIP	Gateway	 16	
Appendix	A Setup	WebRTC2SIP-gateway	
This	section	describes	how	to	install	and	set	up	Kamailio	+	rtpengine	+	TURN	server	+	WebRTC	client	
to	enable	calling	between	WebRTC	clients	and	legacy	SIP	clients.	This	setup	will	bridge	SRTP-RTP	and	
ICE-nonICE	to	make	WebRTC	clients	(SIP.js)	able	to	call	legacy	SIP	clients.	
The	setup	is	pertinent	to	Debian	8	Jessie	for	all	servers.	
For	clients	to	avoid	firewalls	and	to	have	the	best	setup,	divide	the	servers	like	this:	
1. Server	—	Kamailio	+	rtpengine		
2. Server	—	TURN	(provide	TCP/UDP	connections	on	port	443	for	your	WebRTC	clients	to	
pass	restrictive	firewalls)	
3. Server	—	Web	server	to	serve	the	WebRTC	client	with	SIP.js	
	
The	configuration	is	set	up	to	try	connecting	with	SIP	without	modification.	If	the	proxy	receives	a	
"488	Not	Supported	Here"	from	the	other	side,	it	will	remove	SRTP	and	ICE	from	the	SDP	and	try	
again	to	INVITE.	
A.1 Get	certificates	
For	the	needed	certificates,	I	recommend	Let's	Encrypt	(https://letsencrypt.org).	They	will	work	for	
Kamailio	TLS,	Nginx	TLS	and	coTURN	TLS.	Run	the	following	on	each	server	you	need	certificates	for	
(you	must	stop	services	running	on	port	443	during	certificate	request/renewal):	
# git clone https://github.com/letsencrypt/letsencrypt
# cd letsencrypt
# ./letsencrypt 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
	
Copy	them	to	the	appropriate	location.		
A.2 Get	configuration	files	
Files	needed	to	setup	all	components	on	Debian	8	Jessie:
Conclusions	
	
SA8T2	Internal	Deliverable	
Technology	Scout:	WebRTC2SIP	Gateway	 17	
git clone https://github.com/havfo/WebRTC-to-SIP.git
cd WebRTC-to-SIP
find . -type f -print0 | xargs -0 sed -i 's/XXXXX-XXXXX/PUT-IP-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'
find . -type f -print0 | xargs -0 sed -i 's/XXX-XXX/PUT-DOMAIN-OF-YOUR-
TURN-SERVER-HERE/g'
A.3 Install	rtpengine	
The	 following	 achieves	 the	 SRTP-RTP	 bridging	 needed	 to	 make	 WebRTC	 clients	 talk	 to	 legacy	 SIP	
server/clients:	
apt-get install dpkg-dev debhelper iptables-dev
libcurl4-openssl-dev libglib2.0-dev libhiredis-dev
libpcre3-dev libssl-dev markdown zlib1g-dev
libxmlrpc-core-c3-dev dkms linux-headers-`uname -r`
git clone https://github.com/sipwise/rtpengine.git
cd rtpengine
./debian/flavors/no_ngcp
dpkg-buildpackage
cd ..
dpkg -i 'ngcp-rtpengine-daemon_*' 'ngcp-rtpengine-iptables_*' 'ngcp-
rtpengine-kernel-dkms_*'
cd WebRTC-to-SIP
cp etc/default/ngcp-rtpengine-daemon /etc/default/
/etc/init.d/ngcp-rtpengine-daemon restart
A.4 Install	IPTables	firewall	(optional)	
Optional,	but	recommended	to	secure	your	servers.	It	will	work	on	all	three	servers,	but	you	should	
customize	_iptables.sh_	for	each	of	them	(e.g.	the	web	server	does	not	need	the	TURN,	RTPENGINE	
and	RTP	rules,	while	the	TURN	server	does	not	need	the	RTPENGINE	rule).	If	installed	it	will	persist	
after	reboot.	You	can	run	the	_iptables.sh_	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
A.5 Install	Kamailio	
apt-get install kamailio kamailio-websocket-modules kamailio-mysql-modules
kamailio-tls-modules kamailio-presence-modules mysql-server
cd WebRTC-to-SIP
Conclusions	
	
SA8T2	Internal	Deliverable	
Technology	Scout:	WebRTC2SIP	Gateway	 18	
cp etc/kamailio/* /etc/kamailio/
kamdbctl create
	
Select	yes	(Y)	for	all	options.	
	
kamctl add websip websip
/etc/init.d/kamailio restart
A.6 Install	WebRTC	client	
apt-get install nginx
cd WebRTC-to-SIP
cp etc/nginx/sites-available/default /etc/nginx/sites-available/
cp -r client/* /var/www/html/
A.7 Install	TURN	server	
apt-get install rfc5766-turn-server
cp etc/default/rfc5766-turn-server /etc/default/
cp etc/turn* /etc/
/etc/init.d/rfc5766-turn-server restart
A.8 Testing	
You	should	now	be	able	to	go	to	https://webrtcnginxserver/	and	call	to	legacy	SIP	clients.

More Related Content

Similar to Gn4 1-sa8 t2 tech scout - webrtc2sip-gateway - v1.0-final

WebRTC Standards Update (October 2014)
WebRTC Standards Update (October 2014)WebRTC Standards Update (October 2014)
WebRTC Standards Update (October 2014)Victor Pascual Ávila
 
Update on progress made at CT#87-e meeting
Update on progress made at CT#87-e meetingUpdate on progress made at CT#87-e meeting
Update on progress made at CT#87-e meeting3G4G
 
IMTC Connect 2015, SIP Parity Activity Group Update
IMTC Connect 2015, SIP Parity Activity Group UpdateIMTC Connect 2015, SIP Parity Activity Group Update
IMTC Connect 2015, SIP Parity Activity Group UpdateCharles Eckel
 
Webinar on 1st Open Call - slideset
Webinar on 1st Open Call - slidesetWebinar on 1st Open Call - slideset
Webinar on 1st Open Call - slidesetsymbiote-h2020
 
Webinar WebRTC HTML5 (english)
Webinar WebRTC HTML5 (english)Webinar WebRTC HTML5 (english)
Webinar WebRTC HTML5 (english)Quobis
 
NTSC ISDN to IP Video Conferencing Transition Recommendations
NTSC ISDN to IP Video Conferencing Transition RecommendationsNTSC ISDN to IP Video Conferencing Transition Recommendations
NTSC ISDN to IP Video Conferencing Transition RecommendationsVideoguy
 
CPaaS.io - FIWARE-based Toolbox
CPaaS.io - FIWARE-based ToolboxCPaaS.io - FIWARE-based Toolbox
CPaaS.io - FIWARE-based ToolboxStephan Haller
 
Upperside Webinar - WebRTC Standards Update
Upperside Webinar - WebRTC Standards UpdateUpperside Webinar - WebRTC Standards Update
Upperside Webinar - WebRTC Standards UpdateUppersideConferences
 
Status of WebRTC across Asia by Alan Quayle +++
Status of WebRTC across Asia by Alan Quayle +++Status of WebRTC across Asia by Alan Quayle +++
Status of WebRTC across Asia by Alan Quayle +++Alan Quayle
 
Evaluating Wavelet Tranforms for Video Conferencing Applications
Evaluating Wavelet Tranforms for Video Conferencing ApplicationsEvaluating Wavelet Tranforms for Video Conferencing Applications
Evaluating Wavelet Tranforms for Video Conferencing ApplicationsVideoguy
 
Innovation in the network – Adding value to voice OpenCloud Bouygues
Innovation in the network – Adding value to voice OpenCloud BouyguesInnovation in the network – Adding value to voice OpenCloud Bouygues
Innovation in the network – Adding value to voice OpenCloud BouyguesAlan Quayle
 
Thinking the archives of 2020: Opportunitiws, priorities, Issues
Thinking the archives of 2020: Opportunitiws, priorities, IssuesThinking the archives of 2020: Opportunitiws, priorities, Issues
Thinking the archives of 2020: Opportunitiws, priorities, IssuesFIAT/IFTA
 

Similar to Gn4 1-sa8 t2 tech scout - webrtc2sip-gateway - v1.0-final (20)

WebRTC on Mobile
WebRTC on MobileWebRTC on Mobile
WebRTC on Mobile
 
Fabrice Clari - EC-FIA
Fabrice Clari - EC-FIAFabrice Clari - EC-FIA
Fabrice Clari - EC-FIA
 
WebRTC Standards Update (October 2014)
WebRTC Standards Update (October 2014)WebRTC Standards Update (October 2014)
WebRTC Standards Update (October 2014)
 
Update on progress made at CT#87-e meeting
Update on progress made at CT#87-e meetingUpdate on progress made at CT#87-e meeting
Update on progress made at CT#87-e meeting
 
IMTC Connect 2015, SIP Parity Activity Group Update
IMTC Connect 2015, SIP Parity Activity Group UpdateIMTC Connect 2015, SIP Parity Activity Group Update
IMTC Connect 2015, SIP Parity Activity Group Update
 
WebRTC standards update (Jul 2014)
WebRTC standards update (Jul 2014)WebRTC standards update (Jul 2014)
WebRTC standards update (Jul 2014)
 
Webinar on 1st Open Call - slideset
Webinar on 1st Open Call - slidesetWebinar on 1st Open Call - slideset
Webinar on 1st Open Call - slideset
 
Webinar WebRTC HTML5 (english)
Webinar WebRTC HTML5 (english)Webinar WebRTC HTML5 (english)
Webinar WebRTC HTML5 (english)
 
NTSC ISDN to IP Video Conferencing Transition Recommendations
NTSC ISDN to IP Video Conferencing Transition RecommendationsNTSC ISDN to IP Video Conferencing Transition Recommendations
NTSC ISDN to IP Video Conferencing Transition Recommendations
 
CPaaS.io - FIWARE-based Toolbox
CPaaS.io - FIWARE-based ToolboxCPaaS.io - FIWARE-based Toolbox
CPaaS.io - FIWARE-based Toolbox
 
Pkewebrtc
PkewebrtcPkewebrtc
Pkewebrtc
 
Upperside Webinar - WebRTC Standards Update
Upperside Webinar - WebRTC Standards UpdateUpperside Webinar - WebRTC Standards Update
Upperside Webinar - WebRTC Standards Update
 
Status of WebRTC across Asia by Alan Quayle +++
Status of WebRTC across Asia by Alan Quayle +++Status of WebRTC across Asia by Alan Quayle +++
Status of WebRTC across Asia by Alan Quayle +++
 
Evaluating Wavelet Tranforms for Video Conferencing Applications
Evaluating Wavelet Tranforms for Video Conferencing ApplicationsEvaluating Wavelet Tranforms for Video Conferencing Applications
Evaluating Wavelet Tranforms for Video Conferencing Applications
 
Workshop oracle
Workshop oracleWorkshop oracle
Workshop oracle
 
Some Notes on New IP
Some Notes on New IPSome Notes on New IP
Some Notes on New IP
 
WebRTC in the Real World
WebRTC in the Real WorldWebRTC in the Real World
WebRTC in the Real World
 
Innovation in the network – Adding value to voice OpenCloud Bouygues
Innovation in the network – Adding value to voice OpenCloud BouyguesInnovation in the network – Adding value to voice OpenCloud Bouygues
Innovation in the network – Adding value to voice OpenCloud Bouygues
 
WebRTC eduCONF
WebRTC eduCONFWebRTC eduCONF
WebRTC eduCONF
 
Thinking the archives of 2020: Opportunitiws, priorities, Issues
Thinking the archives of 2020: Opportunitiws, priorities, IssuesThinking the archives of 2020: Opportunitiws, priorities, Issues
Thinking the archives of 2020: Opportunitiws, priorities, Issues
 

Recently uploaded

象限策略:Google Workspace 与 Microsoft 365 对业务的影响 .pdf
象限策略:Google Workspace 与 Microsoft 365 对业务的影响 .pdf象限策略:Google Workspace 与 Microsoft 365 对业务的影响 .pdf
象限策略:Google Workspace 与 Microsoft 365 对业务的影响 .pdfkeithzhangding
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girladitipandeya
 
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一3sw2qly1
 
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya Shirtrahman018755
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Roomdivyansh0kumar0
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)Christopher H Felton
 
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...SofiyaSharma5
 
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on DeliveryCall Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Deliverybabeytanya
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girlsstephieert
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGAPNIC
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service PuneVIP Call Girls Pune Madhuri 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service PuneCall girls in Ahmedabad High profile
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...APNIC
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Roomdivyansh0kumar0
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts servicesonalikaur4
 
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一Fs
 
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Delhi Call girls
 

Recently uploaded (20)

象限策略:Google Workspace 与 Microsoft 365 对业务的影响 .pdf
象限策略:Google Workspace 与 Microsoft 365 对业务的影响 .pdf象限策略:Google Workspace 与 Microsoft 365 对业务的影响 .pdf
象限策略:Google Workspace 与 Microsoft 365 对业务的影响 .pdf
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
 
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
 
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
 
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
 
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on DeliveryCall Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girls
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOG
 
Vip Call Girls Aerocity ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Aerocity ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Aerocity ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Aerocity ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service PuneVIP Call Girls Pune Madhuri 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service Pune
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
 
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
 
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
 
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
 

Gn4 1-sa8 t2 tech scout - webrtc2sip-gateway - v1.0-final

  • 1. 27-04-2016 SA8T2 Internal Deliverable Technology Scout: WebRTC2SIP Gateway SA8T2 Internal Deliverable Contractual Date: 30-04-2016 Actual Date: 27-04-2016 Grant Agreement No.: 691567 Activity: 12/SA8 Task Item: Task 2 – WebRTC Nature of Deliverable: R (Report) Dissemination Level: PU (Public) Lead Partner: NORDUnet (UNINETT) Authors: Stefan Otto (UNINETT) © GEANT Limited on behalf of the GN4 Phase 1 project. The research leading to these results has received funding from the European Union’s Horizon 2020 research and innovation programme under Grant Agreement No. 691567 (GN4-1). Abstract This document reports on results and findings from a technical investigation into a WebRTC-to-SIP Gateway. The technology scout was conducted by the Service Activity 8 (SA8, Real Time Communication and Media), Task 2 (WebRTC) team as part of the GN4-1 project. This report should, as such, be read in context of the related work produced by GN4-1 SA8-T2.
  • 2. Deliverable SA8T2 Internal Deliverable Technology Scout: WebRTC2SIP Gateway Document Code: i Table of Contents 1 Introduction 3 1.1 About this document 3 1.1.1 Target audience 3 1.1.2 Responsible task members 3 1.2 Background 3 1.3 Rationale 5 1.4 Tech scout objective and methodology 5 2 Challenges 6 2.1 Transfer Protocol 6 2.2 Codecs 6 2.3 Encryption 6 2.4 ICE 7 3 Possible candidates 8 3.1 FreeSWITCH 8 3.2 Doubango webrtc2sip 9 3.3 Janus 9 3.4 Kamailio + rtpengine 9 4 Solution Overview 10 5 Limitations 12 6 Performance and Scalability 13 7 Security considerations 14 8 Conclusions 15 Appendix A Setup WebRTC2SIP-gateway 16 A.1 Get certificates 16 A.2 Get configuration files 16 A.3 Install rtpengine 17
  • 3. Introduction SA8T2 Internal Deliverable Technology Scout: WebRTC2SIP Gateway ii A.4 Install IPTables firewall (optional) 17 A.5 Install Kamailio 17 A.6 Install WebRTC client 18 A.7 Install TURN server 18 A.8 Testing 18 Table of Figures Figure 1: WebRTC Signalling and media 4 Figure 2: SIP Signalling and media 4 Figure 3: WebRTC2SIP gateway 8 Figure 4: WebRTC2SIP-Gateway overview 10
  • 4. SA8T2 Internal Deliverable Technology Scout: WebRTC2SIP Gateway 3 1 Introduction 1.1 About this document This document reports on results and findings from a technology scout into a WebRTC-to-SIP Gateway conducted by the Service Activity 8 (SA8), Task 2 team of the GN4-1 project. This report should, as such, be read in context of the related work produced by GN4-1 SA8-T2. The WebRTC task ran from 1 May 2015 to 30 April 2016. 1.1.1 Target audience This document targets technical management and specialists, in particular those working in the fields of real time communications, eLearning and eResearch. 1.1.2 Responsible task members Stefan Otto (UNINETT) had the lead on this tech scout. Jan Meijer (UNINETT) and Simon Skrødal (UNINETT) were the document editors. 1.2 Background The Session Initiation Protocol (SIP) is a system of rules that governs the signalling and controlling of multimedia communication sessions. This technology scout investigates how the WebRTC ecosystem may integrate and support legacy SIP equipment. There are a number of scenarios where it would make sense to enable audio/video communication between legacy SIP clients and web browsers. While participation in a classical SIP video meeting with a WebRTC-enabled browser is already possible, the other way around is not. You can not participate in a WebRTC browser meeting using a SIP client. This will never work via a universal gateway because there is no standardized signalling protocol in WebRTC, meaning that you would need to implement your own gateway for each WebRTC-service. Other, more feasible and value-adding use cases include:
  • 5. Introduction SA8T2 Internal Deliverable Technology Scout: WebRTC2SIP Gateway 4 • easy to integrate call buttons where web page visitors can ring to your organization's internal telephony network by pressing a button in their browser • participate with a browser in a classic audio only conference • build Point-of-Presence systems which can interact both with classical telephony and legacy video systems • wherever you want to connect a browser to telephony or legacy SIP video systems WebRTC and SIP media sessions have many similarities (see Figure 1: WebRTC Signalling and media and Figure 2: SIP Signalling and media). Since WebRTC standardization began, there have been ongoing discussions and efforts towards maintaining compatibility with classic SIP audio/video equipment. For this reason, there are no specific signalling protocols defined for WebRTC, meaning you can use SIP if you want. Further, the Session Description Protocol (SDP) is used by SIP as well as WebRTC to describe media session and communication parameters, such as key-fingerprints and IP- address candidates. In WebRTC, this SDP "blob" has to be sent with the signalling protocol of your choice. Hence, there are several similarities worth investigating further in order to bridge WebRTC and SIP. Figure 1: WebRTC Signalling and media Figure 2: SIP Signalling and media
  • 6. Introduction SA8T2 Internal Deliverable Technology Scout: WebRTC2SIP Gateway 5 1.3 Rationale There is a large installed base of SIP infrastructure in the R&E community. Effectively every Unified Communication installation adds to this. That makes it very interesting to investigate how WebRTC can be used to add value to this installed base, and how the installed base can be used to facilitate WebRTC adoption. 1.4 Tech scout objective and methodology The objective for this tech scout was to investigate how the WebRTC ecosystem may integrate and support legacy SIP equipment and what type of value-adding use cases could be addressed using the solution(s) identified. The concept and architecture of a WebRTC2SIP gateway was explored upon which a PoC was built using open source components.
  • 7. SA8T2 Internal Deliverable Technology Scout: WebRTC2SIP Gateway 6 2 Challenges A closer look identifies a number of issues that must be addressed. 2.1 Transfer Protocol SIP-clients use direct TCP or UDP to transport SIP packets. The web browser, on the other hand, can only communicate using HTTP/WebSocket. Since the web developer cannot make the web browser send or receive SIP-messages to/from a specified IP-address/port, the transfer protocol must be converted. This may be achieved by using the WebSocket protocol as transport for SIP (see https://tools.ietf.org/html/rfc7118) or to translate to SIP on the WebRTC-signalling server and send forwards. 2.2 Codecs The next challenge involves the video/audio codec negotiation. Current WebRTC-enabled browsers (e.g. Firefox/Chrome) support the following codecs: Video — VP8 (MTI), VP9 and H264 (MTI - supported on Firefox, experimental support in Chrome- M50) Audio — opus (MTI), G.711 (MTI), iSAC and G.722 SIP clients usually understand several codecs, but if there is no single match to the ones from the browser they will not be able to talk to each other. A gateway could decode and encode the streams to the supported codec, but this would add significant CPU workload, additional latency and compatibility issues. 2.3 Encryption For WebRTC connections it is mandatory to use DTLS to establish a secure SRTP connection. Only a few legacy systems support this.
  • 8. Challenges SA8T2 Internal Deliverable Technology Scout: WebRTC2SIP Gateway 7 2.4 ICE In order to establish connections through firewalls and NAT, routers, WebRTC clients and SIP-clients use ICE (Interactive Connectivity Establishment, see https://tools.ietf.org/html/rfc5245). There exist several improving extensions, e.g. TCP Candidates with ICE (https://tools.ietf.org/html/rfc6544) and the Trickle ICE draft (https://tools.ietf.org/html/draft-ietf-mmusic-trickle-ice-02), which legacy SIP equipment usually does not know about, but WebRTC clients do. Other issues include RTP/RTCP muxing into one UDP port (http://tools.ietf.org/html/rfc5761) and bundling several media streams in one address:port combination (BUNDLE draft — https://tools.ietf.org/html/draft-ietf-mmusic-sdp-bundle-negotiation-27), used by WebRTC-clients and preventing direct communication with SIP legacy clients.
  • 9. SA8T2 Internal Deliverable Technology Scout: WebRTC2SIP Gateway 8 3 Possible candidates A possible gateway architecture is suggested by Figure 3: WebRTC2SIP gateway. Figure 3: WebRTC2SIP gateway The gateway consists of a SIP-proxy and an RTP-proxy. The SIP-proxy accepts SIP packets via the web client's WebSocket. SDP is translated (delete, generate, replace ICE candidates, BUNDLE lines, DTLS fingerprints, ...) and the RTP-proxy then bridges media traffic (IPv4/IPv6, SRTP/RTP, RTP/RTCP multiplexing/demultiplexing, BUNDLE/unBUNDLE media streams, ...). Since the technology scout is restricted to consider open source solutions only, several commercial solutions were disregarded. However, for the sake of completeness, we want to mention Acano (https://www.acano.com) and Pexip (https://www.pexip.com), which include WebRTC2SIP gateway functionality in their products. 3.1 FreeSWITCH While FreeSWITCH (https://freeswitch.org)looks like a promising candidate worth testing, we were unable to do so due to time constraints. It features a scalable telephony platform designed to route and interconnect popular communication protocols using audio, video, text or any other form of media, support communication technologies such as Skype, SIP, H.323 and WebRTC. FreeSWITCH can perform full video transcoding and MCU functionality using its conferencing module. Web-browser SIP UA Gateway SIP-Proxy RTP-proxy Control commands wss:443 5060 wss:SIP/SDP tcp/udp:SIP/SDP UDP range udp:DTLS/ICE/SRTP udp:RTP/SRTP UDP range
  • 10. Possible candidates SA8T2 Internal Deliverable Technology Scout: WebRTC2SIP Gateway 9 3.2 Doubango webrtc2sip Doubango Telecom is a young telecom company located in France, with a big focus on open source solutions in IMS/SIP and WebRTC area. SIPml5, a browser JavaScript SIP library, is provided by Doubango Telecom. Their Doubango webrtc2sip media gateway (https://www.doubango.org/webrtc2sip/) consists of 4 modules (SIP Proxy, RTCWeb Breaker, Media Coder, Click-to-Call) following the same philosophy as described in this document. Additionally, it features audio/video transcoding abilities. In our tests one year ago we experienced the solution as slightly unstable. There are no binary packages, so you have to build everything on your own. After updating openSSL due to security issues, we were no longer able to build it and thus ended our testing of webrtc2sip at that point. 3.3 Janus The Italian company Meetecho, located in Naples, provides an open source general purpose WebRTC Gateway called Janus (https://janus.conf.meetecho.com). Janus consists of a small footprint core, which can be extended/customized with a number of plugins. There are already a few plugins available, e.g. audiobridge, echotest, recordplay, SIP, streaming, videocall, videoroom and voicemail. The SIP plugin enables peers to register through Janus to a SIP server and call in and out. The functionality is marked as unstable and need further testing - for now tested successfully audio only. The SIP plugin is based on Sofia SIP (http://sofia-sip.sourceforge.net). No documentation was found in regard to SDP translating between legacy SIP equipment and WebRTC. 3.4 Kamailio + rtpengine The author of this document is part of the Norwegian real-time group at UNINETT, and we built a SIP infrastructure based on the solid SIP router Kamailio (https://www.kamailio.org). It therefore made sense to focus our attention on a SIP-proxy solution based on Kamailio.
  • 11. Solution Overview SA8T2 Internal Deliverable Technology Scout: WebRTC2SIP Gateway 10 4 Solution Overview Figure 4: WebRTC2SIP-Gateway overview The implemented solution utilizes Kamailio as the SIP-proxy and Sipwise rtpengine (https://github.com/sipwise/rtpengine) as the RTP-proxy. Kamailio controls rtpengine with the integrated rtpengine module to facilitate the following: Kamailio passes a received SDP body to rtpengine à rtpengine rewrites the body and returns it à Kamailio forwards the rewritten body. This flow guarantees that each SIP-client (WebRTC SIP.js clients as well) gets only ICE candidates from rtpengine. In result RTP traffic will flow via rtpengine. Additionally, rtpengine takes care of BUNDLEd media and muxed RTP/RTCP channels and rewrites these lines in the SDP body as well. Hence, rtpengine effectively talks to each client side and translates in the middle (this does not include media transcoding). The web server is the entry point for the web browser and its naming should be user friendly (e.g. call-the-ancient-world.net). Running the HTML/Javascript-code from the web server turns the browser into a WebRTC SIP client that registers on Kamailio. The client is then callable via a SIP-URI world-wide or can place its own calls. In this example configuration, the SIP-URI is websip@gateway- domain.no Should the WebRTC client be unable to connect directly to rtpengine it will receive support from the TURN-server, which listens on TCP/TLS port 443 and forwards the media traffic to rtpengine via UDP. This is needed to pass restrictive firewalls on the client side. rtpengine does not support RTP media over TCP for now — if this will be the case in the (near) future, there will no longer be a need for a TURN server.
  • 12. Solution Overview SA8T2 Internal Deliverable Technology Scout: WebRTC2SIP Gateway 11 All components could be located on the same server, but in order to get listening on port 443 working for all servers for firewall traversal, web-server, Kamailio and TURN server each will need an independent IP-address.
  • 13. SA8T2 Internal Deliverable Technology Scout: WebRTC2SIP Gateway 12 5 Limitations rtpengine is just a proxy so there is no media transcoding. SIP clients that do not support VP8/H264 video codecs cannot be called or make calls. For now, only Firefox supports both video codecs, Chrome’s support for H264 is not stable yet and Microsoft Edge supports only H264. As the IETF rtcweb-standardization group has decided to make both video-codecs mandatory to implement, I sooner or later expect support for both codecs in all WebRTC-enabled browsers. On the other side, legacy SIP clients usually support H264. Some modern systems and software clients integrate VP8 as well. Acano, for example, has both on their system.
  • 14. SA8T2 Internal Deliverable Technology Scout: WebRTC2SIP Gateway 13 6 Performance and Scalability Since there is no media transcoding, the limiting factor would be the network bandwidth for media traffic over rtpengine. For large scale installations, rtpengine could be distributed over several instances on different locations. For a 1 Gigabit Ethernet interface there should be roughly 100 concurrent calls possible.
  • 15. SA8T2 Internal Deliverable Technology Scout: WebRTC2SIP Gateway 14 7 Security considerations User credentials for the SIP-proxy and for the TURN server are publicly available from the web server. Some kind of authentication should therefore be established in front of the web server. The TURN server should be protected with time-limited secret-based authentication (see A REST API For Access To TURN Services, https://tools.ietf.org/html/draft-uberti-behave-turn-rest-00) or an oAuth- based client authorization, which is experimentally supported by the coTURN TURN server. To protect Kamailio, we could generate user accounts dynamically on the web server and push these to Kamailio’s user-database. Since media traffic is decrypted in the Gateway, it is possible to intercept the media traffic between the gateway and legacy SIP equipment. Metadata interception is possible if you intercept network traffic to and from the gateway. You can get IP-address based call information (when, how long, SIP header information).
  • 16. SA8T2 Internal Deliverable Technology Scout: WebRTC2SIP Gateway 15 8 Conclusions We have demonstrated that it is possible to build a scalable WebRTC gateway from open source components. It was possible to get stable connections to: - Alcatel-Lucent PSTN-Gateway (audio) - Asterisk based conference system (audio) - Several softphones such as Ekiga or Linphone (audio + video) - Acano video meeting (audio + video) The solution is far away from being interoperable with the whole SIP legacy world, but it is a starting point. There is still a video codec problem, which hopefully will be solved soon. There are also issues with several SIP systems that must be analyzed further. However, it is already possible to deliver a stable "call button" solution, or an alternative video client, for calling modern videoconferencing systems like Acano.
  • 17. SA8T2 Internal Deliverable Technology Scout: WebRTC2SIP Gateway 16 Appendix A Setup WebRTC2SIP-gateway This section describes how to install and set up Kamailio + rtpengine + TURN server + WebRTC client to enable calling between WebRTC clients and legacy SIP clients. This setup will bridge SRTP-RTP and ICE-nonICE to make WebRTC clients (SIP.js) able to call legacy SIP clients. The setup is pertinent to Debian 8 Jessie for all servers. For clients to avoid firewalls and to have the best setup, divide the servers like this: 1. Server — Kamailio + rtpengine 2. Server — TURN (provide TCP/UDP connections on port 443 for your WebRTC clients to pass restrictive firewalls) 3. Server — Web server to serve the WebRTC client with SIP.js The configuration is set up to try connecting with SIP without modification. If the proxy receives a "488 Not Supported Here" from the other side, it will remove SRTP and ICE from the SDP and try again to INVITE. A.1 Get certificates For the needed certificates, I recommend Let's Encrypt (https://letsencrypt.org). They will work for Kamailio TLS, Nginx TLS and coTURN TLS. Run the following on each server you need certificates for (you must stop services running on port 443 during certificate request/renewal): # git clone https://github.com/letsencrypt/letsencrypt # cd letsencrypt # ./letsencrypt 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 Copy them to the appropriate location. A.2 Get configuration files Files needed to setup all components on Debian 8 Jessie:
  • 18. Conclusions SA8T2 Internal Deliverable Technology Scout: WebRTC2SIP Gateway 17 git clone https://github.com/havfo/WebRTC-to-SIP.git cd WebRTC-to-SIP find . -type f -print0 | xargs -0 sed -i 's/XXXXX-XXXXX/PUT-IP-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' find . -type f -print0 | xargs -0 sed -i 's/XXX-XXX/PUT-DOMAIN-OF-YOUR- TURN-SERVER-HERE/g' A.3 Install rtpengine The following achieves the SRTP-RTP bridging needed to make WebRTC clients talk to legacy SIP server/clients: apt-get install dpkg-dev debhelper iptables-dev libcurl4-openssl-dev libglib2.0-dev libhiredis-dev libpcre3-dev libssl-dev markdown zlib1g-dev libxmlrpc-core-c3-dev dkms linux-headers-`uname -r` git clone https://github.com/sipwise/rtpengine.git cd rtpengine ./debian/flavors/no_ngcp dpkg-buildpackage cd .. dpkg -i 'ngcp-rtpengine-daemon_*' 'ngcp-rtpengine-iptables_*' 'ngcp- rtpengine-kernel-dkms_*' cd WebRTC-to-SIP cp etc/default/ngcp-rtpengine-daemon /etc/default/ /etc/init.d/ngcp-rtpengine-daemon restart A.4 Install IPTables firewall (optional) Optional, but recommended to secure your servers. It will work on all three servers, but you should customize _iptables.sh_ for each of them (e.g. the web server does not need the TURN, RTPENGINE and RTP rules, while the TURN server does not need the RTPENGINE rule). If installed it will persist after reboot. You can run the _iptables.sh_ 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 A.5 Install Kamailio apt-get install kamailio kamailio-websocket-modules kamailio-mysql-modules kamailio-tls-modules kamailio-presence-modules mysql-server cd WebRTC-to-SIP
  • 19. Conclusions SA8T2 Internal Deliverable Technology Scout: WebRTC2SIP Gateway 18 cp etc/kamailio/* /etc/kamailio/ kamdbctl create Select yes (Y) for all options. kamctl add websip websip /etc/init.d/kamailio restart A.6 Install WebRTC client apt-get install nginx cd WebRTC-to-SIP cp etc/nginx/sites-available/default /etc/nginx/sites-available/ cp -r client/* /var/www/html/ A.7 Install TURN server apt-get install rfc5766-turn-server cp etc/default/rfc5766-turn-server /etc/default/ cp etc/turn* /etc/ /etc/init.d/rfc5766-turn-server restart A.8 Testing You should now be able to go to https://webrtcnginxserver/ and call to legacy SIP clients.