SlideShare a Scribd company logo
1 of 35
Using Asterisk and Kamailio for Reliable,
Scalable and Secure Communication Solutions
Using Asterisk and WHAT?????
Kah-mah-illie-oh
● Kamailio
● Hawaiian word
– to communicate
– to coverse
Who am I?
● Fred Posner
● @fredposner
● https://qxork.com
Better Together
Let’s start at the beginning...
Why Did I Switch to Asterisk?
“...many needs are actually wants. And
there’s a good chance you can save more
money simply redesigning a business
process than it would cost to support those
customization wants.”
—Experts at Mitel
Needless to say...
● Features
● Ability to customize
● Stability
● Scalability (growth)
● Licensing/Long Term Cost
Registrations
Carrier Routing
Security
Call Handling
Media
Queues
Features You Need
● Transcoding
● B2BUA
● AGI (Gateway Interface)
● ARI (Rest Interface)
● Database Integration
● ISDN/PRI/Analog
● SIP
● WEBRTC
● Custom CDRS
● Full PBX features
● IVR
● Call Center
● Conferences
● Too Much to List
● 5k — 20,000 users in 3
months
● 6 Asterisk Servers
● 2 AcmePacket (HA)
● > 1 million min/month
We Experienced Rapid Growth
Fiber Cut… x2
● Thundering Herd
● Replaced AcmePacket with
Kamailio (OpenSER)
Enter Kamailio (OpenSER)
● SIP Proxy Server
● SIP Registrar Server
● SIP Location Server
● SIP Application Server
● SIP Dispatcher Server
● SIP Websocket Server
Kamailio Provides
● Modular Design
● Modular SIP Proxy, Registrar and
Redirect server
● IPv4, IPv6, UDP, TCP, TLS, SCTP,
WebSocket
● NAT Traversal, internal and external
caching engines
● JSON, XMLRPC, HTTP APIs
● IMS Extensions, SIP-I/SIP-T, IM &
Presence
● SQL and NoSQL backends
● Asynchronous processing
(TCP/TLS, SIP routing),
external event API
● Embedded interpreters (Lua,
Perl, Python, .Net, Java)
● Load balancing, LCR, DID
routing, Number portability
Kamailio is not...
SIP Phone
Media Server
B2BUA
Asterisk Does what Kamailio
Does Not
Can I SBC?
● No
– Not a B2BUA
– No Transcoding
– Etc.
● Well…
– Inconceivable
– Do you want a “true” SBC?
Please read Alex Balashov’s great article:
➔ http://osolo.co/sbc (redirects to https://likewise.am)
➔ “Kamailio as an SBC (Session Border Controller)”
Tell me more!
● 150+ Modules
● Many Modules for Security
● Dedicated Resources
● Protects Multiple Servers
Where does he get those toys?
Security
● SQL Injection?
● Friendly Scanner?
● Script Kiddies?
A SIP Server needs not these
things.
SQL Injection & UA Filtering
if ($ua =~ "(friendly-scanner|sipvicious|sipcli)") {
sl_send_reply("200","OK");
exit;
}
if($au =~ "(=)|(--)|(')|(#)|(%27)|(%24)" and $au != $null) {
sl_send_reply("200","Drop Table LOLz");
exit;
}
Improved Security
● SIP Brute Force Attacks
– Registrations, calls, etc.
● User-Agent Filtering
– Sipvicious, Scanners, etc.
● IP Authentication
● SQL Injection
● LOG Injection
● Spoofing
● Centralized Security
Deploying Kamailio & Asterisk
Internet
ASA
pfsense
etc.
Kamailio Asterisk
Asterisk Asterisk
Asterisk
SIP/RTP
Scalability — LCR
Asterisk
NAT
Kamailio
Public IP
Asterisk
NAT
Asterisk
NAT
Carrier 1
Carrier 2
Carrier 3
Internet
PSTN
Scalability — Load Balancing
Asterisk
NAT
Kamailio
Public IP
Asterisk
NAT
Asterisk
NAT
Internet
PSTN
Scalability — Load Balancing HA
Asterisk
Inbound
Kamailio
Public IP
Asterisk
Recorded
Asterisk
Inbound
Internet
PSTN Asterisk
Queue
Asterisk
Voicemail
Asterisk
Queue
Scalability — Scaling
Asterisk
Inbound
Kamailio
Public IP
Asterisk
Recorded
Asterisk
Inbound
Internet
PSTN Asterisk
Queue
Asterisk
Voicemail
Asterisk
Queue
Kamailio
Public IP
Asterisk
Queue
Asterisk
Inbound
Asterisk
Inbound
Carrier Carrier Carrier
Carrier Carrier Carrier
Choosing Hardware
● Too many considerations
– SQL on same box?
– RTP Proxying on same box?
– Dialog sessions?
● Calls per second?
● Simultaneous calls?
● Kamailio is very fast
● Can store much in RAM
● As with everything context is
king
500cps Example
With great power
comes great
responsibility.
500cps Example
● 4 core (ARM)
● 1GB RAM
● 1GB NIC
● Dispatcher
● RTPENGINE
● Raspberry Pi 3
What about Virtualization?
● Simple answer, yes.
● Large amount of
deployments
● Not a simple question
● Pros/Cons approach works
best
In Summary...
Asterisk
Inbound
Kamailio
Public IP
Asterisk
Recorded
Asterisk
Inbound
Internet
PSTN Asterisk
Queue
Asterisk
Voicemail
Asterisk
Queue
Kamailio
Public IP
Asterisk
Queue
Asterisk
Inbound
Asterisk
Inbound
Carrier Carrier Carrier
Carrier Carrier Carrier
Questions? Cookies?
Fred Posner
@fredposner
https://qxork.com
● Kamailio
– kamailio.org
● Asterisk
– asterisk.org
– Digium.com

More Related Content

What's hot

What's hot (20)

Kamailio with Docker and Kubernetes
Kamailio with Docker and KubernetesKamailio with Docker and Kubernetes
Kamailio with Docker and Kubernetes
 
rtpengine - Media Relaying and Beyond
rtpengine - Media Relaying and Beyondrtpengine - Media Relaying and Beyond
rtpengine - Media Relaying and Beyond
 
SIP Attack Handling (Kamailio World 2021)
SIP Attack Handling (Kamailio World 2021)SIP Attack Handling (Kamailio World 2021)
SIP Attack Handling (Kamailio World 2021)
 
Kamailio - SIP Routing in Lua
Kamailio - SIP Routing in LuaKamailio - SIP Routing in Lua
Kamailio - SIP Routing in Lua
 
rtpengine and kamailio - or how to simulate calls at scale
rtpengine and kamailio - or how to simulate calls at scalertpengine and kamailio - or how to simulate calls at scale
rtpengine and kamailio - or how to simulate calls at scale
 
Kamailio on Docker
Kamailio on DockerKamailio on Docker
Kamailio on Docker
 
Kamailio - Secure Communication
Kamailio - Secure CommunicationKamailio - Secure Communication
Kamailio - Secure Communication
 
Why is Kamailio so different? An introduction.
Why is Kamailio so different? An introduction.Why is Kamailio so different? An introduction.
Why is Kamailio so different? An introduction.
 
SIP & TLS - Security in a peer to peer world
SIP & TLS - Security in a peer to peer worldSIP & TLS - Security in a peer to peer world
SIP & TLS - Security in a peer to peer world
 
Continuous Integration and Kamailio
Continuous Integration and KamailioContinuous Integration and Kamailio
Continuous Integration and Kamailio
 
SIP and DNS - federation, failover, load balancing and more
SIP and DNS - federation, failover, load balancing and moreSIP and DNS - federation, failover, load balancing and more
SIP and DNS - federation, failover, load balancing and more
 
Introduction to FreeSWITCH
Introduction to FreeSWITCHIntroduction to FreeSWITCH
Introduction to FreeSWITCH
 
Phpconf 2013 - Agile Telephony Applications with PAMI and PAGI
Phpconf 2013 - Agile Telephony Applications with PAMI and PAGIPhpconf 2013 - Agile Telephony Applications with PAMI and PAGI
Phpconf 2013 - Agile Telephony Applications with PAMI and PAGI
 
Sipwise rtpengine
Sipwise rtpengineSipwise rtpengine
Sipwise rtpengine
 
Kamailio - Load Balancing Load Balancers
Kamailio - Load Balancing Load BalancersKamailio - Load Balancing Load Balancers
Kamailio - Load Balancing Load Balancers
 
Scaling FreeSWITCH Performance
Scaling FreeSWITCH PerformanceScaling FreeSWITCH Performance
Scaling FreeSWITCH Performance
 
SIPREC RTPEngine Media Forking
SIPREC RTPEngine Media ForkingSIPREC RTPEngine Media Forking
SIPREC RTPEngine Media Forking
 
SIP Testing with FreeSWITCH
SIP Testing with FreeSWITCHSIP Testing with FreeSWITCH
SIP Testing with FreeSWITCH
 
Kamailio, FreeSWITCH, and the Half-Blood Prince
Kamailio, FreeSWITCH, and the Half-Blood PrinceKamailio, FreeSWITCH, and the Half-Blood Prince
Kamailio, FreeSWITCH, and the Half-Blood Prince
 
Implementation Lessons using WebRTC in Asterisk
Implementation Lessons using WebRTC in AsteriskImplementation Lessons using WebRTC in Asterisk
Implementation Lessons using WebRTC in Asterisk
 

Similar to Using Asterisk and Kamailio for Reliable, Scalable and Secure Communication Solutions

AWS Startup Webinar | Developing on AWS
AWS Startup Webinar | Developing on AWSAWS Startup Webinar | Developing on AWS
AWS Startup Webinar | Developing on AWS
Amazon Web Services
 
You wanna crypto in AEM
You wanna crypto in AEMYou wanna crypto in AEM
You wanna crypto in AEM
Damien Antipa
 
Top Ten Proactive Web Security Controls v5
Top Ten Proactive Web Security Controls v5Top Ten Proactive Web Security Controls v5
Top Ten Proactive Web Security Controls v5
Jim Manico
 

Similar to Using Asterisk and Kamailio for Reliable, Scalable and Secure Communication Solutions (20)

AWS Startup Webinar | Developing on AWS
AWS Startup Webinar | Developing on AWSAWS Startup Webinar | Developing on AWS
AWS Startup Webinar | Developing on AWS
 
[PASS Summit 2016] Blazing Fast, Planet-Scale Customer Scenarios with Azure D...
[PASS Summit 2016] Blazing Fast, Planet-Scale Customer Scenarios with Azure D...[PASS Summit 2016] Blazing Fast, Planet-Scale Customer Scenarios with Azure D...
[PASS Summit 2016] Blazing Fast, Planet-Scale Customer Scenarios with Azure D...
 
OWASP SF - Reviewing Modern JavaScript Applications
OWASP SF - Reviewing Modern JavaScript ApplicationsOWASP SF - Reviewing Modern JavaScript Applications
OWASP SF - Reviewing Modern JavaScript Applications
 
Building Cloud-Native Applications with Microsoft Windows Azure
Building Cloud-Native Applications with Microsoft Windows AzureBuilding Cloud-Native Applications with Microsoft Windows Azure
Building Cloud-Native Applications with Microsoft Windows Azure
 
What is SSL/TLS, 1-way and 2-way SSL?
What is SSL/TLS, 1-way and 2-way SSL?What is SSL/TLS, 1-way and 2-way SSL?
What is SSL/TLS, 1-way and 2-way SSL?
 
Cqcon2015
Cqcon2015Cqcon2015
Cqcon2015
 
Quick trip around the Cosmos - Things every astronaut supposed to know
Quick trip around the Cosmos - Things every astronaut supposed to knowQuick trip around the Cosmos - Things every astronaut supposed to know
Quick trip around the Cosmos - Things every astronaut supposed to know
 
Pentesting RESTful webservices
Pentesting RESTful webservicesPentesting RESTful webservices
Pentesting RESTful webservices
 
Spsct15 power shell_csom - amit vasu
Spsct15 power shell_csom - amit vasuSpsct15 power shell_csom - amit vasu
Spsct15 power shell_csom - amit vasu
 
You wanna crypto in AEM
You wanna crypto in AEMYou wanna crypto in AEM
You wanna crypto in AEM
 
Presto: Query Anything - Data Engineer’s perspective
Presto: Query Anything - Data Engineer’s perspectivePresto: Query Anything - Data Engineer’s perspective
Presto: Query Anything - Data Engineer’s perspective
 
Being HAPI! Reverse Proxying on Purpose
Being HAPI! Reverse Proxying on PurposeBeing HAPI! Reverse Proxying on Purpose
Being HAPI! Reverse Proxying on Purpose
 
php
phpphp
php
 
Introduction to Azure DocumentDB
Introduction to Azure DocumentDBIntroduction to Azure DocumentDB
Introduction to Azure DocumentDB
 
Performance Optimization and JavaScript Best Practices
Performance Optimization and JavaScript Best PracticesPerformance Optimization and JavaScript Best Practices
Performance Optimization and JavaScript Best Practices
 
Security Architecture Consulting - Hiren Shah
Security Architecture Consulting - Hiren ShahSecurity Architecture Consulting - Hiren Shah
Security Architecture Consulting - Hiren Shah
 
Deploy Microsoft Azure Data Solutions
Deploy Microsoft Azure Data SolutionsDeploy Microsoft Azure Data Solutions
Deploy Microsoft Azure Data Solutions
 
Top Ten Proactive Web Security Controls v5
Top Ten Proactive Web Security Controls v5Top Ten Proactive Web Security Controls v5
Top Ten Proactive Web Security Controls v5
 
High available BizTalk infrastructure on Azure IaaS
High available BizTalk infrastructure on Azure IaaSHigh available BizTalk infrastructure on Azure IaaS
High available BizTalk infrastructure on Azure IaaS
 
SharePoint and Office 365 Development Workshop
SharePoint and Office 365 Development WorkshopSharePoint and Office 365 Development Workshop
SharePoint and Office 365 Development Workshop
 

More from Fred Posner

More from Fred Posner (7)

Security Asterisk or FreePBX with APIBAN
Security Asterisk or FreePBX with APIBANSecurity Asterisk or FreePBX with APIBAN
Security Asterisk or FreePBX with APIBAN
 
Kamalio and Asterisk: What, Why & How
Kamalio and Asterisk: What, Why & HowKamalio and Asterisk: What, Why & How
Kamalio and Asterisk: What, Why & How
 
Protect Kamailio Against DoS Attacks With APIBan
Protect Kamailio Against DoS Attacks With APIBanProtect Kamailio Against DoS Attacks With APIBan
Protect Kamailio Against DoS Attacks With APIBan
 
CommCon 2020: Kamailio for RTC Stability, Scaling, and Security
CommCon 2020: Kamailio for RTC Stability, Scaling, and SecurityCommCon 2020: Kamailio for RTC Stability, Scaling, and Security
CommCon 2020: Kamailio for RTC Stability, Scaling, and Security
 
Introduction to Kamailio (TADSummit 2020 Asia)
Introduction to Kamailio (TADSummit 2020 Asia)Introduction to Kamailio (TADSummit 2020 Asia)
Introduction to Kamailio (TADSummit 2020 Asia)
 
Three Ways Kamailio Can Help Your Asterisk Deployment
Three Ways Kamailio Can Help Your Asterisk DeploymentThree Ways Kamailio Can Help Your Asterisk Deployment
Three Ways Kamailio Can Help Your Asterisk Deployment
 
Advanced SIP: Communicating with Humans (Kamailio World 2019)
Advanced SIP: Communicating with Humans (Kamailio World 2019)Advanced SIP: Communicating with Humans (Kamailio World 2019)
Advanced SIP: Communicating with Humans (Kamailio World 2019)
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

Using Asterisk and Kamailio for Reliable, Scalable and Secure Communication Solutions

  • 1. Using Asterisk and Kamailio for Reliable, Scalable and Secure Communication Solutions
  • 2. Using Asterisk and WHAT????? Kah-mah-illie-oh ● Kamailio ● Hawaiian word – to communicate – to coverse
  • 3. Who am I? ● Fred Posner ● @fredposner ● https://qxork.com
  • 4.
  • 5.
  • 6.
  • 8. Let’s start at the beginning...
  • 9. Why Did I Switch to Asterisk? “...many needs are actually wants. And there’s a good chance you can save more money simply redesigning a business process than it would cost to support those customization wants.” —Experts at Mitel
  • 10.
  • 11. Needless to say... ● Features ● Ability to customize ● Stability ● Scalability (growth) ● Licensing/Long Term Cost
  • 13. Features You Need ● Transcoding ● B2BUA ● AGI (Gateway Interface) ● ARI (Rest Interface) ● Database Integration ● ISDN/PRI/Analog ● SIP ● WEBRTC ● Custom CDRS ● Full PBX features ● IVR ● Call Center ● Conferences ● Too Much to List
  • 14. ● 5k — 20,000 users in 3 months ● 6 Asterisk Servers ● 2 AcmePacket (HA) ● > 1 million min/month We Experienced Rapid Growth
  • 15. Fiber Cut… x2 ● Thundering Herd ● Replaced AcmePacket with Kamailio (OpenSER)
  • 16. Enter Kamailio (OpenSER) ● SIP Proxy Server ● SIP Registrar Server ● SIP Location Server ● SIP Application Server ● SIP Dispatcher Server ● SIP Websocket Server
  • 17. Kamailio Provides ● Modular Design ● Modular SIP Proxy, Registrar and Redirect server ● IPv4, IPv6, UDP, TCP, TLS, SCTP, WebSocket ● NAT Traversal, internal and external caching engines ● JSON, XMLRPC, HTTP APIs ● IMS Extensions, SIP-I/SIP-T, IM & Presence ● SQL and NoSQL backends ● Asynchronous processing (TCP/TLS, SIP routing), external event API ● Embedded interpreters (Lua, Perl, Python, .Net, Java) ● Load balancing, LCR, DID routing, Number portability
  • 18. Kamailio is not... SIP Phone Media Server B2BUA Asterisk Does what Kamailio Does Not
  • 19. Can I SBC? ● No – Not a B2BUA – No Transcoding – Etc. ● Well… – Inconceivable – Do you want a “true” SBC? Please read Alex Balashov’s great article: ➔ http://osolo.co/sbc (redirects to https://likewise.am) ➔ “Kamailio as an SBC (Session Border Controller)”
  • 20. Tell me more! ● 150+ Modules ● Many Modules for Security ● Dedicated Resources ● Protects Multiple Servers Where does he get those toys?
  • 21. Security ● SQL Injection? ● Friendly Scanner? ● Script Kiddies? A SIP Server needs not these things.
  • 22. SQL Injection & UA Filtering if ($ua =~ "(friendly-scanner|sipvicious|sipcli)") { sl_send_reply("200","OK"); exit; } if($au =~ "(=)|(--)|(')|(#)|(%27)|(%24)" and $au != $null) { sl_send_reply("200","Drop Table LOLz"); exit; }
  • 23. Improved Security ● SIP Brute Force Attacks – Registrations, calls, etc. ● User-Agent Filtering – Sipvicious, Scanners, etc. ● IP Authentication ● SQL Injection ● LOG Injection ● Spoofing ● Centralized Security
  • 24. Deploying Kamailio & Asterisk Internet ASA pfsense etc. Kamailio Asterisk Asterisk Asterisk Asterisk SIP/RTP
  • 25. Scalability — LCR Asterisk NAT Kamailio Public IP Asterisk NAT Asterisk NAT Carrier 1 Carrier 2 Carrier 3 Internet PSTN
  • 26. Scalability — Load Balancing Asterisk NAT Kamailio Public IP Asterisk NAT Asterisk NAT Internet PSTN
  • 27. Scalability — Load Balancing HA Asterisk Inbound Kamailio Public IP Asterisk Recorded Asterisk Inbound Internet PSTN Asterisk Queue Asterisk Voicemail Asterisk Queue
  • 28. Scalability — Scaling Asterisk Inbound Kamailio Public IP Asterisk Recorded Asterisk Inbound Internet PSTN Asterisk Queue Asterisk Voicemail Asterisk Queue Kamailio Public IP Asterisk Queue Asterisk Inbound Asterisk Inbound Carrier Carrier Carrier Carrier Carrier Carrier
  • 29. Choosing Hardware ● Too many considerations – SQL on same box? – RTP Proxying on same box? – Dialog sessions? ● Calls per second? ● Simultaneous calls? ● Kamailio is very fast ● Can store much in RAM ● As with everything context is king
  • 31. With great power comes great responsibility.
  • 32. 500cps Example ● 4 core (ARM) ● 1GB RAM ● 1GB NIC ● Dispatcher ● RTPENGINE ● Raspberry Pi 3
  • 33. What about Virtualization? ● Simple answer, yes. ● Large amount of deployments ● Not a simple question ● Pros/Cons approach works best
  • 34. In Summary... Asterisk Inbound Kamailio Public IP Asterisk Recorded Asterisk Inbound Internet PSTN Asterisk Queue Asterisk Voicemail Asterisk Queue Kamailio Public IP Asterisk Queue Asterisk Inbound Asterisk Inbound Carrier Carrier Carrier Carrier Carrier Carrier
  • 35. Questions? Cookies? Fred Posner @fredposner https://qxork.com ● Kamailio – kamailio.org ● Asterisk – asterisk.org – Digium.com