Distributed Call Queues with Kamailio and Asterisk - ppt · 2014-04-07 · Distributed Call Queues...

18
Nir Simionovich, CEO, Greenfield Technologies Ltd Distributed Call Queues with Kamailio and Asterisk

Transcript of Distributed Call Queues with Kamailio and Asterisk - ppt · 2014-04-07 · Distributed Call Queues...

Page 1: Distributed Call Queues with Kamailio and Asterisk - ppt · 2014-04-07 · Distributed Call Queues with Kamailio and Asterisk. ... Amazon RDS MYSQL MYSQL Amazon Elasticache REDIS

Nir Simionovich, CEO, Greenfield Technologies Ltd

Distributed Call Queues with

Kamailio and Asterisk

Page 2: Distributed Call Queues with Kamailio and Asterisk - ppt · 2014-04-07 · Distributed Call Queues with Kamailio and Asterisk. ... Amazon RDS MYSQL MYSQL Amazon Elasticache REDIS

About me

• Location: Israel

• Passion: Open Source in General

• Super Hero Powers: Asterisk, AGI, AMI, PHP, JAVA, Linux, Network Security and VoIP Security

Page 3: Distributed Call Queues with Kamailio and Asterisk - ppt · 2014-04-07 · Distributed Call Queues with Kamailio and Asterisk. ... Amazon RDS MYSQL MYSQL Amazon Elasticache REDIS

Great things happened in 2006…

You decide !

Page 4: Distributed Call Queues with Kamailio and Asterisk - ppt · 2014-04-07 · Distributed Call Queues with Kamailio and Asterisk. ... Amazon RDS MYSQL MYSQL Amazon Elasticache REDIS

And my personal EPIC Failure !

BioClusterAn attempt at building an Asterisk

Cluster environment.

Page 5: Distributed Call Queues with Kamailio and Asterisk - ppt · 2014-04-07 · Distributed Call Queues with Kamailio and Asterisk. ... Amazon RDS MYSQL MYSQL Amazon Elasticache REDIS

Fast Forward to 2014

No one really needed it!

Why did I fail? Simple!

Page 6: Distributed Call Queues with Kamailio and Asterisk - ppt · 2014-04-07 · Distributed Call Queues with Kamailio and Asterisk. ... Amazon RDS MYSQL MYSQL Amazon Elasticache REDIS

Call Centers & ISVs- 2014

• Thinking Globally

• Thinking Cloud

• Thinking Geo-independence

• Thinking …

We need something new!

Page 7: Distributed Call Queues with Kamailio and Asterisk - ppt · 2014-04-07 · Distributed Call Queues with Kamailio and Asterisk. ... Amazon RDS MYSQL MYSQL Amazon Elasticache REDIS

We Want!

• Cloud based

• Auto Scaled

• Standards Compliant

• Secured & Encrypted

• Economical• Battle Tested• Future Proofed

Page 8: Distributed Call Queues with Kamailio and Asterisk - ppt · 2014-04-07 · Distributed Call Queues with Kamailio and Asterisk. ... Amazon RDS MYSQL MYSQL Amazon Elasticache REDIS

Tools of the trade

• Kamailio – Registrar and NAT Helper

• Asterisk – Media Server and Application

• REDIS – Interim Queue Management

• Beanstalkd – DWH Job Queue

• MySQL – Billing and CRM/ERP

Page 9: Distributed Call Queues with Kamailio and Asterisk - ppt · 2014-04-07 · Distributed Call Queues with Kamailio and Asterisk. ... Amazon RDS MYSQL MYSQL Amazon Elasticache REDIS

Selected Infrastructure

• Amazon EC2 – Kamailio & Asterisk

• Amazon RDS – MySQL Instance

• Amazon RedShift – DWH

• Amazon ElastiCache – REDIS

Page 10: Distributed Call Queues with Kamailio and Asterisk - ppt · 2014-04-07 · Distributed Call Queues with Kamailio and Asterisk. ... Amazon RDS MYSQL MYSQL Amazon Elasticache REDIS

The blueprint

Page 11: Distributed Call Queues with Kamailio and Asterisk - ppt · 2014-04-07 · Distributed Call Queues with Kamailio and Asterisk. ... Amazon RDS MYSQL MYSQL Amazon Elasticache REDIS

KamailioCluster

Asterisk“Queues”

Server

Asterisk“Queues”

Server

Asterisk“Queues”

Server

Asterisk“Queues”

Server

AmazonRDS

MYSQL

MYSQL

AmazonElasticache

REDIS

REDIS

AmazonRedShift

POSTGRESS “Magic Queue”

Service

SIP

Page 12: Distributed Call Queues with Kamailio and Asterisk - ppt · 2014-04-07 · Distributed Call Queues with Kamailio and Asterisk. ... Amazon RDS MYSQL MYSQL Amazon Elasticache REDIS

The fine print

Page 13: Distributed Call Queues with Kamailio and Asterisk - ppt · 2014-04-07 · Distributed Call Queues with Kamailio and Asterisk. ... Amazon RDS MYSQL MYSQL Amazon Elasticache REDIS

The “Magic Queue Service”

Page 14: Distributed Call Queues with Kamailio and Asterisk - ppt · 2014-04-07 · Distributed Call Queues with Kamailio and Asterisk. ... Amazon RDS MYSQL MYSQL Amazon Elasticache REDIS

Queuing without queuing

• Magic Queue service maintains a virtual queue – stored in REDIS

• The Queue is actually an ordered list of Asterisk channels

• When the time of the call to be processed arrives – MQS will instruct Asterisk to originate a call back to Kamailio

Page 15: Distributed Call Queues with Kamailio and Asterisk - ppt · 2014-04-07 · Distributed Call Queues with Kamailio and Asterisk. ... Amazon RDS MYSQL MYSQL Amazon Elasticache REDIS

Stress Testing

• Using SIPp we’ve simulated over 2,000 connected agents

• Using SIPp we’ve simulated a total of 3,600 concurrent inbound calls(8xAsterisk + 1xKamailio)

• Test ran for 10 hours

• 0 calls were dropped due to SIP issues

• 0 calls were dropped due to server issues

Page 16: Distributed Call Queues with Kamailio and Asterisk - ppt · 2014-04-07 · Distributed Call Queues with Kamailio and Asterisk. ... Amazon RDS MYSQL MYSQL Amazon Elasticache REDIS

How was the test done

• 3,600 calls were originated by SIPp and inserted into the distributed queue

• Calls were left in the queue for 1 minute

• After 1 minute, agents started logging in via SIPp and accepting calls

• We stopped at 2,000 agents

• Each call lasted 5 minute

• And it kept on going – with 1,600 queued

Page 17: Distributed Call Queues with Kamailio and Asterisk - ppt · 2014-04-07 · Distributed Call Queues with Kamailio and Asterisk. ... Amazon RDS MYSQL MYSQL Amazon Elasticache REDIS

What we didn’t do yet

• Queue over flowing

• Inner queue IVR

• Priority based queuing

• Queue break outs

• Lawful interception – very complicated

Page 18: Distributed Call Queues with Kamailio and Asterisk - ppt · 2014-04-07 · Distributed Call Queues with Kamailio and Asterisk. ... Amazon RDS MYSQL MYSQL Amazon Elasticache REDIS

Questions and Contact information

• You may contact me with questions using:

[email protected]

• http://www.simionovich.com

• http://www.greenfieldtech.net

• Or just ask me for my IM contact