• Stars
    star
    164
  • Rank 230,032 (Top 5 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created about 8 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Demo of scalable Asterisk on Kubernetes

Asterisk on Kubernetes Demo

This repository contains code and markup for the deployment of a highly scalable voice application on Kubernetes using Kamailio, Asterisk, and NATS.

Supporting tools:

Getting started

There are a number of kubernetes YAML files in the k8s directory. Some have numerical prefixes indicating that they should be deployed in a particular order. For the most part, getting the demo off the ground is as easy as installing these YAML files using the usual kubectl apply -f <filename.yaml> method. However, there are a few things which must still be done by hand.

Asterisk config

The required configuration for Asterisk has been stripped down a lot, but there are still a few things which need to be set up: ARI, dialplan, and PJSIP. Examples are included in the asteriskconfig directory. However, you will need to update the inbound.conf.tmpl file with your own DIDs (telephone numbers).

Once configured, you will need to load this configuration in to kubernetes.

  1. create a .zip file of the contents of the asteriskconfig directory: - cd asteriskconfig - zip -r ../asterisk-config.zip *
  2. load that .zip file in as a Secret - kubectl -n voip create secret generic asterisk-config --from-file=asterisk-config.zip

Kamailio nodeSelector

The default kamailio DaemonSet looks for a GKE nodepool named kamailio. If this nodepool does not exist, kamailio will not be scheduled to run anywhere. Therefore, you should either create the nodepool or modify the kamailio DaemonSet to look for a different nodeSelector.

Google Voice API key

If you intend to use the Google Speech APIs demo, you will need your own API key loaded. When you create an API key on Google, you are given the option to download it as a .JSON file. Do so, then load that file in as key.json in a Secret named speech-key.

  • kubectl -n voip create secret generic speech-key --from-file=key.json

Firewall rules

Depending on the environment your kubernetes is deployed to, there are any number of ways to configure the firewall. Fundamentally, though, UDP ports 5060 and 10000-30000 need to flow into the nodes on which the kamailio (and rtpproxy) Pods are running.

On GCP, this is fairly easy. You can create a special Node Pool on which the kamailio Pods will be scheduled which have special instance tags applied. Then, you can tell the GCP firewall to allow the UDP ports 5060,10000-30000 into instances with those special tags.

The kamailio deployment currently expects a nodepool to be available and named kamailio in order to schedule kamailio Pods.

More Repositories

1

ari

Golang Asterisk REST Interface (ARI) library
Go
190
star
2

docker-meteor

Dockerfile and script for running Meteor on Docker
Shell
120
star
3

ari-proxy

NATS or RabbitMQ message bus Asterisk REST Interface proxy system implemented in Go
Go
79
star
4

audiosocket

Simple bidirectional audio protocol
C
77
star
5

asterisk-config

Kubernetes dynamic configuration engine for Asterisk
Go
63
star
6

agi

Asterisk AGI library for Go (golang)
Go
47
star
7

netdiscover

Network discovery tool for cloud environments
Go
23
star
8

dispatchers

dispatcher management for kamailio and kubernetes; related tools
Go
20
star
9

kamconfig

Kamailio in Kubernetes configuration manager
Go
12
star
10

goertzel

Tone detection and goertzel library for Go
Go
10
star
11

vim-cisco-ios

Pathogen-style plugin for cisco IOS for Vim
Vim Script
8
star
12

audimance

Audimance provides an audio experience engine for live performances
Go
8
star
13

go-kamailio

Golang kamailio utilities
Go
7
star
14

go-meteor

Utilities for Meteor in Go
Go
7
star
15

ipassign

Cloud IP address assigner for kubernetes
Go
5
star
16

radius

Go RADIUS client library
Go
5
star
17

asterisk

Asterisk container tools
Shell
4
star
18

go-minimal

Minimal Docker image for executing dynamic Go binaries
Shell
4
star
19

node-asterisk-ami

Asterisk AMI library for NodeJS
CoffeeScript
4
star
20

coreos-fest-2017

Supporting files for Booting your Baremetals, CoreOS Fest, 2017
HCL
4
star
21

jsonip.io

jsonip.io server
Go
3
star
22

ccproxy

HAProxy for use in the CyCore hosting network
Go
3
star
23

rtpengine-manager

WIP
Go
3
star
24

sendinblue

SendInBlue API v3 golang client
Go
2
star
25

nanpa

Go library for NANPA number manipulations
Go
2
star
26

kubetemplate

Kubernetes application configuration templating engine
Go
2
star
27

ari-rid

Resource ID generator for ARI
Go
2
star
28

vad

Voice Acitity Detector
Python
2
star
29

gami-asterisk16

Fork of the golang AMI interface to work with asterisk 1.6
Go
2
star
30

rtpengine

Docker build for sipwise rtpengine
Dockerfile
1
star
31

meteor-scrollposition

Meteor package to obtain page offset / scroll position in a cross-browser manner
JavaScript
1
star
32

udptest

UDP echo server and tester
Go
1
star
33

meteor-braintree

Braintree package for Meteor <deprecated>
JavaScript
1
star
34

ariprotobuf

ARI protobuf definitions
1
star
35

talosmon

Talos monitoring console
Go
1
star
36

cycore-web

CyCore Systems website
Go
1
star
37

rsban

fail2ban like adapter for ancient rackspace box
Go
1
star
38

asterisk-php-libs

PHP Classes for Asterisk AMI and AGI interfacing
PHP
1
star
39

networkreporter

Network details reporter
Go
1
star
40

restclient

restClient: a flexible JSON-REST client library
Go
1
star
41

meteor-check-patterns

Check patterns for use with Meteor's 'check' package
JavaScript
1
star
42

osc-repeater

A multipoint repeater for OSC messages
Go
1
star
43

cue-repeater

QLab cue repeater (general UDP repeater)
Go
1
star
44

snomcfg

Snom configuration web server
Go
1
star