SlideShare a Scribd company logo
Ⓒ 2015 Edvina AB, Sollentuna, Sweden

All rights reserved.
Why is Kamailio so
different?
…than FreeSwitch, Asterisk and other PBXs
oej@edvina.net | 2015-02-07 | v1.1
Ⓒ 2005-2014 Edvina AB, Sollentuna, Sweden

All rights reserved.
Because it’s

not a PBX.
Ⓒ 2015 Edvina AB, Sollentuna, Sweden

All rights reserved.
It’s a SIP router
SIP Request
SIP Response
SIP
The main decision you have to do

when configuring Kamailio

is whether to forward a SIP message,

or respond to a request.
Ⓒ 2015 Edvina AB, Sollentuna, Sweden

All rights reserved.
Most PBX’s 

doesn't work like that
SIP Call PBX
In these systems, you route calls.

The SIP messaging has been programmed 

by a developer. It’s not as flexible as Kamailio.

Nor is it as dangerous…
Ⓒ 2015 Edvina AB, Sollentuna, Sweden

All rights reserved.
Most PBX’s 

handle media
SIP Call
PBX
Kamailio by default does not handle media.

We have 3rd party products for media 

NAT traversal assistance.
RTP media
Ⓒ 2015 Edvina AB, Sollentuna, Sweden

All rights reserved.
In Kamailio, we handle SIP
messaging.
REGISTER
SIP
PRACK
INFO
MESSAGE
SUBSCRIBE
NOTIFY
ACK
INVITE
You need to
understand all of SIP
and do the right thing
in every situation.
Ⓒ 2015 Edvina AB, Sollentuna, Sweden

All rights reserved.
In Kamailio we handle SIP
transactions
SIP request
SIP
SIP request
SIP request
SIP request
SIP response
SIP response
SIP response
SIP response
This is not a call - but a request and

a response. Kamailio helps to find the right destination.
Ⓒ 2015 Edvina AB, Sollentuna, Sweden

All rights reserved.
Some transactions belong
together
SIP request
SIP response
SIP request
SIP response
SIP request
SIP response
This is what we in SIP
call a dialog.Typically a call or a
subscription.
Kamailio by
default does not bother
with dialogs. In your script, you
need to.
Ⓒ 2015 Edvina AB, Sollentuna, Sweden

All rights reserved.
Simplified routing script
request_route()
{
xlog(“SIP request: $rm to $run”);
!
if (has_to_tag()) {
route(WITHINDIALOG);
exit;
}
!
if ($fd == MYSELF) {
route(AUTH);
}
!
if (!lookup()) {
sl_send_reply(“404”, “Not found”);
exit;
}
!
t_relay();
}
The request_route starts with an incoming
SIP request. Log what it is!
Find out if it’s in a dialog.
Find out if it’s a known user

- authenticate -
Find out if it’s to a known SIP address
Forward the message
Ⓒ 2015 Edvina AB, Sollentuna, Sweden

All rights reserved.
# record routing for dialog forming reque
are routed)	
# - remove preloaded route headers	
remove_hf("Route");	
if (is_method("INVITE|SUBSCRIBE"))	
record_route();	
!
# account only INVITEs	
if (is_method("INVITE")) {	
setflag(FLT_ACC); # do accounting	
}	!
# dispatch requests to foreign domains	
route(SIPOUT);	
!
### requests for my local domains	
!
# handle registrations	
route(REGISTRAR);	
!
if ($rU==$null) {	# request with no User
sl_send_rep
Yes, you write code.
You configure Kamailio by writing
programming logic.
You write in Kamailio’s own

script language
Kamailio modules extend

the language.
The core alone is actually pretty
stupid. But very powerful.
Ⓒ 2015 Edvina AB, Sollentuna, Sweden

All rights reserved.
Good to know
Like in many script languages there are
many ways to accomplish the same
result.
Many modules are overlapping.

That’s fine.
Ⓒ 2015 Edvina AB, Sollentuna, Sweden

All rights reserved.
Where’s the CLI?
Kamailio doesn’t have a command
line interface where you can see
what’s going on.
We have utilities that communicate
with a running server.
In Kamailio 4.2 we got an event API
module. We still don’t know what will
happen with that.
KAMCMD
KAMCTL
Ⓒ 2015 Edvina AB, Sollentuna, Sweden

All rights reserved.
A huge selection of modules
Kamailio has over 100
modules. It’s hard to find the right
set for your need.
Start with the default
configuration and build from
there.
Ⓒ 2015 Edvina AB, Sollentuna, Sweden

All rights reserved.
Transaction handling.
Some basic modules
TM & TMX
Stateless handling.
SL
Record Routing
RR
Authentication
AUTH *
Location database
USRLOC
SIP registration
REGISTRAR
Smart routing
DIALPLAN
In-memory hash tables
HTABLE
Pseudovariables
PV
Logging to syslog
XLOG
Denial-of-service attack
prevention
PIKE
Accounting
ACC
APIs
CTL, FIFO
Signalling security
TLS
NAT traversal support
NATHELPER
Ⓒ 2015 Edvina AB, Sollentuna, Sweden

All rights reserved.
Modules can depend

on each other
REGISTRAR
USRLOC
The REGISTRAR handles
registrations of devices.
The USRLOC module stores the
registrations and handles lookups.
Dependencies are well documented in each module’s

documentation page.
Ⓒ 2015 Edvina AB, Sollentuna, Sweden

All rights reserved.
The core
MEMORY HANDLING
CONFIGURATION
MANAGEMENT
NETWORK TRAFFIC
PROCESS MANAGEMENT
STATISTICS
…much more
The core starts Kamailio, loads
modules and handles a lot of
generic issues.
Ⓒ 2015 Edvina AB, Sollentuna, Sweden

All rights reserved.
Kamailio and databases
DB

A standardised data interface.
Used by many modules.
NDB

For new databases, NoSQL.

Not used by modules.
db_mysql
db_text
db_pgsql
ndb_redis
ndb_cassandra
db_oracle
db_sqlite Please check the list of modules for
all available database modules.
ndb_mongodb
Ⓒ 2015 Edvina AB, Sollentuna, Sweden

All rights reserved.
SIP authentication
AUTH
AUTH_DB

Database-driven
authentication
Anything

(using variables)
Fetching over HTTP
RADIUS or LDAP
Your own application.
SIP MD5 digest authentication
can be done in multiple ways.
Ⓒ 2015 Edvina AB, Sollentuna, Sweden

All rights reserved.
Build your own data model,
don’t just copy.
Alias phone number
Alias phone number
Auth account

desk phone
Auth account

soft phone
Auth account

cell phone
Address of record, THE
SIP address
Don’t assume one SIP account, one
phone number, one set of credentials
Ⓒ 2015 Edvina AB, Sollentuna, Sweden

All rights reserved.
Base your model

on existing data
Alias phone numbers
Auth accounts
The SIP server is just one server in your
infrastructure.
LDAP account
Address of record, THE
SIP address
Name, address etc
Ⓒ 2015 Edvina AB, Sollentuna, Sweden

All rights reserved.
What? No RELOAD?
There’s no overall RELOAD
command.
Some modules have a
reload command.
Some modules only operate
on database.
Ⓒ 2015 Edvina AB, Sollentuna, Sweden

All rights reserved.
Where to start.
Learn SIP in detail.
Read the core cookbook.
Browse through the example
configuration and make sure you
understand it.
1.
2.
3.
Now start building,

add modules as you need them.
4.
Ⓒ 2015 Edvina AB, Sollentuna, Sweden

All rights reserved.
Getting help.
Use the mailing list, the IRC
channel or the G+ forum.
Please do not mail developers
directly. Use public channels.
Consultants that can help you are
available on the web site.
Trainings are regularly held, both
basic and advanced.
Ⓒ 2015 Edvina AB, Sollentuna, Sweden

All rights reserved.
Common mistakes:

Call routing
Carrierroute
LCR
The carrierroute module is not
the only way to do carrier routing. It’s
just one way, maybe it doesn’t fit your
model.
The LCR module is not the only
module for least cost routing. Discover
all the options and select the one that
fits your business.
Ⓒ 2015 Edvina AB, Sollentuna, Sweden

All rights reserved.
Common mistakes:

Call states
Dialog
The DIALOG module adds call
states. Don’t add it by default, you may
not need it.
Having call states makes failover
harder. You may have perfectly good call
states in other servers in your
network.
Adding call states use memory and
makes scalability not impossibly, but
much harder.
Ⓒ 2005-2014 Edvina AB, Sollentuna, Sweden

All rights reserved.
Good luck,
Kamailian!
www.kamailio.org
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

More Related Content

ODP
Expanding Asterisk with Kamailio
PDF
Kamailio on Docker
PDF
Kamailio - SIP Firewall for Carrier Grade Traffic
ODP
Using Asterisk and Kamailio for Reliable, Scalable and Secure Communication S...
PDF
Kamailio :: A Quick Introduction
PDF
SIP Attack Handling (Kamailio World 2021)
PDF
Using Kamailio for Scalability and Security
PDF
rtpengine and kamailio - or how to simulate calls at scale
Expanding Asterisk with Kamailio
Kamailio on Docker
Kamailio - SIP Firewall for Carrier Grade Traffic
Using Asterisk and Kamailio for Reliable, Scalable and Secure Communication S...
Kamailio :: A Quick Introduction
SIP Attack Handling (Kamailio World 2021)
Using Kamailio for Scalability and Security
rtpengine and kamailio - or how to simulate calls at scale

What's hot (20)

PDF
Astricon 10 (October 2013) - SIP over WebSocket on Kamailio
PDF
Scaling Asterisk with Kamailio
PDF
rtpengine - Media Relaying and Beyond
PPTX
Introduction to Kamailio (TADSummit 2020 Asia)
PDF
Kamailio with Docker and Kubernetes
ODP
Phpconf 2013 - Agile Telephony Applications with PAMI and PAGI
PDF
Continuous Integration and Kamailio
PDF
Kamailio - API Based SIP Routing
PDF
Three Ways Kamailio Can Help Your FreeSWITCH Deployment
PDF
Kamailio, FreeSWITCH, and You
PDF
Scaling FreeSWITCH Performance
PDF
The Art of VoIP Hacking - Defcon 23 Workshop
PDF
FreeSWITCH as a Microservice
PDF
Homer metrics | LORENZO MANGANI Y FEDERICO CABIDDU - VoIP2DAY 2017
PDF
Kafka Cluster Federation at Uber (Yupeng Fui & Xiaoman Dong, Uber) Kafka Summ...
PPTX
Why Do I Need an SBC
PDF
Accelerate Ceph performance via SPDK related techniques
PDF
Introduction to FreeSWITCH
PPTX
Developing Scylla Applications: Practical Tips
PPTX
SCSI Protocol
Astricon 10 (October 2013) - SIP over WebSocket on Kamailio
Scaling Asterisk with Kamailio
rtpengine - Media Relaying and Beyond
Introduction to Kamailio (TADSummit 2020 Asia)
Kamailio with Docker and Kubernetes
Phpconf 2013 - Agile Telephony Applications with PAMI and PAGI
Continuous Integration and Kamailio
Kamailio - API Based SIP Routing
Three Ways Kamailio Can Help Your FreeSWITCH Deployment
Kamailio, FreeSWITCH, and You
Scaling FreeSWITCH Performance
The Art of VoIP Hacking - Defcon 23 Workshop
FreeSWITCH as a Microservice
Homer metrics | LORENZO MANGANI Y FEDERICO CABIDDU - VoIP2DAY 2017
Kafka Cluster Federation at Uber (Yupeng Fui & Xiaoman Dong, Uber) Kafka Summ...
Why Do I Need an SBC
Accelerate Ceph performance via SPDK related techniques
Introduction to FreeSWITCH
Developing Scylla Applications: Practical Tips
SCSI Protocol
Ad

Viewers also liked (18)

PDF
Participate in SIPit
PDF
Kamailio - The Story for Asterisk
PDF
Kamailio - Large Unified Communication Platforms
PPTX
FreeSWITCH as a Kickass SBC
PPT
Astricon 2010: Scaling Asterisk installations
PDF
Webrtc overview
PDF
Usando el módulo PIKE en Elastix MT
PDF
Kamailio - Load Balancing Load Balancers
PDF
Snappy Kamailio
PDF
FOSDEM 2017 - RTC Services With Lua and Kamailio
PDF
Kamailio Updates - VUC 588
PPTX
Kamailio World 2014 - Kamailio - The Platform for Interoperable WebRTC
PDF
KamailioWorld 2014: Kamailio, IMS and WebRTC
PDF
Workshop for metal work and General trading PD.Baja Mulia Sejahtera
PDF
Kamailio & IMS
PPTX
2600Hz - Tuning Kazoo to 10,000 Handsets - KazooCon 2015
PDF
SIP and DNS - federation, failover, load balancing and more
PDF
WebRTC - a quick introduction
Participate in SIPit
Kamailio - The Story for Asterisk
Kamailio - Large Unified Communication Platforms
FreeSWITCH as a Kickass SBC
Astricon 2010: Scaling Asterisk installations
Webrtc overview
Usando el módulo PIKE en Elastix MT
Kamailio - Load Balancing Load Balancers
Snappy Kamailio
FOSDEM 2017 - RTC Services With Lua and Kamailio
Kamailio Updates - VUC 588
Kamailio World 2014 - Kamailio - The Platform for Interoperable WebRTC
KamailioWorld 2014: Kamailio, IMS and WebRTC
Workshop for metal work and General trading PD.Baja Mulia Sejahtera
Kamailio & IMS
2600Hz - Tuning Kazoo to 10,000 Handsets - KazooCon 2015
SIP and DNS - federation, failover, load balancing and more
WebRTC - a quick introduction
Ad

Similar to Why is Kamailio so different? An introduction. (20)

PDF
Kamailio World 2016: Update your SIP!
PDF
Kamailio - SIP Routing in Lua
PDF
Kamailio - Unifying SIP and Web Worlds with Lua
KEY
Building future SIP platforms
PDF
Kamailio - SIP Servers Everywhere
DOCX
Exploring Kamailio Development: Coding for Communication
PDF
CommCon 2020: Kamailio for RTC Stability, Scaling, and Security
PDF
Kamailio - Secure Communication
PDF
SIP Server Optimizations for Mobile Networks
DOCX
Kamailio Development | Kamailio Solutions | Kamailio
PDF
Kamailioworld 2018 - Modular and test driven SIP Routing with Lua
PDF
10-4-1 : The Open Communication Revolution agenda
PDF
Reboot the Open Realtime Revolution - #MoreCrypto (Fall 2014)
PDF
FOSS Sthlm: Realtime Communication Update
PDF
Aynchronous Processing in Kamailio Configuration File
PDF
Kamailio practice Quobis-University of Vigo Laboratory of Commutation 2012-2...
PDF
Kamailio and VoIP Wild World
PDF
Kamailio and VoIP Wild World
PPTX
TeleVerus Business Opportunity
PDF
KazooCon 2014 - Playing Kazoo Dudka Style
Kamailio World 2016: Update your SIP!
Kamailio - SIP Routing in Lua
Kamailio - Unifying SIP and Web Worlds with Lua
Building future SIP platforms
Kamailio - SIP Servers Everywhere
Exploring Kamailio Development: Coding for Communication
CommCon 2020: Kamailio for RTC Stability, Scaling, and Security
Kamailio - Secure Communication
SIP Server Optimizations for Mobile Networks
Kamailio Development | Kamailio Solutions | Kamailio
Kamailioworld 2018 - Modular and test driven SIP Routing with Lua
10-4-1 : The Open Communication Revolution agenda
Reboot the Open Realtime Revolution - #MoreCrypto (Fall 2014)
FOSS Sthlm: Realtime Communication Update
Aynchronous Processing in Kamailio Configuration File
Kamailio practice Quobis-University of Vigo Laboratory of Commutation 2012-2...
Kamailio and VoIP Wild World
Kamailio and VoIP Wild World
TeleVerus Business Opportunity
KazooCon 2014 - Playing Kazoo Dudka Style

More from Olle E Johansson (20)

PDF
Cybernode.se: Securing the software supply chain (CRA)
PDF
CRA - overview of vulnerability handling
PDF
Introduction to the proposed EU cyber resilience act (CRA)
PDF
The birth and death of PSTN
PDF
WebRTC and Janus intro for FOSS Stockholm January 2019
PDF
Kamailio World 2018: Having fun with new stuff
PDF
Kamailio on air
PDF
Realtime communication over a dual stack network
PDF
The Realtime Story - part 2
PDF
Sip2016 - a talk at VOIP2DAY 2016
PDF
Sips must die, die, die - about TLS usage in the SIP protocol
PDF
SIP :: Half outbound (random notes)
PDF
SIP & TLS - Security in a peer to peer world
PDF
Tio tester av TLS - Transport Layer Security (TLS-O-MATIC.COM)
PDF
2015 update: SIP and IPv6 issues - staying Happy in SIP
PDF
TCP/IP Geeks Stockholm :: Introduction to IPv6
PDF
RFC 7435 - Opportunistic security - Some protection most of the time
PDF
TCP/IP geeks Stockholm :: Manifesto
PDF
#Morecrypto (with tis) - version 2.2
PDF
#Morecrypto 1.8 - with introduction to TLS
Cybernode.se: Securing the software supply chain (CRA)
CRA - overview of vulnerability handling
Introduction to the proposed EU cyber resilience act (CRA)
The birth and death of PSTN
WebRTC and Janus intro for FOSS Stockholm January 2019
Kamailio World 2018: Having fun with new stuff
Kamailio on air
Realtime communication over a dual stack network
The Realtime Story - part 2
Sip2016 - a talk at VOIP2DAY 2016
Sips must die, die, die - about TLS usage in the SIP protocol
SIP :: Half outbound (random notes)
SIP & TLS - Security in a peer to peer world
Tio tester av TLS - Transport Layer Security (TLS-O-MATIC.COM)
2015 update: SIP and IPv6 issues - staying Happy in SIP
TCP/IP Geeks Stockholm :: Introduction to IPv6
RFC 7435 - Opportunistic security - Some protection most of the time
TCP/IP geeks Stockholm :: Manifesto
#Morecrypto (with tis) - version 2.2
#Morecrypto 1.8 - with introduction to TLS

Recently uploaded (20)

PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Electronic commerce courselecture one. Pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Cloud computing and distributed systems.
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPTX
Big Data Technologies - Introduction.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Building Integrated photovoltaic BIPV_UPV.pdf
MYSQL Presentation for SQL database connectivity
Agricultural_Statistics_at_a_Glance_2022_0.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Mobile App Security Testing_ A Comprehensive Guide.pdf
Electronic commerce courselecture one. Pdf
The AUB Centre for AI in Media Proposal.docx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Advanced methodologies resolving dimensionality complications for autism neur...
NewMind AI Monthly Chronicles - July 2025
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Cloud computing and distributed systems.
Review of recent advances in non-invasive hemoglobin estimation
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Big Data Technologies - Introduction.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Chapter 3 Spatial Domain Image Processing.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...

Why is Kamailio so different? An introduction.

  • 1. Ⓒ 2015 Edvina AB, Sollentuna, Sweden
 All rights reserved. Why is Kamailio so different? …than FreeSwitch, Asterisk and other PBXs oej@edvina.net | 2015-02-07 | v1.1
  • 2. Ⓒ 2005-2014 Edvina AB, Sollentuna, Sweden
 All rights reserved. Because it’s
 not a PBX.
  • 3. Ⓒ 2015 Edvina AB, Sollentuna, Sweden
 All rights reserved. It’s a SIP router SIP Request SIP Response SIP The main decision you have to do
 when configuring Kamailio
 is whether to forward a SIP message,
 or respond to a request.
  • 4. Ⓒ 2015 Edvina AB, Sollentuna, Sweden
 All rights reserved. Most PBX’s 
 doesn't work like that SIP Call PBX In these systems, you route calls.
 The SIP messaging has been programmed 
 by a developer. It’s not as flexible as Kamailio.
 Nor is it as dangerous…
  • 5. Ⓒ 2015 Edvina AB, Sollentuna, Sweden
 All rights reserved. Most PBX’s 
 handle media SIP Call PBX Kamailio by default does not handle media.
 We have 3rd party products for media 
 NAT traversal assistance. RTP media
  • 6. Ⓒ 2015 Edvina AB, Sollentuna, Sweden
 All rights reserved. In Kamailio, we handle SIP messaging. REGISTER SIP PRACK INFO MESSAGE SUBSCRIBE NOTIFY ACK INVITE You need to understand all of SIP and do the right thing in every situation.
  • 7. Ⓒ 2015 Edvina AB, Sollentuna, Sweden
 All rights reserved. In Kamailio we handle SIP transactions SIP request SIP SIP request SIP request SIP request SIP response SIP response SIP response SIP response This is not a call - but a request and
 a response. Kamailio helps to find the right destination.
  • 8. Ⓒ 2015 Edvina AB, Sollentuna, Sweden
 All rights reserved. Some transactions belong together SIP request SIP response SIP request SIP response SIP request SIP response This is what we in SIP call a dialog.Typically a call or a subscription. Kamailio by default does not bother with dialogs. In your script, you need to.
  • 9. Ⓒ 2015 Edvina AB, Sollentuna, Sweden
 All rights reserved. Simplified routing script request_route() { xlog(“SIP request: $rm to $run”); ! if (has_to_tag()) { route(WITHINDIALOG); exit; } ! if ($fd == MYSELF) { route(AUTH); } ! if (!lookup()) { sl_send_reply(“404”, “Not found”); exit; } ! t_relay(); } The request_route starts with an incoming SIP request. Log what it is! Find out if it’s in a dialog. Find out if it’s a known user
 - authenticate - Find out if it’s to a known SIP address Forward the message
  • 10. Ⓒ 2015 Edvina AB, Sollentuna, Sweden
 All rights reserved. # record routing for dialog forming reque are routed) # - remove preloaded route headers remove_hf("Route"); if (is_method("INVITE|SUBSCRIBE")) record_route(); ! # account only INVITEs if (is_method("INVITE")) { setflag(FLT_ACC); # do accounting } ! # dispatch requests to foreign domains route(SIPOUT); ! ### requests for my local domains ! # handle registrations route(REGISTRAR); ! if ($rU==$null) { # request with no User sl_send_rep Yes, you write code. You configure Kamailio by writing programming logic. You write in Kamailio’s own
 script language Kamailio modules extend
 the language. The core alone is actually pretty stupid. But very powerful.
  • 11. Ⓒ 2015 Edvina AB, Sollentuna, Sweden
 All rights reserved. Good to know Like in many script languages there are many ways to accomplish the same result. Many modules are overlapping.
 That’s fine.
  • 12. Ⓒ 2015 Edvina AB, Sollentuna, Sweden
 All rights reserved. Where’s the CLI? Kamailio doesn’t have a command line interface where you can see what’s going on. We have utilities that communicate with a running server. In Kamailio 4.2 we got an event API module. We still don’t know what will happen with that. KAMCMD KAMCTL
  • 13. Ⓒ 2015 Edvina AB, Sollentuna, Sweden
 All rights reserved. A huge selection of modules Kamailio has over 100 modules. It’s hard to find the right set for your need. Start with the default configuration and build from there.
  • 14. Ⓒ 2015 Edvina AB, Sollentuna, Sweden
 All rights reserved. Transaction handling. Some basic modules TM & TMX Stateless handling. SL Record Routing RR Authentication AUTH * Location database USRLOC SIP registration REGISTRAR Smart routing DIALPLAN In-memory hash tables HTABLE Pseudovariables PV Logging to syslog XLOG Denial-of-service attack prevention PIKE Accounting ACC APIs CTL, FIFO Signalling security TLS NAT traversal support NATHELPER
  • 15. Ⓒ 2015 Edvina AB, Sollentuna, Sweden
 All rights reserved. Modules can depend
 on each other REGISTRAR USRLOC The REGISTRAR handles registrations of devices. The USRLOC module stores the registrations and handles lookups. Dependencies are well documented in each module’s
 documentation page.
  • 16. Ⓒ 2015 Edvina AB, Sollentuna, Sweden
 All rights reserved. The core MEMORY HANDLING CONFIGURATION MANAGEMENT NETWORK TRAFFIC PROCESS MANAGEMENT STATISTICS …much more The core starts Kamailio, loads modules and handles a lot of generic issues.
  • 17. Ⓒ 2015 Edvina AB, Sollentuna, Sweden
 All rights reserved. Kamailio and databases DB
 A standardised data interface. Used by many modules. NDB
 For new databases, NoSQL.
 Not used by modules. db_mysql db_text db_pgsql ndb_redis ndb_cassandra db_oracle db_sqlite Please check the list of modules for all available database modules. ndb_mongodb
  • 18. Ⓒ 2015 Edvina AB, Sollentuna, Sweden
 All rights reserved. SIP authentication AUTH AUTH_DB
 Database-driven authentication Anything
 (using variables) Fetching over HTTP RADIUS or LDAP Your own application. SIP MD5 digest authentication can be done in multiple ways.
  • 19. Ⓒ 2015 Edvina AB, Sollentuna, Sweden
 All rights reserved. Build your own data model, don’t just copy. Alias phone number Alias phone number Auth account
 desk phone Auth account
 soft phone Auth account
 cell phone Address of record, THE SIP address Don’t assume one SIP account, one phone number, one set of credentials
  • 20. Ⓒ 2015 Edvina AB, Sollentuna, Sweden
 All rights reserved. Base your model
 on existing data Alias phone numbers Auth accounts The SIP server is just one server in your infrastructure. LDAP account Address of record, THE SIP address Name, address etc
  • 21. Ⓒ 2015 Edvina AB, Sollentuna, Sweden
 All rights reserved. What? No RELOAD? There’s no overall RELOAD command. Some modules have a reload command. Some modules only operate on database.
  • 22. Ⓒ 2015 Edvina AB, Sollentuna, Sweden
 All rights reserved. Where to start. Learn SIP in detail. Read the core cookbook. Browse through the example configuration and make sure you understand it. 1. 2. 3. Now start building,
 add modules as you need them. 4.
  • 23. Ⓒ 2015 Edvina AB, Sollentuna, Sweden
 All rights reserved. Getting help. Use the mailing list, the IRC channel or the G+ forum. Please do not mail developers directly. Use public channels. Consultants that can help you are available on the web site. Trainings are regularly held, both basic and advanced.
  • 24. Ⓒ 2015 Edvina AB, Sollentuna, Sweden
 All rights reserved. Common mistakes:
 Call routing Carrierroute LCR The carrierroute module is not the only way to do carrier routing. It’s just one way, maybe it doesn’t fit your model. The LCR module is not the only module for least cost routing. Discover all the options and select the one that fits your business.
  • 25. Ⓒ 2015 Edvina AB, Sollentuna, Sweden
 All rights reserved. Common mistakes:
 Call states Dialog The DIALOG module adds call states. Don’t add it by default, you may not need it. Having call states makes failover harder. You may have perfectly good call states in other servers in your network. Adding call states use memory and makes scalability not impossibly, but much harder.
  • 26. Ⓒ 2005-2014 Edvina AB, Sollentuna, Sweden
 All rights reserved. Good luck, Kamailian! www.kamailio.org
  • 27. 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