23
Kamailio - Modern VoIP Services Scalability With Intelligent SIP Routing Fred Posner, VoIP Engineer LOD Communications, Inc. @fredposner https://qxork.com

Kamailio - Modern VoIP Services Scalability With ... · Kamailio - Modern VoIP Services Scalability With Intelligent SIP Routing Fred Posner, VoIP Engineer LOD Communications, Inc

  • Upload
    lamkhue

  • View
    244

  • Download
    4

Embed Size (px)

Citation preview

Page 1: Kamailio - Modern VoIP Services Scalability With ... · Kamailio - Modern VoIP Services Scalability With Intelligent SIP Routing Fred Posner, VoIP Engineer LOD Communications, Inc

Kamailio - Modern VoIP Services Scalability With Intelligent SIP Routing

Fred Posner, VoIP EngineerLOD Communications, Inc.

@fredposnerhttps://qxork.com

Page 2: Kamailio - Modern VoIP Services Scalability With ... · Kamailio - Modern VoIP Services Scalability With Intelligent SIP Routing Fred Posner, VoIP Engineer LOD Communications, Inc

What the what?

• Kah Mah Illie Oh

• Kah Mylie Oh

Page 3: Kamailio - Modern VoIP Services Scalability With ... · Kamailio - Modern VoIP Services Scalability With Intelligent SIP Routing Fred Posner, VoIP Engineer LOD Communications, Inc

Who am I?

• Fred Posner

• @fredposner

• VoIP Engineer

• Florida based

Page 4: Kamailio - Modern VoIP Services Scalability With ... · Kamailio - Modern VoIP Services Scalability With Intelligent SIP Routing Fred Posner, VoIP Engineer LOD Communications, Inc

What is Kamailio?

Page 5: Kamailio - Modern VoIP Services Scalability With ... · Kamailio - Modern VoIP Services Scalability With Intelligent SIP Routing Fred Posner, VoIP Engineer LOD Communications, Inc

What is Kamailio?• Open Source SIP Server

• Thousands of call setups per second

• GPL

• SIP Proxy server

• SIP Registrar server

• SIP Location server

• SIP Application server

• SIP Dispatcher server

• SIP Websocket server

Page 6: Kamailio - Modern VoIP Services Scalability With ... · Kamailio - Modern VoIP Services Scalability With Intelligent SIP Routing Fred Posner, VoIP Engineer LOD Communications, Inc

What isn’t Kamailio?

• SIP Phone

• Media Server

• B2BUA

• Can you name an open source software that is these things?

Page 7: Kamailio - Modern VoIP Services Scalability With ... · Kamailio - Modern VoIP Services Scalability With Intelligent SIP Routing Fred Posner, VoIP Engineer LOD Communications, Inc

Why Kamailio?

• Fast

• Flexible

• Reliable

Page 8: Kamailio - Modern VoIP Services Scalability With ... · Kamailio - Modern VoIP Services Scalability With Intelligent SIP Routing Fred Posner, VoIP Engineer LOD Communications, Inc

Key Features• Modular

• Scalability and Flexibility by design

• IPv4, IPv6

• TLS/TCP/UDP

• WebSocket

• NAT Traversal

• JSON, XMLRPC, HTTP APIs

• SQL & NOSQL

• Embedded Interpreters (Lua, Java, Perl, Python, more)

• Load Balancing

• LCR

• Asynchronous processing (TCP / TLS, SIP Routing), external API

• and mucho mucho mas

Page 9: Kamailio - Modern VoIP Services Scalability With ... · Kamailio - Modern VoIP Services Scalability With Intelligent SIP Routing Fred Posner, VoIP Engineer LOD Communications, Inc

Most Common Deployment

Page 10: Kamailio - Modern VoIP Services Scalability With ... · Kamailio - Modern VoIP Services Scalability With Intelligent SIP Routing Fred Posner, VoIP Engineer LOD Communications, Inc

Scale SIP/RTC

• Load Balancing

• Dispatcher Module

• Various Algorithms

• Node monitoring

• Re-route of failures

Page 11: Kamailio - Modern VoIP Services Scalability With ... · Kamailio - Modern VoIP Services Scalability With Intelligent SIP Routing Fred Posner, VoIP Engineer LOD Communications, Inc

Scaled Deployment

Page 12: Kamailio - Modern VoIP Services Scalability With ... · Kamailio - Modern VoIP Services Scalability With Intelligent SIP Routing Fred Posner, VoIP Engineer LOD Communications, Inc

got lua?

Page 13: Kamailio - Modern VoIP Services Scalability With ... · Kamailio - Modern VoIP Services Scalability With Intelligent SIP Routing Fred Posner, VoIP Engineer LOD Communications, Inc

Kamailio v5• FreeSWITCH and Lua go hand

in hand

• kemiKamailio Embedded Interface

• Framework allows using your favorite scripting language for SIP routing blocks

https://github.com/kamailio/kamailio/blob/master/misc/examples/kemi/kamailio-basic-kemi.cfg

https://github.com/kamailio/kamailio/blob/master/misc/examples/kemi/kamailio-basic-kemi-lua.lua

Page 14: Kamailio - Modern VoIP Services Scalability With ... · Kamailio - Modern VoIP Services Scalability With Intelligent SIP Routing Fred Posner, VoIP Engineer LOD Communications, Inc

Lua example if KSR.pv.is_null("$rU") then

-- request with no Username in RURI

KSR.sl.sl_send_reply(484,"Address Incomplete");

return 1;

end

Page 15: Kamailio - Modern VoIP Services Scalability With ... · Kamailio - Modern VoIP Services Scalability With Intelligent SIP Routing Fred Posner, VoIP Engineer LOD Communications, Inc

kemi benefits

• Live changes (no restart)

• Supports Lua, JavaScript, Python, Squirrel

• libs, expressions, modules, statements from your favorite language

• New dimension of flexibility

Page 16: Kamailio - Modern VoIP Services Scalability With ... · Kamailio - Modern VoIP Services Scalability With Intelligent SIP Routing Fred Posner, VoIP Engineer LOD Communications, Inc

API Routing

• http_client / http_async_client

• evapihttp://kamailio.org/docs/modules/stable/modules/evapi.html

• rtjsonhttp://kamailio.org/docs/modules/stable/modules/rtjson.html

• nodejs

Page 17: Kamailio - Modern VoIP Services Scalability With ... · Kamailio - Modern VoIP Services Scalability With Intelligent SIP Routing Fred Posner, VoIP Engineer LOD Communications, Inc

Mid-Registrar• since 2010

• https://www.kamailio.org/docs/modules/stable/modules/uac.html

• remote registrar even handles R-URI modifications

if(uac_reg_lookup("$rU", "$ru")) {

xlog("request from a remote SIP provider [$ou => $ru]\n");

}

lookup("location");

Page 18: Kamailio - Modern VoIP Services Scalability With ... · Kamailio - Modern VoIP Services Scalability With Intelligent SIP Routing Fred Posner, VoIP Engineer LOD Communications, Inc

HTABLE

• Hash Table Module

• Stored in shared memory

• Custom cache system

• Replication via DMQ

Page 19: Kamailio - Modern VoIP Services Scalability With ... · Kamailio - Modern VoIP Services Scalability With Intelligent SIP Routing Fred Posner, VoIP Engineer LOD Communications, Inc

–@miconda / Daniel-Constantin Mierla

“If you’re not using HTABLE, you’re doing something wrong.”

Page 20: Kamailio - Modern VoIP Services Scalability With ... · Kamailio - Modern VoIP Services Scalability With Intelligent SIP Routing Fred Posner, VoIP Engineer LOD Communications, Inc

SIP Edge Proxy —“SBC”

• Since 2001

• Security

• NAT

• Accounting

• RTP Proxy (rtpproxy, rtpengine)

Page 21: Kamailio - Modern VoIP Services Scalability With ... · Kamailio - Modern VoIP Services Scalability With Intelligent SIP Routing Fred Posner, VoIP Engineer LOD Communications, Inc

It’s About Power• Flexibility in language, protocol,

format, and controllers

• Lua, Python, JavaScript, Perl, Squirrel, etc

• HTTP, RPC, EVAPI, SIP, etc

• XML, JSON, custom

• node+js, SQL, php, Custom apps, etc

• Power to Scale

Page 22: Kamailio - Modern VoIP Services Scalability With ... · Kamailio - Modern VoIP Services Scalability With Intelligent SIP Routing Fred Posner, VoIP Engineer LOD Communications, Inc

See you in Berlin!kamailioworld.com

kamailio.org

Page 23: Kamailio - Modern VoIP Services Scalability With ... · Kamailio - Modern VoIP Services Scalability With Intelligent SIP Routing Fred Posner, VoIP Engineer LOD Communications, Inc

Ask a good question…

Get a cookie.

Fred [email protected]