Why Cluster? Exploring some of the decentralizing tools in Asterisk 1.4 and beyond



Similar documents
Introduction. What is DUNDi? Configuring Asterisk for use with DUNDi

Building a Distributed Call Center

Using DUNDi with a Cluster of Asterisk Servers! General Description and Scope

Beyond High Availability for Asterisk Based Contact Centers

DUNDi, So Easy A Caveman Could Do It!

Asterisk Fast Start. The Asterisk Fast Start course is a three-day course. The class will consist of a combination of lectures and lab exercises.

Using High Availability Technologies Lesson 12

Mediatrix 3000 with Asterisk June 22, 2011

Building the NGN Switch (with Asterisk) David Zimmer, CEO and Founder

WHITE PAPER. The Business Benefits of Upgrading Legacy IP Communications Systems.

Call Route Discovery with Asterisk / DUNDi

IP Telephony Deployment Models

High Availability Solutions for MySQL. Lenz Grimmer DrupalCon 2008, Szeged, Hungary

OpenVox GSM Gateway Function Manual

Building Robust IPTSP Based on Open Source Technology. Anowar Hasan Sabir, BDCOM Online Ltd. Bangladesh

Designing a Data Solution with Microsoft SQL Server 2014

Network Structure or Topology

Asterisk Cluster with MySQL Replication. JR Richardson Engineering for the Masses

Overview of Asterisk (*) Jeff Gunther

WHY IP-PBX SYSTEMS ARE GOOD FOR BUSINESS

A Brief Overview of VoIP Security. By John McCarron. Voice of Internet Protocol is the next generation telecommunications method.

McAfee Agent Handler

IP Office 7.0 and BCM 6.0 SIP Interoperability Configuration Notes

Chapter 1 - Web Server Management and Cluster Topology

Why choose an Asteriskbased. from Foehn? A communication solution that will answer your call. Based on the world s largest open source platform

Managing SIP traffic with Zeus Traffic Manager

ADMINISTERING CISCO UNIFIED COMMUNICATION MANAGER

Configuring High Availability for Embedded NGX Gateways in SmartCenter

Westek Technology Snapshot and HA iscsi Replication Suite

AT&T SIP Trunk Compatibility Testing for Asterisk

Applications between Asotel VoIP and Asterisk

This presentation provides an overview of the architecture of the IBM Workload Deployer product.

Chapter 9A. Network Definition. The Uses of a Network. Network Basics

VoIP and IP IT Tralee

Loway. r e s e a r c h. QueueMetrics. call center monitor. Tracing outbound calls through QueueMetrics On TrixBox. Version 2.0

Request Routing, Load-Balancing and Fault- Tolerance Solution - MediaDNS

Chapter 2 TOPOLOGY SELECTION. SYS-ED/ Computer Education Techniques, Inc.

Talking Platforms. Your White Label Partition. Your Resellers Partition. Your Customers Partition. Your Resellers Customer

OVERVIEW. CEP Cluster Server is Ideal For: First-time users who want to make applications highly available

What is QueueMetrics?

Cluster Computing. ! Fault tolerance. ! Stateless. ! Throughput. ! Stateful. ! Response time. Architectures. Stateless vs. Stateful.

Levelling the Playing Field

20465: Designing a Data Solution with Microsoft SQL Server

Asterisk. Michael Kershaw

A REVIEW ON DESIGN AND IMPLEMENTATION OF IVR SYSTEM USING ASTERISK

CHAPTER 2 BACKGROUND AND OBJECTIVE OF PRESENT WORK

Vess A2000 Series HA Surveillance with Milestone XProtect VMS Version 1.0

A COMPLETE BUSINESS COMMUNICATIONS SOLUTION

Requirements of Voice in an IP Internetwork

The Sierra Clustered Database Engine, the technology at the heart of

FOR SHORETEL CHAMPION PARTNERS ShoreTel Contact Center Workgroups vs. ECC 9 GENERAL SYSTEM OVERVIEW

Practical Guide. How to setup VoIP Infrastructure using AsteriskNOW

Introduction to VoIP Technology

ACD Automatic Call Distribution

Table of Contents. PBX Integration and API Guide - SmileTiger TeleMeeting Server 2011

MIT s Current SIP Infrastructure. Mark Silis MIT Information Services and Technology February 2, 2006

Tier Architectures. Kathleen Durant CS 3200

SCALABILITY AND AVAILABILITY

Active-Active and High Availability

Realization of Inventory Databases and Object-Relational Mapping for the Common Information Model

Grandstream Networks, Inc. UCM6510 Basic Configuration Guide

Building a Scalable Numbering Plan

Using DNS SRV to Provide High Availability Scenarios

By Numan Khan

Introduction to VOIP. Stephen Okay Abdus Salam Int l Center for Theoretical Physics Trieste, Italy, February 21, 2007

1Building Communications Solutions with Microsoft Lync Server 2010

Portable Wireless Mesh Networks: Competitive Differentiation

Need for Signaling and Call Control

Designing a Data Solution with Microsoft SQL Server 2014

SIP Proxy. SIP Proxy. Bicom SYSTEMS. SIP Proxy... Advanced Simplicity

An Architecture Vision

Contingency Planning and Disaster Recovery

Deploying, Configuring, and Administering Microsoft Lync Server 2010

SIP Trunking Guide: Get More For Your Money 07/17/2014 WHITE PAPER

Designing a Data Solution with Microsoft SQL Server

High Performance Cluster Support for NLB on Window

Course 10978A Introduction to Azure for Developers

a division of Technical Overview Xenos Enterprise Server 2.0

! 2!!$ ,)!$- %$0. Baskı-2 ! "! #$ % #$#!&'! '! (&&)!! &!! #.! &)!$#$! /&)!!! 0! &)!$!.!! 0$! #! &)!$ &.!!#$!! 3!&!#!!3! #&!'! &! 4!!

Course 20465: Designing a Data Solution with Microsoft SQL Server

Designing a Data Solution with Microsoft SQL Server

An introduction to PHP & AGI

Base One's Rich Client Architecture

Intercluster Lookup Service

Application Notes for G-Tek SIP Telephone MT-102H version 1510X i with Avaya Software Communication System Release 3.0 Issue 1.0.

Designing Database Solutions for Microsoft SQL Server 2012

Welcome to ScopServ. ScopTEL ACD Module

Transcription:

Why Cluster? Exploring some of the decentralizing tools in Asterisk 1.4 and beyond

Overview We'll look at some of the currently available tools in Asterisk we can use for clustering, in addition to making you aware of the tools that can further be used in our quest for a distributed federation of servers in future versions of Asterisk -- right around the corner!

Overview A high level overview of topologies and technologies we can use right now to start building distributed systems, but we don't have time to look at every nut and bolt

Overview Will be from the view of my personal experience in building a distributed virtual PBX system for an Internet Telephony Service Provider, and any tools I am familiar with that may be of a benefit to you (and me), in the future Clustering comes in many flavours, and a "drop in" solution is not yet possible

Why do I want to cluster? Lets you scale up the number of calls simply by adding another node (server) If a server dies, the rest of the cluster will take over the load

"#$%&'(')*#+!,-*(*.#/ 0!"#$%&'()*+,+-.()*+,+-(()*!!"#$#%#&'( 0 /0123456+!"#$#%#&')#%&$*#+$,-.)/#0'*( 0 4/741!!,.1-*2#$,-.)34'*0)&0&$'2( 0 ($8$19+:+4.08;19+<'8=$1;'!!+'.$*#/,5'") +-.1,64*#$,-.( 0 >?09@"AB9!!784&$),.)$,2'9)"#$#)1*-2)$:');<),.$-)$:')",#/=/#.( 0 1&/!2'3#4!!

Single Server

Single Server Handles all features of your PBX system No redundancy, no fail-over; if the system goes down, your phones are down Typical system would handle 20 phones and 2-4 phone lines

Multi-Server

Multi-Server Multiple boxes, each one handles one or more services Voicemail server, Queue server, Conferencing server, etc... Lets you scale a bit better by directing heavy load applications to dedicated machines

Cluster Topologies Centralized registration server Distributed registration server Hybrid registration server

5#&-36(*.#/!7#)*+-36-*'&!8#39#3 0 5#&-36(!:'*&-!;'3!3#)*+-36-*'&<!/*+-3*=>-#+! $6((+!-'!2#/*6!+#39#3+ 0?%'&#+!3#)*+-#3!-'!6!+*&)(#!:'*&-@!6&/!-%6-! +#39#3!$'&-3'(+!/*+-3*=>-*'&!A-%*&B!+';-+C*-$%! D!3'>-#3E 0 56&!=#!'&#!';!+#9#36(!2#-%'/+F!G/#6((H! *)&'3#+!2#/*6!AI:#&8J7<!1+-#3*+B<! K3##+C*-$%FFFE 0 1((!#&/:'*&-+!3#)*+-#3!-'!6!+*&)(#!:(6$#@!+'!!!!!&'!&##/!-'!+##B!-%#2!'>-!!

Sample Call Flow

Sample Call Flow

Sample Call Flow

Sample Call Flow

Sample Call Flow

,+*&)!/*6(:(6&!;>&$-*'&+!C*-%! L,ML*!"#$%&%#!%'()'!"#$%&%#!%*!+,-.%&/0/123/4567893*:89;<= 45;9>?@7AB!"#$%&%#!%CAD451E1<@>;F>@A G,%,%-'()' G,%,%-*!+,-.%&/0/123/4567893*:89;<= 45;9>?@7ABG,%,%-CAD451E1<@>;F>@A.&,#H*,-IJ%'()'.&,#H*,-IJ%/0/123/4567893*:89;<=45;9>?@7AB,-IJ%C' AD451E1<@>;F>@A!!

,+*&)!/*6(:(6&!;>&$-*'&+!C*-%! L,ML*!"#$%&%#!%'()'!"#$%&%#!%*!+,-.%&/0/123/4567893*:89;<= 45;9>?@7AB!"#$%&%#!%CAD451E1<@>;F>@A L,ML*!7#+'>3$#!M62#!!

,+*&)!/*6(:(6&!;>&$-*'&+!C*-%! L,ML*!"#$%&%#!%'()'!"#$%&%#!%'!()*+%&/0/123/4567893*:89;<= 45;9>?@7AB!"#$%&%#!%CAD451E1<@>;F>@A L*6(:(6&!$'&-#N-!-'!:#3;'32!(''B>:!!

,+*&)!/*6(:(6&!;>&$-*'&+!C*-%! L,ML*!"#$%&%#!%'()'!"#$%&%#!%*!+,-.%&/,/123/4567893*:89;<= 45;9>?@7AB!"#$%&%#!%CAD451E1<@>;F>@A O#*)%-!A.#3'!*+!%*)%#+-!C#*)%-E!!

,+*&)!/*6(:(6&!;>&$-*'&+!C*-%! L,ML*!"#$%&%#!%'()'!"#$%&%#!%*!+,-.%&/0/-.//4567893*:89;<= 45;9>?@7AB!"#$%&%#!%CAD451E1<@>;F>@A "#$%&'(')H!3#+'>3$#!ACD4/74EF6GH! /*6(:(6&!963*6=(#E!!

,+*&)!/*6(:(6&!;>&$-*'&+!C*-%! L,ML*!"#$%&%#!%'()'!"#$%&%#!%*!+,-.%&/0/123/012345/'645789 0175:;<3=>!"#$%&%#!%?=@01-A-8<:7B:<= 7#+>(-!3#->3&#/!*&!CD4/744F(EH JN62:(#P! QRL,MLLJ8"S!3#->3&#/!TTU+H+-#2I&#!!

DUNDIRESULT() and DUNDIQUERY() Unfortunately, in 1.4, we have to query each server individually but in 1.6, we have solved this with DUNDIQUERY() and DUNDIRESULT() DUNDIQUERY() retrieves the data from the servers, and DUNDIRESULT() parses it

DUNDIQUERY()!JN62:(# exten => _X.,1,Set(ID=${DUNDIQUERY(${USERNAME}, trunk_usage,b)}) exten => _X.,n,Set(NUM=${DUNDIRESULT(${ID},getnum)}) exten => _X.,n,NoOp(There are ${NUM} results) exten => _X.,n,Set(X=1) exten => _X.,n,While($[${X} <= ${NUM}]) exten => _X.,n,NoOp(Result ${X} is ${DUNDIRESULT(${ID},$ {X})}) exten => _X.,n,Set(X=$[${X} + 1]) exten => _X.,n,EndWhile()!!

Sample Call Flow

Sample Call Flow

Sample Call Flow

Sample Call Flow

Centralized Advantages Easier to control where to send calls based on prior load testing (DUNDi and GROUP_COUNT function) May be simpler to administer (hub and spoke topology)

Centralized Disadvantages It's... well... centralized -- single point of failure May be a ceiling on the number of registrations the server can handle

Distributed registration server No centralized distribution server Phones can register to any server in the cluster Asterisk seeks out the registration point and delivers the call Uses DUNDi and regexten/regcontext methods (found in sip.conf and iax.conf) to find endpoints

Sample Call Flow

Sample Call Flow

Sample Call Flow

Sample Call Flow

Sample Call Flow

Sample Call Flow

Failed Registration Server

Distributed Advantages No central registration point to fail; phones can auto-failover Creates a "self-healing" network by nature

Distributed Disadvantages Harder to control number of calls each server handles Requires careful network planning in order to scale Fully meshed networks are fault tolerant, but are not (reasonably) scalable

Hybrid registration server Combine the advantages of distributed and centralized registration servers Utilize heartbeat to auto-failover registration server to another server in the LAN OR, run a pair of registration servers, balance the registrations between them, and have the phones failover if a server dies Still have separate servers handle media and processing of calls based on prior load testing

Hybrid topology

Hybrid Advantages Get the best of both distributed and centralized models Better tolerance to system failure

Hybrid Disadvantages May be more complicated of a topology to initially configure and maintain More technologies involved could possibly mean more places to break

Clustering Tools DUNDi Realtime / UnixODBC (database integration) func_odbc Centralized voicemail: IMAP or ODBC

DUNDi (Distributed Universal Number Discovery) Is utilized to get information from other servers in the cluster We then use the returned information in our dialplan to make decisions Example: how many calls is a remote box currently handling? Another example: Is the Queue() a channel looking for currently available elsewhere in the cluster? If so, we should probably redirect the call

Realtime and UnixODBC Realtime allows you to place your flatfile configuration files (e.g. sip.conf) into the database. This allows multiple boxes to read and manipulate the same data as if it were a single system Could create a script to pull the data from the database, generate a flatfile and write it to the diskdrive, but this is messy... UnixODBC is a database communication abstraction layer that lets Asterisk talk to a single interface, but communicate with multiple databases (MySQL, PostgresSQL, etc...)

func_odbc The coolest tool at our disposal no more AGI Read and write data from the database directly from the dialplan Manipulate and retrieve the same data your graphical system is using (i.e. one data entry point) The power of func_odbc is best described by looking at an example

0 ;>&$V'/=$F$'&; ;>&$V'/=$!+62:(# [ROUTE] readhandle=asterisk prefix=get readsql=select did_source,did_destination,did_dest_address_id FROM ast_did_route WHERE did_number = '${ARG1}' 0 #N-#&+*'&+F$'&; exten => s,n,set(hash(my_route)=${get_route(${did})}) exten => s,n,verbose(1,${hash(my_route,did_source)})!!

(I'm cheating a bit...) svn co http://svncommunity.digium.com/svn/func_odbc/1.4 /usr/src/func_odbc-1.4 svn co http://svncommunity.digium.com/svn/app_stack/1.4 /usr/src/app_stack-1.4 app_stack gives us: GoSub() GoSubIf() Return() StackPop()

Voicemail We can centralize our voicemail using IMAP or ODBC storage This way, we don't have pieces of voicemail all over the place, and we don't need to rely on a single server for voicemail -- all servers in the cluster can handle voicemail

"#$%&%'$(#)!*%+$,&%' -./%'%!0%+$,&%'!+&%!(#!1'$%&('2!34546!+#7!8(99!:+2%! :+#;!<0!$/%!$&(=2'!&%>,(&%7!(#!34?!#<!9<#)%&! #%=%''+&;@ A 17+B$(C%!DEF!0<&!GEHD@!%+'(9;!+77!#%8! =<9,:#'!$<!;<,&!DEF!&%=<&7' A 0,#=I7%C'$+$%@!=,'$<:(J%!7%C(=%!'$+$%! (#0<&:+$(<#!0&<:!$/%!7(+9B9+# A 1==%''!+99!&%',9$'!0&<:!+!EKLE(!>,%&;! MEKLE"NKOFP!+#7!EKLE"FOQKR.!0,#=$(<#'S A E;#+:(=!8%()/$!=<#$&<9!(#!EKLE(!!

What does the future hold? Current efforts include a binary encoded system inside of Asterisk, allowing events to be sent across servers The first example of this would be Message Waiting Indication for Voicemail() being distributed across various boxes

What does the future hold? Another application would be sharing device state amongst the cluster Immediately this would be useful for sharing presence information, and is a prerequisite for building distributed systems that depend on device states; distributed queues for example

"#$!%&'&($!)*!+,-.! /012!($023!4,(!'$*'5167 8 4&19:2$;*'0'$<!=01&0>>3!*$'!'#$!2$;59$! *'0'$!,4!0!2$;59$!51!'#$!250>?>01 @ A09B?,('!0;05>0A>$!C #''?<DD*;19,==&15'3E2565&=E9,=D*;1D(&**$>>D0*'$(5*BFGEHD4&19:2$;*'0'$FGEHD 8 I5*'(5A&'$2!2$;59$!*'0'$!/51!2$;$>,?=$1'7 @ J*$*!K?$1L)M!>5A(0(3 @ N5>>!1,'!#0;$!0!A09B?,('!2&$!',!9,=?>$O5'3 #''?<DD*;1E2565&=E9,=D*;1D0*'$(5*BD'$0=D(&**$>>D$;$1'*D!!

+,-!)*!"#$!%&'&($. 8 PIQ!L20?'5;$!KIRP @ 9&*',=!9,>&=1*!=02$!$0*3. #''?<DD*;19,==&15'3E2565&=E9,=D*;1D'5>6#=01DA(019#$*DGEHD92(:020?'5;$:,2A9E9 8 S,M&A!D!S,M&A)4!D!M'09BT,? @ 1,-!-5'#!0(6&=$1'*.!/U09(,!($?>09$=$1'7 GoSub(subCallForward,s,1(${USERNAME})) #''?<DD*;19,==&15'3E2565&=E9,=D*;1D0??:*'09BDGEV #''?<DD*;19,==&15'3E2565&=E9,=D*;1D0??:*'09BDGEH L*'$(5*B!GEV!A09B?,(' L*'$(5*B!GEH!A09B?,('!!

Questions and Discussion

!"#$%&$'(#)"*+%$,"#!"#$%&'()"* +,,-.//00012"#$3'()"*1453 2"#$6(#7#831453,0#,,"9.%2"#$:3'()"*!!