SlideShare a Scribd company logo
Jingle: Cutting Edge Open Source VoIP Matt Tucker CTO, Jive Software
I like XMPP
The Vision: People wouldn’t stop asking for voice chat to be added to XMPP. or Worldwide federated network that combines messaging, presence and voice. Ensure there are Open Source tools for all of it.
Current approaches don’t work  Skype Closed network Proprietary protocol SIP Poor protocol for IM and presence Very little world-wide federation Most implementations don’t do Skype-type p2p
In this talk XMPP Overview All about Jingle Protocol flow NAT traversal (ICE) Open Source implementations Others uses for Jingle
XMPP eXtensible Messaging and Presence Protocol Open standard approved by the IETF as RFC 3920 and 3921, maintained and extended by the XMPP Standards Foundation Countless servers and clients deployed in an open federation. XMPP already won as  the  open standard for IM
XMPP Protocol Basics XML based, making it very easy to use and extend Strong security (TLS) and identity protection built-in   Secure Communications with Jabber    Peter Saint-Andre    Time:  11:35AM - 12:20PM    Location:  D137-138  Major packet types: Message, Presence and IQ
Sample XMPP Message <message to='matt@jivesoftware.com' from='gato@igniterealtime.org' type='chat'> <thread>thread1</thread> <body>How's that presentation going?</body> </message>
XEPs: XMPP Extension Protocols Core RFC’s are extended through an open process by the XSF Key extensions cover multi-user chat, file transfer, avatars, publish-subscribe Jingle is a set of XEPs
Example packet extension <message to='player@igniterealtime.org' from='dealer@igniterealtime.org'> <body>Blackjack!</body> <gameData xmlns='casino:blackjack'> <card1 rank='ace' suit='diamonds'/> <card2 rank='jack' suit='spades'/> </gameData> </message>
Jingle Many attempts at VoIP were tried – stream initiation, TINS, etc. None of them worked very well. Google launched their XMPP network with voice support, then joined the standards effort to define Jingle. Covered by several XMPP extensions:    XEP-166: Jingle   XEP-167: Jingle Audio via RTP   XEP-176: Jingle ICE Transport   XEP-177: Jingle Raw UDP Transport   XEP-180: Jingle Video via RTP   XEP-181: Jingle DTMF   XEP-183: Jingle Telepathy Transport Method   XEP-208: Bootstrapping Implementation of Jingle   XEP-215: STUN Server Discovery for Jingle   Acronym soup: ICE, STUN, TURN
Jingle in three easy steps Do you want a session? Session Negotiation What kind of session do you want to negotiate? (voice, video, file transfer?) Content Negotiation How are we going to make this session work? (direct connect, ICE, media proxy?) Transport Negotiation
<iq from='romeo@montague.net/orchard‘ to='juliet@capulet.com/balcony‘ id='jingle1‘ type='set'> <jingle xmlns='http://www.xmpp.org/extensions/xep-0166.html#ns‘    action='session-initiate‘   initiator='romeo@montague.net/orchard‘   sid='a73sjjvkla37jfea‘>     <content creator='romeo@montague.net‘ name='this-is-the-audio-content'>   <description xmlns='http://www.xmpp.org/extensions/xep-0167.html#ns'>   <payload-type id='96' name='speex' clockrate='16000'/>   <payload-type id='97' name='speex' clockrate='8000'/>   </description>   <transport xmlns='http://www.xmpp.org/extensions/xep-0177.html#ns'>   <candidate .../>   <candidate ip='10.1.1.104' port='13540' generation='0'/>   </transport>   </content> </jingle> </iq> Jingle packet example
SIP packet example INVITE sip:bob@biloxi.example.com SIP/2.0 Via: SIP/2.0/TCP client.atlanta.example.com:5060;branch=z9hG4bK74bf9 Max-Forwards: 70 From: Alice <sip:alice@atlanta.example.com>;tag=9fxced76sl To: Bob <sip:bob@biloxi.example.com> Call-ID: 3848276298220188511@atlanta.example.com CSeq: 2 INVITE Proxy-Authorization: Digest username=&quot;alice&quot;, realm=&quot;atlanta.example.com&quot;, nonce=&quot;wf84f1ceczx41ae6cbe5aea9c8e88d359&quot;, opaque=&quot;&quot;, uri=&quot;sip:bob@biloxi.example.com&quot;, response=&quot;42ce3cef44b22f50c6a6071bc8“ Contact: <sip:alice@client.atlanta.example.com;transport=tcp> Content-Type: application/sdp Content-Length: 151 v=0 o=alice 2890844526 2890844526 IN IP4 client.atlanta.example.com s=- c=IN IP4 192.0.2.101 t=0 0 m=audio 49172 RTP/AVP 0 a=rtpmap:0 PCMU/8000
Transport approaches Always use the server to transport media Pro: always works (we’re using the server to send XMPP packets already) Con: overloads the server, may be too slow for real-time protocols like voice/video. (~2000 concurrent users max) Try to go peer to peer Pro: scales forever. Best way to build a worldwide network. Con: gets  really  complicated with firewalls and NATs.
Making peer to peer work Step 1: try direct connect between IP addresses. (typically only works inside a local network) Step 2: if #1 fails, the parties are probably behind a firewall or NAT. Do some “crazy stuff” to punch through. (can work up to 90% of the time) Step 3: if #2 fails, there’s a pretty strict firewall in place so failover to using the server (media relay) (catch the other 10% or so) The sum of these techniques is ICE,  at the cutting edge of VoIP connectivity
Jingle connection architecture
What is NAT? Problem:  the internet was running out of IPv4 addresses Whoops. In the same category as the fake Bill Gates quote: ”640K ought to be enough for anybody” Solution:  group a bunch of computers behind a single IP address using Network Address Translation You don’t know your public IP when behind a NAT. The NAT device dynamically assigns ports to internal hosts to keep all the network traffic going to the right places Better Solution:  IPv6 – bigger addresses (not being adopted worldwide anytime soon)  340,282,366,920,938,463,463,374,607,431,768,211,456 addresses, or enough to give multiple IP addresses to every grain of sand on the planet. Could run into problems when humans conquer multiple galaxies?
“ Crazy stuff”: punching through NATs Step 1: use a STUN server to find your public IP address Me:  Hey STUN server, I don’t know my IP Address. Can you help? NUTS (the STUN server):  Looking at the packet you sent me, I see that the IP address of your NAT device is AAA.BBB.CCC.DDD Me:  Sweet! Step 2: figure out more stuff using the STUN server Me:  Ok, now I want to check to see what my NAT device does with ports. Does the public port change when I connect to different IP addresses? NUTS:  Well, good question. I have another IP address you can connect to in order to try that. Me:  Awesome, I tried that out and now I know more about my NAT device. Based on my local addresses, what you told me, plus what the other guy told me, I now have have a bunch of address/port options I can try with the other party. NUTS:  No problem, glad to help! Buh-bye. Step 3: connectivity checking to try to create a hole Me:  Can you hear me on this IP/port? You:  … [Silence] Me:  Hmm, the last one didn’t work. How about this one? You:  … [Silence] Me:  This is taking awhile… arg! How about this one? You:  I hear you, I hear you! Yay, we found a hole. (Punching holes works better with UDP vs. TCP)
Jingle Client Libraries libjingle from Google -- http://code.google.com/apis/talk/libjingle/index.html Telepathy -- http://telepathy.freedesktop.org Smack – http://www.igniterealtime.org
Jingle server support Openfire: an Open Source XMPP server  with enhancements for Jingle. Built-in media relay Without it, P2P calls won’t always complete Built-in STUN server Without it, you’ll have to use public STUN servers
Jingle: not just for voice File transfer Screen sharing Video Whiteboard Anything else that uses a lot of bandwidth or that does streaming
Jingle: what’s missing Haven’t defined a way to do VoIP conferencing Advanced call controls are missing (hold, transfer, etc). There’s a general consensus that this stuff shouldn’t be added to Jingle. Leave it to SIP. Other Jingle content types (besides audio) are either not defined or immature
Current Jingle status Standards work on the fundamentals and audio content profile is wrapping up. Waiting for Google to switch to official Jingle protocol. Need interop work between different implementations. Jingle is poised to fulfill its promise as an open standard for a federated, world-wide VoIP network.
Questions? Contact me via IM or email: [email_address] Resources http://www.xmpp.org http://www.igniterealtime.org Secure Communications with Jabber  Peter Saint-Andre  Time:  11:35AM - 12:20PM  Location:  D137-138

More Related Content

PPTX
Building your own open-source voice assistant
All Things Open
 
PPTX
DIY Jarvis All Things Open 2019
Wes Widner
 
PPT
Ad-Hoc Networking in Linux with Avahi
sinchume
 
PPT
Jingle: Cutting Edge VoIP
mattjive
 
PDF
JmDNS : Service Discovery for the 21st Century
Gnu Alsonative
 
PDF
Internet TV
Adrian Hornsby
 
ZIP
XMPP 101
Remko Tronçon
 
PDF
ScavengerEXA
Thomas Mangin
 
Building your own open-source voice assistant
All Things Open
 
DIY Jarvis All Things Open 2019
Wes Widner
 
Ad-Hoc Networking in Linux with Avahi
sinchume
 
Jingle: Cutting Edge VoIP
mattjive
 
JmDNS : Service Discovery for the 21st Century
Gnu Alsonative
 
Internet TV
Adrian Hornsby
 
XMPP 101
Remko Tronçon
 
ScavengerEXA
Thomas Mangin
 

What's hot (16)

PDF
Protecting Plone from the Big, Bad Internet
Erik Rose
 
PPTX
Network address translations
Shahzad shareef
 
PDF
Apple bonjour
Purvik Rana
 
PDF
Maksim Melnikau aka “max_posedon” - Telepathy Framework Intro
Minsk Linux User Group
 
DOC
Itep
Sofia Palawan
 
PDF
Computer network (10)
NYversity
 
PDF
XMPP Intro - The camp2012
Steffen Larsen
 
PDF
Xmpp intro 2014
Steffen Larsen
 
PDF
Naked BGP
Thomas Mangin
 
PPT
Networking For Application Developers by Roy Kim
Roy Kim
 
PDF
Devoxx Maroc 2015 HTTP 1, HTTP 2 and folks
Nicolas Martignole
 
PPTX
Doppio: Breaking the Browser Language Barrier
Emery Berger
 
PDF
How to make DSL
Yukio Goto
 
PDF
ExaBGP at LINX 83
Thomas Mangin
 
PPT
Networking 101
webhostingguy
 
Protecting Plone from the Big, Bad Internet
Erik Rose
 
Network address translations
Shahzad shareef
 
Apple bonjour
Purvik Rana
 
Maksim Melnikau aka “max_posedon” - Telepathy Framework Intro
Minsk Linux User Group
 
Computer network (10)
NYversity
 
XMPP Intro - The camp2012
Steffen Larsen
 
Xmpp intro 2014
Steffen Larsen
 
Naked BGP
Thomas Mangin
 
Networking For Application Developers by Roy Kim
Roy Kim
 
Devoxx Maroc 2015 HTTP 1, HTTP 2 and folks
Nicolas Martignole
 
Doppio: Breaking the Browser Language Barrier
Emery Berger
 
How to make DSL
Yukio Goto
 
ExaBGP at LINX 83
Thomas Mangin
 
Networking 101
webhostingguy
 
Ad

Similar to Os Tucker (20)

PDF
Chat app case study - xmpp vs SIP
Genora Infotech
 
PDF
Watch out - The Norwegian Version
Olle E Johansson
 
PDF
Rethinking the PBX
Saúl Ibarra Corretgé
 
PPT
Sinnreich Henry Johnston Alan Pt 2
Carl Ford
 
PDF
XMPP Standards Update
stpeter
 
PPT
Introduction to VoIP using SIP
Kundan Singh
 
PPT
Sinnreich Henry Johnston Alan Pt 3
Carl Ford
 
KEY
SIP : Watch out - don't stay behind!
Olle E Johansson
 
PDF
respond_to :voice - the convergence of voice and web interfaces with Rails an...
jpalley
 
PDF
Messaging With Erlang And Jabber
l xf
 
PDF
Microblogging via XMPP
Stoyan Zhekov
 
PPT
Introduction To SIP
Chris McAndrew
 
PDF
Jingle
stpeter
 
PPT
Sinnreich Henry Johnston Alan Pt 1
Carl Ford
 
PPT
Indigo Product And Technology Overivew 2005
ir. Carmelo Zaccone
 
PDF
XMPP - Introduction And LAS Implementation (Presentation)
Ralf Klamma
 
PDF
XMPP Intro 1101 - 2008
Steffen Larsen
 
PPT
SIP for geeks
Kundan Singh
 
PDF
JavaOne - A Sip Of Java - RJ Auburn
Voxeo Corp
 
Chat app case study - xmpp vs SIP
Genora Infotech
 
Watch out - The Norwegian Version
Olle E Johansson
 
Rethinking the PBX
Saúl Ibarra Corretgé
 
Sinnreich Henry Johnston Alan Pt 2
Carl Ford
 
XMPP Standards Update
stpeter
 
Introduction to VoIP using SIP
Kundan Singh
 
Sinnreich Henry Johnston Alan Pt 3
Carl Ford
 
SIP : Watch out - don't stay behind!
Olle E Johansson
 
respond_to :voice - the convergence of voice and web interfaces with Rails an...
jpalley
 
Messaging With Erlang And Jabber
l xf
 
Microblogging via XMPP
Stoyan Zhekov
 
Introduction To SIP
Chris McAndrew
 
Jingle
stpeter
 
Sinnreich Henry Johnston Alan Pt 1
Carl Ford
 
Indigo Product And Technology Overivew 2005
ir. Carmelo Zaccone
 
XMPP - Introduction And LAS Implementation (Presentation)
Ralf Klamma
 
XMPP Intro 1101 - 2008
Steffen Larsen
 
SIP for geeks
Kundan Singh
 
JavaOne - A Sip Of Java - RJ Auburn
Voxeo Corp
 
Ad

More from oscon2007 (20)

PDF
J Ruby Whirlwind Tour
oscon2007
 
ODP
Solr Presentation5
oscon2007
 
PDF
Os Borger
oscon2007
 
PDF
Os Harkins
oscon2007
 
PDF
Os Fitzpatrick Sussman Wiifm
oscon2007
 
PDF
Os Bunce
oscon2007
 
PDF
Yuicss R7
oscon2007
 
PDF
Performance Whack A Mole
oscon2007
 
ODP
Os Fogel
oscon2007
 
PDF
Os Lanphier Brashears
oscon2007
 
PDF
Os Fitzpatrick Sussman Swp
oscon2007
 
PDF
Os Furlong
oscon2007
 
PDF
Os Berlin Dispelling Myths
oscon2007
 
PDF
Os Kimsal
oscon2007
 
PDF
Os Pruett
oscon2007
 
PDF
Os Alrubaie
oscon2007
 
PDF
Os Keysholistic
oscon2007
 
ODP
Os Jonphillips
oscon2007
 
PDF
Os Urnerupdated
oscon2007
 
ODP
Adventures In Copyright Reform
oscon2007
 
J Ruby Whirlwind Tour
oscon2007
 
Solr Presentation5
oscon2007
 
Os Borger
oscon2007
 
Os Harkins
oscon2007
 
Os Fitzpatrick Sussman Wiifm
oscon2007
 
Os Bunce
oscon2007
 
Yuicss R7
oscon2007
 
Performance Whack A Mole
oscon2007
 
Os Fogel
oscon2007
 
Os Lanphier Brashears
oscon2007
 
Os Fitzpatrick Sussman Swp
oscon2007
 
Os Furlong
oscon2007
 
Os Berlin Dispelling Myths
oscon2007
 
Os Kimsal
oscon2007
 
Os Pruett
oscon2007
 
Os Alrubaie
oscon2007
 
Os Keysholistic
oscon2007
 
Os Jonphillips
oscon2007
 
Os Urnerupdated
oscon2007
 
Adventures In Copyright Reform
oscon2007
 

Recently uploaded (20)

PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PDF
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PDF
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PPTX
Simple and concise overview about Quantum computing..pptx
mughal641
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PPTX
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
PDF
Software Development Methodologies in 2025
KodekX
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
The Future of Artificial Intelligence (AI)
Mukul
 
Simple and concise overview about Quantum computing..pptx
mughal641
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
Software Development Methodologies in 2025
KodekX
 

Os Tucker

  • 1. Jingle: Cutting Edge Open Source VoIP Matt Tucker CTO, Jive Software
  • 3. The Vision: People wouldn’t stop asking for voice chat to be added to XMPP. or Worldwide federated network that combines messaging, presence and voice. Ensure there are Open Source tools for all of it.
  • 4. Current approaches don’t work Skype Closed network Proprietary protocol SIP Poor protocol for IM and presence Very little world-wide federation Most implementations don’t do Skype-type p2p
  • 5. In this talk XMPP Overview All about Jingle Protocol flow NAT traversal (ICE) Open Source implementations Others uses for Jingle
  • 6. XMPP eXtensible Messaging and Presence Protocol Open standard approved by the IETF as RFC 3920 and 3921, maintained and extended by the XMPP Standards Foundation Countless servers and clients deployed in an open federation. XMPP already won as the open standard for IM
  • 7. XMPP Protocol Basics XML based, making it very easy to use and extend Strong security (TLS) and identity protection built-in Secure Communications with Jabber Peter Saint-Andre Time: 11:35AM - 12:20PM Location:  D137-138 Major packet types: Message, Presence and IQ
  • 8. Sample XMPP Message <message to='[email protected]' from='[email protected]' type='chat'> <thread>thread1</thread> <body>How's that presentation going?</body> </message>
  • 9. XEPs: XMPP Extension Protocols Core RFC’s are extended through an open process by the XSF Key extensions cover multi-user chat, file transfer, avatars, publish-subscribe Jingle is a set of XEPs
  • 10. Example packet extension <message to='[email protected]' from='[email protected]'> <body>Blackjack!</body> <gameData xmlns='casino:blackjack'> <card1 rank='ace' suit='diamonds'/> <card2 rank='jack' suit='spades'/> </gameData> </message>
  • 11. Jingle Many attempts at VoIP were tried – stream initiation, TINS, etc. None of them worked very well. Google launched their XMPP network with voice support, then joined the standards effort to define Jingle. Covered by several XMPP extensions: XEP-166: Jingle XEP-167: Jingle Audio via RTP XEP-176: Jingle ICE Transport XEP-177: Jingle Raw UDP Transport XEP-180: Jingle Video via RTP XEP-181: Jingle DTMF XEP-183: Jingle Telepathy Transport Method XEP-208: Bootstrapping Implementation of Jingle XEP-215: STUN Server Discovery for Jingle Acronym soup: ICE, STUN, TURN
  • 12. Jingle in three easy steps Do you want a session? Session Negotiation What kind of session do you want to negotiate? (voice, video, file transfer?) Content Negotiation How are we going to make this session work? (direct connect, ICE, media proxy?) Transport Negotiation
  • 13. <iq from='[email protected]/orchard‘ to='[email protected]/balcony‘ id='jingle1‘ type='set'> <jingle xmlns='http://www.xmpp.org/extensions/xep-0166.html#ns‘ action='session-initiate‘ initiator='[email protected]/orchard‘ sid='a73sjjvkla37jfea‘> <content creator='[email protected]‘ name='this-is-the-audio-content'> <description xmlns='http://www.xmpp.org/extensions/xep-0167.html#ns'> <payload-type id='96' name='speex' clockrate='16000'/> <payload-type id='97' name='speex' clockrate='8000'/> </description> <transport xmlns='http://www.xmpp.org/extensions/xep-0177.html#ns'> <candidate .../> <candidate ip='10.1.1.104' port='13540' generation='0'/> </transport> </content> </jingle> </iq> Jingle packet example
  • 14. SIP packet example INVITE sip:[email protected] SIP/2.0 Via: SIP/2.0/TCP client.atlanta.example.com:5060;branch=z9hG4bK74bf9 Max-Forwards: 70 From: Alice <sip:[email protected]>;tag=9fxced76sl To: Bob <sip:[email protected]> Call-ID: [email protected] CSeq: 2 INVITE Proxy-Authorization: Digest username=&quot;alice&quot;, realm=&quot;atlanta.example.com&quot;, nonce=&quot;wf84f1ceczx41ae6cbe5aea9c8e88d359&quot;, opaque=&quot;&quot;, uri=&quot;sip:[email protected]&quot;, response=&quot;42ce3cef44b22f50c6a6071bc8“ Contact: <sip:[email protected];transport=tcp> Content-Type: application/sdp Content-Length: 151 v=0 o=alice 2890844526 2890844526 IN IP4 client.atlanta.example.com s=- c=IN IP4 192.0.2.101 t=0 0 m=audio 49172 RTP/AVP 0 a=rtpmap:0 PCMU/8000
  • 15. Transport approaches Always use the server to transport media Pro: always works (we’re using the server to send XMPP packets already) Con: overloads the server, may be too slow for real-time protocols like voice/video. (~2000 concurrent users max) Try to go peer to peer Pro: scales forever. Best way to build a worldwide network. Con: gets really complicated with firewalls and NATs.
  • 16. Making peer to peer work Step 1: try direct connect between IP addresses. (typically only works inside a local network) Step 2: if #1 fails, the parties are probably behind a firewall or NAT. Do some “crazy stuff” to punch through. (can work up to 90% of the time) Step 3: if #2 fails, there’s a pretty strict firewall in place so failover to using the server (media relay) (catch the other 10% or so) The sum of these techniques is ICE, at the cutting edge of VoIP connectivity
  • 18. What is NAT? Problem: the internet was running out of IPv4 addresses Whoops. In the same category as the fake Bill Gates quote: ”640K ought to be enough for anybody” Solution: group a bunch of computers behind a single IP address using Network Address Translation You don’t know your public IP when behind a NAT. The NAT device dynamically assigns ports to internal hosts to keep all the network traffic going to the right places Better Solution: IPv6 – bigger addresses (not being adopted worldwide anytime soon) 340,282,366,920,938,463,463,374,607,431,768,211,456 addresses, or enough to give multiple IP addresses to every grain of sand on the planet. Could run into problems when humans conquer multiple galaxies?
  • 19. “ Crazy stuff”: punching through NATs Step 1: use a STUN server to find your public IP address Me: Hey STUN server, I don’t know my IP Address. Can you help? NUTS (the STUN server): Looking at the packet you sent me, I see that the IP address of your NAT device is AAA.BBB.CCC.DDD Me: Sweet! Step 2: figure out more stuff using the STUN server Me: Ok, now I want to check to see what my NAT device does with ports. Does the public port change when I connect to different IP addresses? NUTS: Well, good question. I have another IP address you can connect to in order to try that. Me: Awesome, I tried that out and now I know more about my NAT device. Based on my local addresses, what you told me, plus what the other guy told me, I now have have a bunch of address/port options I can try with the other party. NUTS: No problem, glad to help! Buh-bye. Step 3: connectivity checking to try to create a hole Me: Can you hear me on this IP/port? You: … [Silence] Me: Hmm, the last one didn’t work. How about this one? You: … [Silence] Me: This is taking awhile… arg! How about this one? You: I hear you, I hear you! Yay, we found a hole. (Punching holes works better with UDP vs. TCP)
  • 20. Jingle Client Libraries libjingle from Google -- http://code.google.com/apis/talk/libjingle/index.html Telepathy -- http://telepathy.freedesktop.org Smack – http://www.igniterealtime.org
  • 21. Jingle server support Openfire: an Open Source XMPP server with enhancements for Jingle. Built-in media relay Without it, P2P calls won’t always complete Built-in STUN server Without it, you’ll have to use public STUN servers
  • 22. Jingle: not just for voice File transfer Screen sharing Video Whiteboard Anything else that uses a lot of bandwidth or that does streaming
  • 23. Jingle: what’s missing Haven’t defined a way to do VoIP conferencing Advanced call controls are missing (hold, transfer, etc). There’s a general consensus that this stuff shouldn’t be added to Jingle. Leave it to SIP. Other Jingle content types (besides audio) are either not defined or immature
  • 24. Current Jingle status Standards work on the fundamentals and audio content profile is wrapping up. Waiting for Google to switch to official Jingle protocol. Need interop work between different implementations. Jingle is poised to fulfill its promise as an open standard for a federated, world-wide VoIP network.
  • 25. Questions? Contact me via IM or email: [email_address] Resources http://www.xmpp.org http://www.igniterealtime.org Secure Communications with Jabber Peter Saint-Andre Time: 11:35AM - 12:20PM Location:  D137-138