SlideShare a Scribd company logo
HA Asterisk on Azure 
Magic Azure! 
Sanjay|Anthony @astiostech.com 
Copyright 2014 © Astiostech Sdn Bhd. For informational purposes only. No warranties of any kind are made 
and you have to verify all information before relying on it. You can re-use this presentation as long as you 
read, agree, and follow the guidelines described in the “Comments” field in File/Properties.
Readme 
• Microsoft MVP in Enterprise Security 
• Over 10 years of experience with Open 
Source, Microsoft Technology and 
Security related speaking engagements 
• Very focused with over 8 years 
experience with Asterisk and Nagios 
• Built one of the first VaaS in Malaysia 
using cloud tech 
• Built various products and solutions on 
private labels and OSS
Introduction To Asterisk 
• Enterprise PBX functionalities 
• Integration with computers 
• Relatively large scalability 
• Connects to lots and lots of other communication devices 
• Human interaction (interactive) 
• Customizable for most needs
Introduction To Asterisk 
• Become a call center 
• Enable IP features (e.g. SIP to cost saving gateways) 
• Bridge using IP between remote offices (free calls) 
• Voicemail/VMtoEmail services 
• Integrate to CRM/Database/Software
Introduction To Asterisk 
• Multiparty voice and video conferencing 
• Bridge to Skype/Gtalk 
• Enable a digital receptionist / directory 
• Have a remote office / DR office setup 
• Call accounting/auditing/management 
• Text to speech 
• Connect anywhere, anytime 
• Call recording, and many more..
Introduction to Asterisk 
Google Talk 
H.323 
IAX™ (Inter-Asterisk eXchange) 
Jingle/XMPP 
MGCP (Media Gateway Control Protocol 
SCCP (Cisco® Skinny®) 
SIP (Session Initiation Protocol) 
Skype 
UNIStim 
Caller ID on Call Waiting 
Calling Cards 
Conference Bridging 
Database Store / Retrieve 
Database Integration 
Dial by Name 
Direct Inward System Access 
Distinctive Ring 
Distributed Universal Number Discovery 
Do Not Disturb 
E911 
ENUM 
AGI (Asterisk Gateway Interface) 
RESTFUL API 
Graphical Call Manager 
Outbound Call Spooling 
Predictive Dialer 
TCP/IP Management Interface 
TDMoE (Time Division Multiplex 
over Ethernet) 
Allows direct connection of Asterisk 
PBX 
Zero latency 
Uses commodity Ethernet 
hardware 
Voice-over IP 
Allows for integration of physically 
separate installations 
Uses commonly deployed data 
connections 
Allows a unified dialplan across 
multiple offices 
AT&T 4ESS 
EuroISDN PRI and BRI 
Lucent 5ESS 
National ISDN 1 
National ISDN 2 
NFAS 
Nortel DMS100 
Q.SIG
Key Concepts 
Sanjay W
Asterisk on cloud – Voice as a Service 
• Features 
• Easy deployment 
• Scalability 
• Secure by implementation 
• No voice distortion / quality issues 
• Can be deployed across multi geo locations 
• Plug and play for customers/users 
• Number follows you anywhere you go 
• Enablers 
• Current telcos providing VoIP PSTN in and out 
• Many hundreds of international bulk voice providers to choose from 
• Multi route for resilience 
• Location independent 
• Low cost of ownership 
• Extremely high broadband penetration rate 
• Negligible latency
Asterisk on Azure – Why Azure? 
• Designed for Noobs (like me) 
• Not a MVP for Azure  
• Customer satisfaction 
• No complaints 
• Supported with multiple Open Source OS flavors 
• We personally prefer Debian and Ubuntu 
• Has its own HA/LB method (explained later) 
• Extremely Fast, Extremely Scalable 
• Geographically suitable for Malaysia 
• Singapore, Hong Kong
Asterisk on Azure – Why Azure? 
• Assume from here on, we are on the farther POP, Hong Kong 
• We deliberately did that for worst-case-scenarios 
• Latency is negligible (using SIP with uLaw, no compression, no 
encapsulation, no encryption) 
• Singapore was around 40ms-60ms 
• Hong Kong was around 70ms-80ms 
• ITU-T recommendation latency is 150ms for voice traffic (and 250ms 
roundtrip) 
• Low packet loss rate 
• Approximately 0.1%
Asterisk on Azure – Why Azure? 
• Easy management UX 
• Adding ports was slow, otherwise, everything else is fast  
• Build mobile solutions out from Azure 
• Connect to an AD ready Azure 
• For Authentication, Authorization on Asterisk 
• Unification of credentials, integration 
• Shared resources like disks can be helpful to share commonly used 
resources such as static configurations, etc.. 
• Easy Backup / Restore operations
Our Demo Azure Asterisk HA 
• Distributed computing within Azure 
• Two SIP servers 
• One DB server (could also be 2 if we had more time) 
• Can also add proxies – But we didn’t have time 
• Can also add firewalls – But we didn’t have time 
• We use pfSense firewall in XML cluster mode for hacker bashing 
• Comes with firewalls, IPS/IDS and lots of other networking goodies 
• Uses Azure Cloud HA for targeting 
• Typically we use another method (explained later) 
• Uses common and easy HA methods on Linux
Our Demo Azure 
Public Network 
Asterisk Master Asterisk Slave Asterisk HA 
Asterisk Configurator DB 
Azure Cloud HA 
Telco A 
Telco B
Alternative Design 
Azure Asterisk HA 
Public Network 
pfSense 1 
Proxy Kamailio Proxy Kamailio 
Asterisk Master Asterisk Slave 
DB Slave 
Azure Cloud HA 
Telco A 
Telco B 
DB Master 
pfSense 1 
Virtual DMZ
Our Demo Azure 
Asterisk HA 
Logical Illustration 
SIP USER 
PUBLIC LAYER 
AZURE CLOUD LAYER TCP PROBE 
WHICH ACTIVE SERVER 
RUNNING TCP 5060 
WHICH ACTIVE SERVER 
RUNNING TCP 5060 
ACTIIVE SERVER CONNECTS TO CONFIG DB
Components in Demo Azure Asterisk 
• Asterisk 1.8 or higher 
• FreePBX 2.11 or higher 
• MySQL 5 
• PHP 
• Heartbeat 
• DRBD 
• Tiny script to monitor safe_asterisk 
• Azure depends on port TCP5060 
• Asterisk opens port TCP5060 
• So, its really good to monitor Asterisk
Setup Details 
Anthony Ho
Steps to build Asterisk HA on Azure 
Checklist 
• Setup 3 Virtual Machines (VM) in 
Azure. 
• Assigning the VMs with the same 
cloud service. 
• Creating the necessary End points. 
• Attaching an Empty Disk on each 
VM. 
• Installation of Astiostech’s Asterisk 
Business Telephony 
• Installation of Astiostech’s High 
Availability Package.
Steps to build Asterisk HA on Azure 
• Setup 3 Azure 
Ubuntu VM
Steps to build Asterisk HA on Azure 
• Use the same Cloud 
Service on the Second 
and third VM
Steps to build Asterisk HA on Azure 
• Create end points and check 
“CREATE A LOAD-BALANCED 
SET” to failover the necessary 
ports else leave it to run 
normally.
10 Steps to build Asterisk HA on Azure 
• Create an empty disk on 
two of the Asterisk VMs 
and attach it once done.
Steps to build Asterisk HA on Azure 
• Installation of 
Astiostech’s 
Asterisk Business 
Telephony package. 
• MySQL database 
will be installed 
into the dedicated 
MySQL database 
server. 
ASTIOSTECH BTEL PBX 
FOP2 FreePBX MonAST 
APACHE * ASTERISK MYSQL 
LINUX OS
Steps to build Asterisk HA on Azure
Steps to build Asterisk HA on Azure
Steps to build Asterisk HA on Azure 
There are 2 major components 
in our HA package 
1. Heartbeat 
• Heartbeat is a daemon that 
provides cluster infrastructure 
(communication and 
membership) services to its 
clients. 
2. DRBD
Steps to build Asterisk HA on Azure 
DRBD refers to block devices designed as a building block to 
form high availability (HA) clusters. This is done by mirroring a 
whole block device via an assigned network. 
DRBD can be understood as network based raid-1.
Demo Overview 
SLAVE 
heartbeat 
Replication 
TM 
MASTER 
(ACTIVE) 
astiosmaster.cloudapp.net 
Ext: 1000 Ext: 1001 Anthony s Cell Phone
Demo calling from Master server 
• Ext.1000 Calling 
Ext.1001 
• Outbound Calls – 
Ext.1000 calling an 
external number. 
• Inbound Calls - An 
external caller 
calling in to the 
Extension 1001. 
SLAVE 
heartbeat 
Replication 
TM 
MASTER 
(ACTIVE) 
astiosmaster.cloudapp.net 
Ext: 1000 Ext: 1001 Anthony s Cell Phone
Demo Failover (Master -> Slave)
Demo calling from Slave server 
• Asterisk PBX Fails 
over to the SLAVE 
server. 
• PBX Phone function 
will just work like 
normal. 
SLAVE 
(ACTIVE) 
heartbeat 
Replication 
TM 
MASTER 
astiosmaster.cloudapp.net 
Ext: 1000 Ext: 1001 Anthony s Cell Phone
Failback and quick test
Azure Setup Screens
Field tips and tricks 
• Enable Asterisk’s TCP 5060 Ports for Azure Cloud monitoring. 
• Since Azure monitors HTTP or TCP ports only 
• Enable a daemon service [demo] to monitor Asterisk 
• In case Asterisk goes down, initiate failover/failback 
• All other ports should then be “instructed” by the TCP 5060 via Azure, 
• You might want to enable individual ports for SSH 
• But you cannot use the same public facing port twice
Q&A & Thank You 
Copyright 2014 © Astiostech Sdn Bhd. For informational 
purposes only. No warranties of any kind are made and you 
have to verify all information before relying on it. You can re-use 
this presentation as long as you read, agree, and follow 
the guidelines described in the “Comments” field in 
File/Properties. 
Openness is the future of computing..

More Related Content

PPTX
Κάτω Ιταλία Ελληνική διάλεκτος
PDF
Πλάτων - Πολιτεία (Γ΄Λυκείου) - Μεταφράσεις
PDF
Ξενοφῶν «Ἑλληνικά» Α’ 1 , §§ 1 – 3
PDF
IEEE MACSec and NSA ESS: How to Protect Your WAN, LAN and Cloud
DOCX
Υπέρ Μαντιθέου 1-3, Εργασίες μαθητών
PPTX
Μαρκος Μποτσαρης (εργασία μαθητών)
PPTX
H Eπικούρεια Φιλοσοφία για Πρωτάρηδες
DOCX
ΦΥΛΛΟ ΕΡΓΑΣΙΑΣ ΔΟΜΗΜΕΝΗΣ ΜΟΡΦΗΣ-ΑΡΧΑΙΑ ΕΛΛΗΝΙΚΑ Β΄ΓΥΜΝΑΣΙΟΥ -ΕΝΟΤΗΤΑ 6
Κάτω Ιταλία Ελληνική διάλεκτος
Πλάτων - Πολιτεία (Γ΄Λυκείου) - Μεταφράσεις
Ξενοφῶν «Ἑλληνικά» Α’ 1 , §§ 1 – 3
IEEE MACSec and NSA ESS: How to Protect Your WAN, LAN and Cloud
Υπέρ Μαντιθέου 1-3, Εργασίες μαθητών
Μαρκος Μποτσαρης (εργασία μαθητών)
H Eπικούρεια Φιλοσοφία για Πρωτάρηδες
ΦΥΛΛΟ ΕΡΓΑΣΙΑΣ ΔΟΜΗΜΕΝΗΣ ΜΟΡΦΗΣ-ΑΡΧΑΙΑ ΕΛΛΗΝΙΚΑ Β΄ΓΥΜΝΑΣΙΟΥ -ΕΝΟΤΗΤΑ 6

What's hot (8)

PPTX
Η ιστορία των Σταυροφοριών - Η' Σταυροφορία
PPTX
Introduction-to-Cisco-Identity-Services-Engine-ISE.pptx.pptx
PDF
6. Πανελληνιοι Δεσμοί - φύλλο εργασίας
PDF
Ομήρου Οδύσσεια, Βασικοί όροι και στοιχεία τεχνικής
PDF
ΦΥΛΛΟ ΕΡΓΑΣΙΑΣ ΜΥΚΗΝΑΙΚΟΣ ΠΟΛΙΤΙΣΜΟΣ, ΣΕΛ. 69 71
PPTX
ΙΣΤΟΡΙΑ Α' ΓΥΜΝΑΣΙΟΥ
PPTX
H κλασική εποχή (α΄ μέρος)
Η ιστορία των Σταυροφοριών - Η' Σταυροφορία
Introduction-to-Cisco-Identity-Services-Engine-ISE.pptx.pptx
6. Πανελληνιοι Δεσμοί - φύλλο εργασίας
Ομήρου Οδύσσεια, Βασικοί όροι και στοιχεία τεχνικής
ΦΥΛΛΟ ΕΡΓΑΣΙΑΣ ΜΥΚΗΝΑΙΚΟΣ ΠΟΛΙΤΙΣΜΟΣ, ΣΕΛ. 69 71
ΙΣΤΟΡΙΑ Α' ΓΥΜΝΑΣΙΟΥ
H κλασική εποχή (α΄ μέρος)
Ad

Viewers also liked (20)

PPTX
Build HA Asterisk on Microsoft Azure using DRBD/Heartbeat
PDF
Running Asterisk on virtualized environments
ODP
Using Asterisk and Kamailio for Reliable, Scalable and Secure Communication S...
PDF
High Availability Setup with Heartbeat and Floating IP
PDF
WordPress for Beginners Create Professional Websites
ODP
Expanding Asterisk with Kamailio
PPTX
Elastix installation
PDF
Alfio Muñoz - Alta disponibilidad con Elastix
ODP
Elastix4.0 High Availability without ElastixHA module
PDF
High Availability With DRBD & Heartbeat
PPTX
MACRA and the New Quality Payment Program
PPT
Design patterns and plan for developing high available azure applications
PPT
High availability solutions bakostech
PDF
Oracle database high availability solutions
PDF
High Availability (HA) Explained
PDF
Comandos de configuracion de dispositivos cisco
PDF
Kamailio :: A Quick Introduction
PDF
Elastix Call Center
PDF
Pinana : Old proposal for distributed SIP states in Asterisk
PPT
Astricon 2010: Scaling Asterisk installations
Build HA Asterisk on Microsoft Azure using DRBD/Heartbeat
Running Asterisk on virtualized environments
Using Asterisk and Kamailio for Reliable, Scalable and Secure Communication S...
High Availability Setup with Heartbeat and Floating IP
WordPress for Beginners Create Professional Websites
Expanding Asterisk with Kamailio
Elastix installation
Alfio Muñoz - Alta disponibilidad con Elastix
Elastix4.0 High Availability without ElastixHA module
High Availability With DRBD & Heartbeat
MACRA and the New Quality Payment Program
Design patterns and plan for developing high available azure applications
High availability solutions bakostech
Oracle database high availability solutions
High Availability (HA) Explained
Comandos de configuracion de dispositivos cisco
Kamailio :: A Quick Introduction
Elastix Call Center
Pinana : Old proposal for distributed SIP states in Asterisk
Astricon 2010: Scaling Asterisk installations
Ad

Similar to High Availability Asterisk and FreePBX on Microsoft Azure (20)

PPT
PowerPoint Presentation
PDF
Autoscaling OpenStack Natively with Heat, Ceilometer and LBaaS
PPTX
Openstack in 10 mins
PPTX
Openstack
PDF
tack Deployment in the Enterprise
PDF
Puppet Camp Dallas 2014: Puppet Keynote
PDF
As a Service: Cloud Foundry on OpenStack - Lessons Learnt
PPTX
What's New in Grizzly & Deploying OpenStack with Puppet
PDF
FreeSWITCH on Docker
PDF
FreeSWITCH on Docker
PPTX
Introduction to IP telephony & VoIP
PPTX
High available BizTalk infrastructure on Azure IaaS
PDF
Dark launching with Consul at Hootsuite - Bill Monkman
PPTX
What is the OpenStack Platform? By Peter Dens - Kangaroot
PDF
Helix core on aws webinar
PDF
Connecting Oracle Cloud to your Data Centre (Part A)
PDF
Puppet Camp London 2014: Keynote
PPTX
analytic engine - a common big data computation service on the aws
PPTX
QNAP for IoT
PDF
Puppet Camp Tokyo 2014: Keynote
PowerPoint Presentation
Autoscaling OpenStack Natively with Heat, Ceilometer and LBaaS
Openstack in 10 mins
Openstack
tack Deployment in the Enterprise
Puppet Camp Dallas 2014: Puppet Keynote
As a Service: Cloud Foundry on OpenStack - Lessons Learnt
What's New in Grizzly & Deploying OpenStack with Puppet
FreeSWITCH on Docker
FreeSWITCH on Docker
Introduction to IP telephony & VoIP
High available BizTalk infrastructure on Azure IaaS
Dark launching with Consul at Hootsuite - Bill Monkman
What is the OpenStack Platform? By Peter Dens - Kangaroot
Helix core on aws webinar
Connecting Oracle Cloud to your Data Centre (Part A)
Puppet Camp London 2014: Keynote
analytic engine - a common big data computation service on the aws
QNAP for IoT
Puppet Camp Tokyo 2014: Keynote

More from Sanjay Willie (11)

PPTX
Mastering ChatGPT & LLMs for Practical Applications: Tips, Tricks, and Use Cases
PPTX
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
PPTX
ChatGPT For Business Use
PPTX
WordPress CLI in-depth
PDF
The Role of Governments In Sustaining The 4th Industrial Revolution
PPTX
Enhancing Contact Centers Through Open Source Digital Workplace Solutions
PPTX
Open Source Driving Digital Workplace Collaboration
PPTX
Functionality, security and performance monitoring of web assets (e.g. Joomla...
PPTX
NagiosXI - Astiostech NagiosXI Event with NTT MSC Cyberjaya
PPTX
What is Nagios XI and how is it different from Nagios Core
PPTX
WebRTC & Asterisk 11
Mastering ChatGPT & LLMs for Practical Applications: Tips, Tricks, and Use Cases
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
ChatGPT For Business Use
WordPress CLI in-depth
The Role of Governments In Sustaining The 4th Industrial Revolution
Enhancing Contact Centers Through Open Source Digital Workplace Solutions
Open Source Driving Digital Workplace Collaboration
Functionality, security and performance monitoring of web assets (e.g. Joomla...
NagiosXI - Astiostech NagiosXI Event with NTT MSC Cyberjaya
What is Nagios XI and how is it different from Nagios Core
WebRTC & Asterisk 11

Recently uploaded (20)

PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
Web App vs Mobile App What Should You Build First.pdf
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
Zenith AI: Advanced Artificial Intelligence
PPTX
Tartificialntelligence_presentation.pptx
PPTX
A Presentation on Artificial Intelligence
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PPTX
A Presentation on Touch Screen Technology
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
1. Introduction to Computer Programming.pptx
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
August Patch Tuesday
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Univ-Connecticut-ChatGPT-Presentaion.pdf
Web App vs Mobile App What Should You Build First.pdf
1 - Historical Antecedents, Social Consideration.pdf
Zenith AI: Advanced Artificial Intelligence
Tartificialntelligence_presentation.pptx
A Presentation on Artificial Intelligence
Heart disease approach using modified random forest and particle swarm optimi...
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
A Presentation on Touch Screen Technology
Assigned Numbers - 2025 - Bluetooth® Document
1. Introduction to Computer Programming.pptx
Hindi spoken digit analysis for native and non-native speakers
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
August Patch Tuesday
A comparative study of natural language inference in Swahili using monolingua...
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...

High Availability Asterisk and FreePBX on Microsoft Azure

  • 1. HA Asterisk on Azure Magic Azure! Sanjay|Anthony @astiostech.com Copyright 2014 © Astiostech Sdn Bhd. For informational purposes only. No warranties of any kind are made and you have to verify all information before relying on it. You can re-use this presentation as long as you read, agree, and follow the guidelines described in the “Comments” field in File/Properties.
  • 2. Readme • Microsoft MVP in Enterprise Security • Over 10 years of experience with Open Source, Microsoft Technology and Security related speaking engagements • Very focused with over 8 years experience with Asterisk and Nagios • Built one of the first VaaS in Malaysia using cloud tech • Built various products and solutions on private labels and OSS
  • 3. Introduction To Asterisk • Enterprise PBX functionalities • Integration with computers • Relatively large scalability • Connects to lots and lots of other communication devices • Human interaction (interactive) • Customizable for most needs
  • 4. Introduction To Asterisk • Become a call center • Enable IP features (e.g. SIP to cost saving gateways) • Bridge using IP between remote offices (free calls) • Voicemail/VMtoEmail services • Integrate to CRM/Database/Software
  • 5. Introduction To Asterisk • Multiparty voice and video conferencing • Bridge to Skype/Gtalk • Enable a digital receptionist / directory • Have a remote office / DR office setup • Call accounting/auditing/management • Text to speech • Connect anywhere, anytime • Call recording, and many more..
  • 6. Introduction to Asterisk Google Talk H.323 IAX™ (Inter-Asterisk eXchange) Jingle/XMPP MGCP (Media Gateway Control Protocol SCCP (Cisco® Skinny®) SIP (Session Initiation Protocol) Skype UNIStim Caller ID on Call Waiting Calling Cards Conference Bridging Database Store / Retrieve Database Integration Dial by Name Direct Inward System Access Distinctive Ring Distributed Universal Number Discovery Do Not Disturb E911 ENUM AGI (Asterisk Gateway Interface) RESTFUL API Graphical Call Manager Outbound Call Spooling Predictive Dialer TCP/IP Management Interface TDMoE (Time Division Multiplex over Ethernet) Allows direct connection of Asterisk PBX Zero latency Uses commodity Ethernet hardware Voice-over IP Allows for integration of physically separate installations Uses commonly deployed data connections Allows a unified dialplan across multiple offices AT&T 4ESS EuroISDN PRI and BRI Lucent 5ESS National ISDN 1 National ISDN 2 NFAS Nortel DMS100 Q.SIG
  • 8. Asterisk on cloud – Voice as a Service • Features • Easy deployment • Scalability • Secure by implementation • No voice distortion / quality issues • Can be deployed across multi geo locations • Plug and play for customers/users • Number follows you anywhere you go • Enablers • Current telcos providing VoIP PSTN in and out • Many hundreds of international bulk voice providers to choose from • Multi route for resilience • Location independent • Low cost of ownership • Extremely high broadband penetration rate • Negligible latency
  • 9. Asterisk on Azure – Why Azure? • Designed for Noobs (like me) • Not a MVP for Azure  • Customer satisfaction • No complaints • Supported with multiple Open Source OS flavors • We personally prefer Debian and Ubuntu • Has its own HA/LB method (explained later) • Extremely Fast, Extremely Scalable • Geographically suitable for Malaysia • Singapore, Hong Kong
  • 10. Asterisk on Azure – Why Azure? • Assume from here on, we are on the farther POP, Hong Kong • We deliberately did that for worst-case-scenarios • Latency is negligible (using SIP with uLaw, no compression, no encapsulation, no encryption) • Singapore was around 40ms-60ms • Hong Kong was around 70ms-80ms • ITU-T recommendation latency is 150ms for voice traffic (and 250ms roundtrip) • Low packet loss rate • Approximately 0.1%
  • 11. Asterisk on Azure – Why Azure? • Easy management UX • Adding ports was slow, otherwise, everything else is fast  • Build mobile solutions out from Azure • Connect to an AD ready Azure • For Authentication, Authorization on Asterisk • Unification of credentials, integration • Shared resources like disks can be helpful to share commonly used resources such as static configurations, etc.. • Easy Backup / Restore operations
  • 12. Our Demo Azure Asterisk HA • Distributed computing within Azure • Two SIP servers • One DB server (could also be 2 if we had more time) • Can also add proxies – But we didn’t have time • Can also add firewalls – But we didn’t have time • We use pfSense firewall in XML cluster mode for hacker bashing • Comes with firewalls, IPS/IDS and lots of other networking goodies • Uses Azure Cloud HA for targeting • Typically we use another method (explained later) • Uses common and easy HA methods on Linux
  • 13. Our Demo Azure Public Network Asterisk Master Asterisk Slave Asterisk HA Asterisk Configurator DB Azure Cloud HA Telco A Telco B
  • 14. Alternative Design Azure Asterisk HA Public Network pfSense 1 Proxy Kamailio Proxy Kamailio Asterisk Master Asterisk Slave DB Slave Azure Cloud HA Telco A Telco B DB Master pfSense 1 Virtual DMZ
  • 15. Our Demo Azure Asterisk HA Logical Illustration SIP USER PUBLIC LAYER AZURE CLOUD LAYER TCP PROBE WHICH ACTIVE SERVER RUNNING TCP 5060 WHICH ACTIVE SERVER RUNNING TCP 5060 ACTIIVE SERVER CONNECTS TO CONFIG DB
  • 16. Components in Demo Azure Asterisk • Asterisk 1.8 or higher • FreePBX 2.11 or higher • MySQL 5 • PHP • Heartbeat • DRBD • Tiny script to monitor safe_asterisk • Azure depends on port TCP5060 • Asterisk opens port TCP5060 • So, its really good to monitor Asterisk
  • 18. Steps to build Asterisk HA on Azure Checklist • Setup 3 Virtual Machines (VM) in Azure. • Assigning the VMs with the same cloud service. • Creating the necessary End points. • Attaching an Empty Disk on each VM. • Installation of Astiostech’s Asterisk Business Telephony • Installation of Astiostech’s High Availability Package.
  • 19. Steps to build Asterisk HA on Azure • Setup 3 Azure Ubuntu VM
  • 20. Steps to build Asterisk HA on Azure • Use the same Cloud Service on the Second and third VM
  • 21. Steps to build Asterisk HA on Azure • Create end points and check “CREATE A LOAD-BALANCED SET” to failover the necessary ports else leave it to run normally.
  • 22. 10 Steps to build Asterisk HA on Azure • Create an empty disk on two of the Asterisk VMs and attach it once done.
  • 23. Steps to build Asterisk HA on Azure • Installation of Astiostech’s Asterisk Business Telephony package. • MySQL database will be installed into the dedicated MySQL database server. ASTIOSTECH BTEL PBX FOP2 FreePBX MonAST APACHE * ASTERISK MYSQL LINUX OS
  • 24. Steps to build Asterisk HA on Azure
  • 25. Steps to build Asterisk HA on Azure
  • 26. Steps to build Asterisk HA on Azure There are 2 major components in our HA package 1. Heartbeat • Heartbeat is a daemon that provides cluster infrastructure (communication and membership) services to its clients. 2. DRBD
  • 27. Steps to build Asterisk HA on Azure DRBD refers to block devices designed as a building block to form high availability (HA) clusters. This is done by mirroring a whole block device via an assigned network. DRBD can be understood as network based raid-1.
  • 28. Demo Overview SLAVE heartbeat Replication TM MASTER (ACTIVE) astiosmaster.cloudapp.net Ext: 1000 Ext: 1001 Anthony s Cell Phone
  • 29. Demo calling from Master server • Ext.1000 Calling Ext.1001 • Outbound Calls – Ext.1000 calling an external number. • Inbound Calls - An external caller calling in to the Extension 1001. SLAVE heartbeat Replication TM MASTER (ACTIVE) astiosmaster.cloudapp.net Ext: 1000 Ext: 1001 Anthony s Cell Phone
  • 31. Demo calling from Slave server • Asterisk PBX Fails over to the SLAVE server. • PBX Phone function will just work like normal. SLAVE (ACTIVE) heartbeat Replication TM MASTER astiosmaster.cloudapp.net Ext: 1000 Ext: 1001 Anthony s Cell Phone
  • 34. Field tips and tricks • Enable Asterisk’s TCP 5060 Ports for Azure Cloud monitoring. • Since Azure monitors HTTP or TCP ports only • Enable a daemon service [demo] to monitor Asterisk • In case Asterisk goes down, initiate failover/failback • All other ports should then be “instructed” by the TCP 5060 via Azure, • You might want to enable individual ports for SSH • But you cannot use the same public facing port twice
  • 35. Q&A & Thank You Copyright 2014 © Astiostech Sdn Bhd. For informational purposes only. No warranties of any kind are made and you have to verify all information before relying on it. You can re-use this presentation as long as you read, agree, and follow the guidelines described in the “Comments” field in File/Properties. Openness is the future of computing..