Your SlideShare is downloading. ×
0
Jingle: Cutting Edge VoIP
Jingle: Cutting Edge VoIP
Jingle: Cutting Edge VoIP
Jingle: Cutting Edge VoIP
Jingle: Cutting Edge VoIP
Jingle: Cutting Edge VoIP
Jingle: Cutting Edge VoIP
Jingle: Cutting Edge VoIP
Jingle: Cutting Edge VoIP
Jingle: Cutting Edge VoIP
Jingle: Cutting Edge VoIP
Jingle: Cutting Edge VoIP
Jingle: Cutting Edge VoIP
Jingle: Cutting Edge VoIP
Jingle: Cutting Edge VoIP
Jingle: Cutting Edge VoIP
Jingle: Cutting Edge VoIP
Jingle: Cutting Edge VoIP
Jingle: Cutting Edge VoIP
Jingle: Cutting Edge VoIP
Jingle: Cutting Edge VoIP
Jingle: Cutting Edge VoIP
Jingle: Cutting Edge VoIP
Jingle: Cutting Edge VoIP
Jingle: Cutting Edge VoIP
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Jingle: Cutting Edge VoIP

23,781

Published on

Overview of the Jingle protocol extension for XMPP.

Overview of the Jingle protocol extension for XMPP.

Published in: Technology
0 Comments
28 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
23,781
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
901
Comments
0
Likes
28
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Jingle: Cutting Edge Open Source VoIP <ul><li>Matt Tucker </li></ul><ul><li>CTO, Jive Software </li></ul>
  • 2. I like XMPP
  • 3. The Vision: <ul><li>People wouldn’t stop asking for voice chat to be added to XMPP. </li></ul><ul><li>or </li></ul><ul><li>Worldwide federated network that combines messaging, presence and voice. Ensure there are Open Source tools for all of it. </li></ul>
  • 4. Current approaches don’t work <ul><li>Skype </li></ul><ul><ul><li>Closed network </li></ul></ul><ul><ul><li>Proprietary protocol </li></ul></ul><ul><li>SIP </li></ul><ul><ul><li>Poor protocol for IM and presence </li></ul></ul><ul><ul><li>Very little world-wide federation </li></ul></ul><ul><ul><li>Most implementations don’t do Skype-type p2p </li></ul></ul>
  • 5. In this talk <ul><li>XMPP Overview </li></ul><ul><li>All about Jingle </li></ul><ul><ul><li>Protocol flow </li></ul></ul><ul><ul><li>NAT traversal (ICE) </li></ul></ul><ul><ul><li>Open Source implementations </li></ul></ul><ul><ul><li>Others uses for Jingle </li></ul></ul>
  • 6. XMPP <ul><li>eXtensible Messaging and Presence Protocol </li></ul><ul><li>Open standard approved by the IETF as RFC 3920 and 3921, maintained and extended by the XMPP Standards Foundation </li></ul><ul><li>Countless servers and clients deployed in an open federation. </li></ul><ul><li>XMPP already won as the open standard for IM </li></ul>
  • 7. XMPP Protocol Basics <ul><li>XML based, making it very easy to use and extend </li></ul><ul><li>Strong security (TLS) and identity protection built-in Secure Communications with Jabber Peter Saint-Andre Time: 11:35AM - 12:20PM Location:  D137-138 </li></ul><ul><li>Major packet types: Message, Presence and IQ </li></ul>
  • 8. Sample XMPP Message <ul><li>&lt;message to=&apos;matt@jivesoftware.com&apos; </li></ul><ul><li>from=&apos;gato@igniterealtime.org&apos; type=&apos;chat&apos;&gt; </li></ul><ul><li>&lt;thread&gt;thread1&lt;/thread&gt; </li></ul><ul><li>&lt;body&gt;How&apos;s that presentation going?&lt;/body&gt; </li></ul><ul><li>&lt;/message&gt; </li></ul>
  • 9. XEPs: XMPP Extension Protocols <ul><li>Core RFC’s are extended through an open process by the XSF </li></ul><ul><li>Key extensions cover multi-user chat, file transfer, avatars, publish-subscribe </li></ul><ul><li>Jingle is a set of XEPs </li></ul>
  • 10. Example packet extension <ul><ul><li>&lt;message to=&apos;player@igniterealtime.org&apos; </li></ul></ul><ul><ul><li>from=&apos;dealer@igniterealtime.org&apos;&gt; </li></ul></ul><ul><ul><li>&lt;body&gt;Blackjack!&lt;/body&gt; </li></ul></ul><ul><ul><li>&lt;gameData xmlns=&apos;casino:blackjack&apos;&gt; </li></ul></ul><ul><ul><li>&lt;card1 rank=&apos;ace&apos; suit=&apos;diamonds&apos;/&gt; </li></ul></ul><ul><ul><li>&lt;card2 rank=&apos;jack&apos; suit=&apos;spades&apos;/&gt; </li></ul></ul><ul><ul><li>&lt;/gameData&gt; </li></ul></ul><ul><ul><li>&lt;/message&gt; </li></ul></ul>
  • 11. Jingle <ul><li>Many attempts at VoIP were tried – stream initiation, TINS, etc. None of them worked very well. </li></ul><ul><li>Google launched their XMPP network with voice support, then joined the standards effort to define Jingle. </li></ul><ul><li>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 </li></ul><ul><li>Acronym soup: ICE, STUN, TURN </li></ul>
  • 12. Jingle in three easy steps <ul><li>Do you want a session? Session Negotiation </li></ul><ul><li>What kind of session do you want to negotiate? (voice, video, file transfer?) Content Negotiation </li></ul><ul><li>How are we going to make this session work? (direct connect, ICE, media proxy?) Transport Negotiation </li></ul>
  • 13. <ul><li>&lt;iq from=&apos;romeo@montague.net/orchard‘ to=&apos;juliet@capulet.com/balcony‘ id=&apos;jingle1‘ type=&apos;set&apos;&gt; &lt;jingle xmlns=&apos;http://www.xmpp.org/extensions/xep-0166.html#ns‘ action=&apos;session-initiate‘ initiator=&apos;romeo@montague.net/orchard‘ sid=&apos;a73sjjvkla37jfea‘&gt; &lt;content creator=&apos;romeo@montague.net‘ name=&apos;this-is-the-audio-content&apos;&gt; &lt;description xmlns=&apos;http://www.xmpp.org/extensions/xep-0167.html#ns&apos;&gt; &lt;payload-type id=&apos;96&apos; name=&apos;speex&apos; clockrate=&apos;16000&apos;/&gt; &lt;payload-type id=&apos;97&apos; name=&apos;speex&apos; clockrate=&apos;8000&apos;/&gt; &lt;/description&gt; &lt;transport xmlns=&apos;http://www.xmpp.org/extensions/xep-0177.html#ns&apos;&gt; &lt;candidate .../&gt; &lt;candidate ip=&apos;10.1.1.104&apos; port=&apos;13540&apos; generation=&apos;0&apos;/&gt; &lt;/transport&gt; &lt;/content&gt; &lt;/jingle&gt; </li></ul><ul><li>&lt;/iq&gt; </li></ul>Jingle packet example
  • 14. SIP packet example <ul><li>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 &lt;sip:alice@atlanta.example.com&gt;;tag=9fxced76sl To: Bob &lt;sip:bob@biloxi.example.com&gt; Call-ID: 3848276298220188511@atlanta.example.com CSeq: 2 INVITE Proxy-Authorization: Digest username=&amp;quot;alice&amp;quot;, realm=&amp;quot;atlanta.example.com&amp;quot;, nonce=&amp;quot;wf84f1ceczx41ae6cbe5aea9c8e88d359&amp;quot;, opaque=&amp;quot;&amp;quot;, uri=&amp;quot;sip:bob@biloxi.example.com&amp;quot;, response=&amp;quot;42ce3cef44b22f50c6a6071bc8“ Contact: &lt;sip:alice@client.atlanta.example.com;transport=tcp&gt; 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 </li></ul>
  • 15. Transport approaches <ul><li>Always use the server to transport media </li></ul><ul><ul><li>Pro: always works (we’re using the server to send XMPP packets already) </li></ul></ul><ul><ul><li>Con: overloads the server, may be too slow for real-time protocols like voice/video. (~2000 concurrent users max) </li></ul></ul><ul><li>Try to go peer to peer </li></ul><ul><ul><li>Pro: scales forever. Best way to build a worldwide network. </li></ul></ul><ul><ul><li>Con: gets really complicated with firewalls and NATs. </li></ul></ul>
  • 16. Making peer to peer work <ul><li>Step 1: try direct connect between IP addresses. (typically only works inside a local network) </li></ul><ul><li>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) </li></ul><ul><li>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) </li></ul><ul><li>The sum of these techniques is ICE, at the cutting edge of VoIP connectivity </li></ul>
  • 17. Jingle connection architecture
  • 18. What is NAT? <ul><li>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” </li></ul><ul><li>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 </li></ul><ul><li>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? </li></ul>
  • 19. “ Crazy stuff”: punching through NATs <ul><li>Step 1: use a STUN server to find your public IP address </li></ul><ul><li>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! </li></ul><ul><li>Step 2: figure out more stuff using the STUN server </li></ul><ul><li>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. </li></ul><ul><li>Step 3: connectivity checking to try to create a hole </li></ul><ul><li>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. </li></ul><ul><li>(Punching holes works better with UDP vs. TCP) </li></ul>
  • 20. Jingle Client Libraries <ul><li>libjingle from Google -- http://code.google.com/apis/talk/libjingle/index.html </li></ul><ul><li>Telepathy -- http://telepathy.freedesktop.org </li></ul><ul><li>Smack – http://www.igniterealtime.org </li></ul>
  • 21. Jingle server support <ul><li>Openfire: an Open Source XMPP server with enhancements for Jingle. </li></ul><ul><li>Built-in media relay </li></ul><ul><ul><li>Without it, P2P calls won’t always complete </li></ul></ul><ul><li>Built-in STUN server </li></ul><ul><ul><li>Without it, you’ll have to use public STUN servers </li></ul></ul>
  • 22. Jingle: not just for voice <ul><li>File transfer </li></ul><ul><li>Screen sharing </li></ul><ul><li>Video </li></ul><ul><li>Whiteboard </li></ul><ul><li>Anything else that uses a lot of bandwidth or that does streaming </li></ul>
  • 23. Jingle: what’s missing <ul><li>Haven’t defined a way to do VoIP conferencing </li></ul><ul><li>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. </li></ul><ul><li>Other Jingle content types (besides audio) are either not defined or immature </li></ul>
  • 24. Current Jingle status <ul><li>Standards work on the fundamentals and audio content profile is wrapping up. </li></ul><ul><li>Waiting for Google to switch to official Jingle protocol. </li></ul><ul><li>Need interop work between different implementations. </li></ul><ul><li>Jingle is poised to fulfill its promise as an open standard for a federated, world-wide VoIP network. </li></ul>
  • 25. Questions? <ul><li>Contact me via IM or email: </li></ul><ul><li>[email_address] </li></ul><ul><li>Resources </li></ul><ul><li>http://www.xmpp.org </li></ul><ul><li>http://www.igniterealtime.org </li></ul><ul><li>Secure Communications with Jabber Peter Saint-Andre Time: 11:35AM - 12:20PM Location:  D137-138 </li></ul>

×