Installing the Wazo Class 4 engine with Ansible

18 February 2020

Installing the Wazo Class 4 engine with Ansible


In our pursuit of enabling companies to build their IP communication infrastructure and deliver innovative communication services with our open-source, API-centric solutions, Wazo's Class 4 engine can be easily deployed with different methods:

  • Docker compose: run the platform on a single machine using the Docker images together with docker-compose.
  • Kubernetes: install the platform using our Helm chart and run the platform on your Kubernetes cluster.
  • Ansible-based deployment: install the platform on a set of Debian Buster machines, either bare-metal or virtual machines, using our Ansible recipes.

So, beside the fast containerized way with docker-compose or helm chart for Kubernetes, Wazo's C4 can be deployed with Ansible on virtual machines or bare-metal.

Wazo Platform C4 solution

We've already introduced our C4 platform in a previous blog post. Our SBC and Routing solution has in the last month grown and matured with the introduction of RTP Engine, Consul and the automatic configuration of Kamailio nodes as the architecture scales.

The Class 4 engine is made of several components:

  1. SBC (Kamailio)
  2. Router (Kamailio)
  3. Media Proxy (RTPengine)
  4. Router API (wazo-router-confd)
  5. PostgreSQL
  6. Redis

If you use the Ansible recipes you need at least two hosts as you cannot run the SBC and the Router on the same machine.

What is Ansible?

Ansible is an open-source software provisioning, configuration management, and application-deployment tool similar to Chef, Puppet or Salt.

It is for sure the simplest and the easiest to get started with because it's "just SSH". It uses SSH to connect to servers and run the configured Tasks.

If you're new to Ansible, the best way to get started is reading the documentation from the official website:


To install the Class 4 engine in an all-in-one setup, do the following steps:

  1. Install a Debian 10 Buster system with a default locale with an UTF-8 charset on each host you want to use, either bare metal or virtual machine.

  2. Run the following commands as root on the Debian systems to provision sudo, git and Ansible:

# apt-get install -yq sudo git ansible
  1. Get the Wazo Platform installer and its dependencies:
# git clone
# cd wazo-c4-ansible
# ansible-galaxy install -r requirements-postgresql.yml
  1. Create the Ansible inventory in inventories/c4 to specify your hosts and your preferences, as follows:

Define one or more SBCs:

sbc_1 ansible_ssh_host= ansible_ssh_port=22
sbc_2 ansible_ssh_host= ansible_ssh_port=22

Define one or more routers:

router_1 ansible_ssh_host= ansible_ssh_port=22
router_2 ansible_ssh_host= ansible_ssh_port=22

Define one or more Media Proxies:

rtpengine_1 ansible_ssh_host= ansible_ssh_port=22
rtpengine_2 ansible_ssh_host= ansible_ssh_port=22

Define, optionally, additional hosts for the database services:

database_1 ansible_ssh_host= ansible_ssh_port=22

redis_1 ansible_ssh_host= ansible_ssh_port=22

Assign the roles to the aforementioned hosts assigning them to the following groups:









Configure your Class 4 engine with your deployment-specific settings, as follows:

postgresql_listen_addresses = *

router_api_db_host =
router_api_redis_host =
router_dburl_dialog = redis://

sbc_advertise_address =
sbc_dispatcher_list = "1 sip: 16 10\n1 sip: 16 10"
sbc_dburl_dialog = redis://

sbc_advertise_address = <PUBLIC IP ADDRESS OF THE SBC> # example:
sbc_advertise_port = 5060
rtpengine_public_address =

sbc_advertise_address = <PUBLIC IP ADDRESS OF THE SBC> # example:
sbc_advertise_port = 5060

rtpengine_public_address = <PUBLIC IP ADDRESS OF THE MEDIA PROXY> # example:

rtpengine_public_address = <PUBLIC IP ADDRESS OF THE MEDIA PROXY> # example:

The various variables that can be customized are described at

By default, Wazo Platform will install the development version. To install the latest stable version, activate the following settings in your inventory:

wazo_distribution = pelican-buster
wazo_distribution_upgrade = pelican-buster


Launch the installation by running the following command:

# ansible-playbook -i inventories/c4 c4.yml

If you want to test the Class 4 engine on a single host, you can use Vagrant to provision two virtual machines using the provided Vagrantfile:

# -*- mode: ruby -*-
# vi: set ft=ruby :

# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config| = "debian/buster64"
  config.vm.define :router do |t|
  config.vm.define :sbc do |t|

You can now run:

$ vargrant up

You can install the SBC and the Router, together with their dependencies, on the two virtual machines running:

$ ansible-playbook -i inventories/c4-sbc-vagrant c4-sbc.yaml
$ ansible-playbook -i inventories/c4-router-vagrant c4-router.yaml


Wazo Platform C4 is easily deployable with our Ansible recipes on bare-metal or virtual machines as you can see, just by following a few simple steps. For more detailed information and other installation methods please refer to the official Wazo C4 Install guide.

Community Supported

Wazo Platform is supported by its community. Use our various channels to reach out.


Video @ Kamailio World: Dangerous Demos

Video @ the Telecom Application Development Summit: What can you do with Wazo?

Video @ the Telecom Application Development Summit: WAZO Keynote: xCPaaS

Get Connected, Contribute & Build value!

Designed with by Xiaoying Riley for developersCopyright 2016-2023 The Wazo Authors (see the AUTHORS file)