FOSS Sthlm: Realtime Communication Update

2,989 views

Published on

Introudction to Kamailio - the Open Source SIP Server - and WebRTC for the Free and Open Source Stockholm user's group Dec 5th 2012.

Published in: Technology
3 Comments
6 Likes
Statistics
Notes
No Downloads
Views
Total views
2,989
On SlideShare
0
From Embeds
0
Number of Embeds
19
Actions
Shares
0
Downloads
0
Comments
3
Likes
6
Embeds 0
No embeds

No notes for slide

FOSS Sthlm: Realtime Communication Update

  1. 1. FOSS STHLM5 December 2012 REALTIMECOMMUNICATION UPDATE Olle E. Johansson * oej@edvina.net * Twitter oej Copyright Edvina AB, Sollentuna, Sweden 2012. All rights reserved.
  2. 2. From this...
  3. 3. to this
  4. 4. Talk Video Chat Application sharing3D holographic 7.1 conferences
  5. 5. COMMUNICATION BETWEEN TWO OR MORE PEOPLE
  6. 6. LET’S LEAVE PSTN TELEPHONY BEHIND• Peer 2 peer telephony with SIP and/or WebRTC!
  7. 7. WebRTC THE REALTIME WEB
  8. 8. WebRTC THE NEW KID ON THE BLOCK• Cooperation between the W3C and IETF• Bidirectional media between browsers• Audio, video, text• The platform for new services• SIP in the browser
  9. 9. WebRTC THE VISION• An open service where we can communicate freely with each other from any device and any network• First wave probably just between users of the same web service• Many of us wants open federation - it requires a shared address space and protocol
  10. 10. WebRTC NEW APPLICATIONS• WebRTC is so much more than personal communication• Games, video manipulation, virtual reality...• First wave: • Skype replacements • Video conferences
  11. 11. WebRTC DEPENDENCIES• The architecture is still discussed• Depends on ICE for NAT traversal, which means dependencies on TURN/STUN as well• SDP or not SDP, that’s the question?• Opus and G711 for audio• VP8 or H.264 for video *** WARS ***
  12. 12. WebRTC WEBRTC• Platform for new cool • We’ll still have NAT applications and firewall issues• Built into the web • Will it be standardized browser enough• Security-enabled from • Will we need SBCs to start handle the connections?+ -
  13. 13. KAMAILIO Cool stuff
  14. 14. A SIP PBX PBXYou Me Everyone talks with the PBX!
  15. 15. A SIP PROXY We find each other with the proxy. SIPYou Me Communication is peer2peer
  16. 16. FINDING YOU DNS SIPYou Me Communication is peer2peer sip:alice@example.com
  17. 17. THE PROXYSIP SIP SIP SIP SIP SIP Proxy Outbound proxy Location server/registrar Presence server Call routing (LCR) Application server
  18. 18. KAMAILIO Open Source SIP Proxy SIP Server Application serverPresence server A lot of activity!
  19. 19. THE KAMAILIO PROJECT• Project leader: Daniel Constatin Mierla (Asipto)• Management board with community members• Many developers, active community• Renamed to Kamailio in 2008• Merged with the original Sip Express Router for version 3 in 2008
  20. 20. KAMAILIO TECHNOLOGY• Written in ANSI C and optimized for speed• Modular design• Flexible configuration and routing language• Supports MySQL, PostgreSQL, LDAP, RADIUS, Sqlite , radius, UnixODBC• Standard (RFC3261) compliant• Web based administration interface: SIREMIS• Management port (TCP, UDP, XML)• Embedded HTTP server for Xcap (Presence)• Python, Perl, LUA development interfaces• NAT traversal capable• Portable, runs on POSIX compliant systems
  21. 21. KAMAILIO PHILOSOPHY• Over 100 modules - build anything!• Many modules overlap • Especially in carrier-business-related stuff, like least cost routing• As long as we have maintainers, we’re fine with that.
  22. 22. KAMAILIO EVOLUTION From http://sip-router.org/wiki/history/ser-9-years
  23. 23. KAMAILIO DEVELOPMENT MODEL• Development base code is named ”SIP-router”• Licensed under GPL. Contributions may be under BSD.• Currently about 20 developers• Anyone can freely contribute extensions and modules• Changes to existing modules are subject to approval Kamailo releases SER releases Tekelec products SIP-router.org
  24. 24. OVERVIEW OF KAMAILIOSER and OpenSER and Kamailio and... What’s in a name? KAMAILIO THE OPENSER SIP SERVER & THE SIP ROUTER PROJECT
  25. 25. REMEMBER• A SIP proxy is not a PBX• Anything you learned from Asterisk or similar PBXs does not apply• The SIP Proxy does not bother with CALLS, it bothers with SIP requests and replies - transactions• You need to understand SIP to configure Kamailio The PBX is an Old telco architecture
  26. 26. KAMAILIO FUNCTIONALITY SIP proxy • It is a SIP server originally designed as a SIP proxy Presence server • Can be configured as an • SIP Outbound Proxy SIP load • Location server/registrarSIP application and Presence server • server • Development API for SIP servlets and UserAgent functionality • LUA interface for advanced functionalitySIP Session Border Controller • Runs on many operating systems
  27. 27. ADDITIONAL FEATURES • IPv4-IPv6 gateway IPv4/IPv6 • UDP/TCP/SCTP translator UDP/TCP/SCTP • NAT traversal support TLS NAT • anti-DOS functions (pike, blacklists) Languages: • Gateway to SMS, XMPP (Jabber)Java, Python, Lua, Perl Databases: • Accounting Mysql PostgreSQL • Java SIP servlet programming interface UnixODBC • Interface to LUA and Perl (3.1) Berkeley DB Oracle • Database support MySQL, PostgreSQL, UnixODBC, Berkeley DB and Oracle • ...much more
  28. 28. A MODULAR ARCHITECTURE Core provides Transport managements Memory management SIP Server core Module interface Shared memory Locking ConfigurationModules Modules Modules Modules Modules provide Script functions Module parameters Special variables NATMySQL Radius TM Management functions Support
  29. 29. ADDITIONAL HELPERS Management interface (MI) functions Start/stopKAMCTL Shared variables Statistics Database installation helperKAMDBCTL RPC Interface and MI functions Statistics SERCMD Select/Config variables (Arrived from SER) Web application Statistics SIREMIS Database management Separate project
  30. 30. ARCHITECTURE Modules Module interface Proxy CoreTransport interfaceOperating system
  31. 31. KAMAILIO IS THE HEART OF YOUR SIP NETWORKAdmin PSTN RTP Feature 3rd IM/SMS(WEB) DB gw gw relay server party Internal network Kamailio Public network Users
  32. 32. MULTIPROCESS, NOT THREADS Other worker UDP listen processes TCP listen STCP listen TCP/TLS listen
  33. 33. MANAGEMENT MI RPC interface (deprecated)XMLrpc Json Pipe SERCMD KAMCTL
  34. 34. MEMORY HANDLING Unix memoryPKG - Kamailio memory manager manager Allocated at start.Shared memory Per process memory (core) 32 MB per Kamailio 4 MB per processTransactions SIP messageShared variables Script variables
  35. 35. ABOUT KEEPING STATE: Stateless forwarding • Kamailio keeps transaction, and responses user and location data in shared memory (RAM) at Transaction states runtime • Some of this can be cached toDialog - ”call” - states database, but in-memory is the default • This statelessness delivers scalability and resilience in the network
  36. 36. GENERAL ADVICE:• Try to keep proxy processing as simple as possible• Be very careful on where you add states• In larger networks, separate • Ingress/Egress proxys (Session Border Controllers) • Registrar/location server • Core proxy Compare with Feature proxy • IP routers!
  37. 37. SOLUTIONS WITH KAMAILIO
  38. 38. SMALL CARRIER SER Registrar/Location server Asterisk SER SER PSTN GatewaySession Border Asterisk Core proxy controller Voicemail Server Asterisk Feature/IVR Server
  39. 39. UNIVERSITY IP TRANSITION Asterisk Asterisk PBX Media gateway ISDN .com SER Old PBXSession Border Core proxy controller
  40. 40. FAILOVER Asterisk SER PBX SER Asterisk PBX backupCore proxy
  41. 41. MULTI-FEATURE SERVICE Audio Asterisk SER IVR, Queues, prompts Video SER Core proxy Chat Presence Telephony
  42. 42. WHAT ABOUT WEBRTC?
  43. 43. KAMAILIO 3.4 WITH SIP OVER WEBSOCKETS WSJavascript SIP app sip/tcp sip/websockets Media over SRTP MeWWWyou
  44. 44. KAMAILIO AND ASTERISK WITH SIP OVER WEBSOCKETS WS Javascript SIP AST SIP app sip/websockets RTP Media over SRTP MeWWWyou
  45. 45. JSSIP: OPEN SOURCE SIPSTACK IN JAVASCRIPT• Available for download at jssip.net• Written by the authors of the IETF draft on SIP over websockets• Reference implementation• MIT license
  46. 46. COMPONENTS NEEDED• SIP over WS servers: Kamailio, OverSIP, Asterisk• Audio media server RTP gateway: Asterisk• SIP/Javascript: SIPml5, JSSIP
  47. 47. THAT’S ALL FOLKS. oej@edvina.net

×