Kamailio is the leading Open Source SIP Server - a SIP proxy, registrar, location server, presence server, IMS server and much more. Find out more by viewing this quick presentation! (Updated June 2014)
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Ā
Kamailio :: A Quick Introduction
1. A QUICK INTRODUCTION
TO KAMAILIO
Olle E. Johansson * oej@edvina.net * Twitter oej
Copyright Edvina AB, Sollentuna, Sweden 2013-205 .All rights reserved.V4.2
6. THE PROXY ANDTHE PBX
WORKS WELLTOGETHER.
You
Me
PBX
SIP
Services like
IVR
Conference
7. THE PROXY HAS MANY ROLES
SIP SIP SIP SIP
Proxy
Outbound proxy
Location server/registrar
Presence server
Call routing (LCR)
SIP
Application server
SIP
8. WHAT DOESNāT IT DO?
GW HOLD CONF REC
GatewayāØ
to other protocols
Mix calls in a conference
Put calls on hold
RecordāØ
calls
Listen to DTMF
IVR
Handle media
RTP
11. 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
kamailio.org
12. KAMAILIOTECHNOLOGY
ā¢ Written in ANSI C and optimized for speed !
!
ā¢ Modular design !
!
ā¢ Flexible conļ¬guration 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
13. 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 ļ¬ne with that.
15. 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
SIP-router.org
Kamailo releases SER releases Tekelec products
16. WHERETO GET IT?
Linux packagesāØ
http://www.kamailio.org/wiki/
packages/rpms
FreeBSD/OpenBSDāØ
Ports
Source codeāØ
www.kamailio.org Just download and run!
17. KAMAILIO FUNCTIONALITY
ā¢ It is a SIP server originally designed as a SIP proxy
ā¢ Can be conļ¬gured as an
ā¢ SIP Outbound Proxy
ā¢ Location server/registrar
ā¢ Presence server
ā¢ Application server
ā¢ ā¦and much more
ā¢ Development API for SIP servlets and UserAgent
functionality
ā¢ LUA, Java, Python module integration for
advanced functionality
ā¢ Runs on many operating systems
SIP proxy
PresenceāØ
server
SIP applicationāØ
server
SIP loadāØ
balancer
SIP Session Border
Controller
18. ADDITIONAL FEATURES
ā¢ IPv4-IPv6 gateway
ā¢ UDP/TCP/SCTP/WS translator
ā¢ NAT traversal support
ā¢ anti-DOS functions (pike, blacklists)
ā¢ Gateway to SMS, XMPP (Jabber)
ā¢ Accounting
ā¢ Interface to LUA, Python, Mono/C# and Perl
ā¢ Database support MongoDB, Redis, Radius,
MySQL, PostgreSQL, UnixODBC, Berkeley DB
and Oracle
ā¢ ...much more
IPv4/IPv6āØ
UDP/TCP/SCTP/WSāØ
TLS
NAT
!
Languages:
Java, Python, Lua, Perl,
Mono, C#
!
Databases:
Mysql
PostgreSQL
UnixODBC
Berkeley DB
OracleāØ
Redis, MongoDBāØ
Cassandra
19. A MODULAR ARCHITECTURE
SIP Server core
Modules Modules Modules Modules
MySQL Radius TM
NATāØ
Support
Core provides
Transport managements
Memory management
Module interface
Shared memory
Locking
Conļ¬guration
Modules provide
Script functions
Module parameters
Special variables
Management functions
20. ADDITIONAL HELPERS
KAMCTL
KAMDBCTL
KAMCMD
SIREMIS
Management interface (MI) functions
Start/stop
Shared variables
Statistics
Database installation helper
!
RPC Interface and MI functions
Statistics
Select/Conļ¬g variables
(Arrived from SER)
!
Web application
Statistics
Database management
Separate project
!
21. KAMAILIO ISTHE HEART OFYOUR SIP NETWORK
Kamailio
RTP
relay
PSTNāØ
gw
DB
AdmināØ
(WEB)
Feature
server
3rd āØ
party
IM/SMSāØ
gw
Internal network
Public network
Users
24. MEMORY HANDLING
PKG - Kamailio memory manager
Unix memory
manager
Shared memoryāØ
(core)
Per process memory
4 MB per process64 MB per Kamailio
Allocated at start.
Transactions SIP message
Shared variables Script variables
25. ABOUT KEEPING STATE:
ā¢ Kamailio keeps transaction, user
and location data in shared
memory (RAM) at runtime
ā¢ Some of this can be cached to
database, but in-memory is the
default
ā¢ This statelessness delivers
scalability and resilience in the
network
Stateless forwardingāØ
and responses
Transaction states
Dialog - ācallā - states
26. 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
ā¢ Feature proxy
Compare withāØ
IP routers!
28. KAMAILIO IS ATOOLBOX
ā¢ Kamailio is not a ready-made
application like Asterisk or
FreeSwitch
ā¢ There is a very powerful
conļ¬guration language where you
conļ¬gure handling of individual SIP
Messages
ā¢ You need understanding of the SIP
protocol to build your application
Load balancer
SBC
Trunk server
PBX
29. $avp(rtype)
if($rm ==
āINVITEā) {}
route(āNATā);
t_relay();
THE KAMAILIO SCRIPTS
ā¢ C-like language
ā¢ IF/THEN,WHILE constructs
ā¢ Variables with different scopes (global, local,
transactions)
ā¢ Hash tables, database integration, memcached
and much more
ā¢ Loading a new module extends functionality,
like in Asterisk or Apache
30. ?
WHEREāSTHE DIAL PLAN?
ā¢ Kamailio routes SIP messages, not calls
ā¢ There are many ways to route calls (consisting of at least an
INVITE and a BYE message)
ā¢ There is a module called āDIALPLANā that can simplify building a
pbx-like call routing engine
ā¢ Remember, Kamailio does not handle media. Companion products
like RTPengine, RTPproxy, Asterisk and FreeSwitch handles media.
??
37. KAMAILIO 4 COMES WITH
SIP OVER WEBSOCKETS
WWWyou
Me
SIP
WS
sip/websockets
sip/tcp
JavascriptāØ
app
Media over SRTP
38. KAMAILIO AND ASTERISK WITH
SIP OVER WEBSOCKETS
WWWyou
Me
SIP
WS
sip/websockets
JavascriptāØ
SIP app
Media over SRTP
AST
RTP
39. JSSIP: OPEN SOURCE SIPSTACK
IN JAVASCRIPT
ā¢ Available for download at jssip.net
ā¢ Written by the authors of IETF RFC 7118 on SIP over
websockets
ā¢ Reference implementation
ā¢ MIT license
40. COMPONENTS NEEDED
ā¢ SIP over WS servers: Kamailio, OverSIP, Asterisk, FreeSwitch
ā¢ Audio media server RTP gateway: Asterisk, FreeSwitch,
RTPengine
ā¢ SIP/Javascript: SIPml5, JSSIP
41. EDVINATRAINING CLASSES
ā¢ Kamailio from start
ā¢ The SIP Protocol
ā¢ RTP, RTCP and QoS
ā¢ SIP Security
ā¢ Scalability
ā¢ Many Kamailio labs
CUSTOMāØ
INHOUSEāØ
TRAININGS
ā¢ SIP,Asterisk, Kamailio
and much more
ā¢ Done at your site,
customized for your
project
ā¢ Cost effective when
more than four
students
Find more details at http://edvina.net
ā¢ Advanced Kamailio
ā¢ SIP trunking
ā¢ NAT handling
ā¢ WebRTC/SIP
ā¢ Testing, debugging
ā¢ Scalability
ā¢ Many Kamailio labs