Giter Site home page Giter Site logo

seunmul / asterisk-k8s-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cycoresystems/asterisk-k8s-demo

0.0 0.0 0.0 16.27 MB

Demo of scalable Asterisk on Kubernetes from https://github.com/CyCoreSystems/asterisk-k8s-demo/

License: Apache License 2.0

Shell 6.34% Go 81.43% Dockerfile 12.22%
asterisk docker kamailio kubernetes

asterisk-k8s-demo's Introduction

  • 생성일자 : 2022.12.27
  • 최종수정 : 2022.12.27

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.

asterisk-k8s-demo's People

Contributors

ulexus avatar seunmul avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.