{"id":13400451,"url":"https://github.com/CyCoreSystems/asterisk-k8s-demo","last_synced_at":"2025-03-14T06:31:42.973Z","repository":{"id":45905425,"uuid":"69302600","full_name":"CyCoreSystems/asterisk-k8s-demo","owner":"CyCoreSystems","description":"Demo of scalable Asterisk on Kubernetes","archived":false,"fork":false,"pushed_at":"2023-07-29T15:17:34.000Z","size":16675,"stargazers_count":157,"open_issues_count":13,"forks_count":72,"subscribers_count":21,"default_branch":"master","last_synced_at":"2024-07-31T19:24:50.877Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CyCoreSystems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-09-26T23:55:58.000Z","updated_at":"2024-06-14T01:52:05.000Z","dependencies_parsed_at":"2024-01-16T10:09:45.354Z","dependency_job_id":null,"html_url":"https://github.com/CyCoreSystems/asterisk-k8s-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyCoreSystems%2Fasterisk-k8s-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyCoreSystems%2Fasterisk-k8s-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyCoreSystems%2Fasterisk-k8s-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyCoreSystems%2Fasterisk-k8s-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CyCoreSystems","download_url":"https://codeload.github.com/CyCoreSystems/asterisk-k8s-demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221440185,"owners_count":16821599,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T19:00:52.175Z","updated_at":"2025-03-14T06:31:42.965Z","avatar_url":"https://github.com/CyCoreSystems.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Asterisk on Kubernetes Demo\n\nThis repository contains code and markup for the deployment of a highly scalable\nvoice application on Kubernetes using Kamailio, Asterisk, and NATS.\n\nSupporting tools:\n\n  - ARI core Go library [github.com/CyCoreSystems/ari](https://github.com/CyCoreSystems/ari)\n  - ARI NATS proxy [github.com/CyCoreSystems/ari-proxy](https://github.com/CyCoreSystems/ari-proxy)\n  - Netdiscover cloud networking discovery tool [github.com/CyCoreSystems/netdiscover](https://github.com/CyCoreSystems/netdiscover)\n  - Asterisk Config kubernetes-based Asterisk templating and update engine [github.com/CyCoreSystems/asterisk-config](https://github.com/CyCoreSystems/asterisk-config)\n  - Kamailio Dispatchers kubernetes-based update tool [github.com/CyCoreSystems/dispatchers](https://github.com/CyCoreSystems/dispatchers)\n  - AudioSocket [github.com/CyCoreSystems/audiosocket](https://github.com/CyCoreSystems/audiosocket)\n\n## Getting started\n\nThere are a number of kubernetes YAML files in the [k8s](live-demo/k8s/)\ndirectory.  Some have numerical prefixes indicating that they should be deployed\nin a particular order.  For the most part, getting the demo off the ground is as\neasy as installing these YAML files using the usual `kubectl apply -f\n\u003cfilename.yaml\u003e` method.  However, there are a few things which must still be\ndone by hand.\n\n### Asterisk config\n\nThe required configuration for Asterisk has been stripped down a lot, but there\nare still a few things which need to be set up:  ARI, dialplan, and PJSIP.\nExamples are included in the [asteriskconfig](live-demo/asteriskconfig)\ndirectory.  However, you will need to update the\n[inbound.conf.tmpl](live-demo/asteriskconfig/extensions.d/inbound.conf.tmpl)\nfile with your own DIDs (telephone numbers).\n\nOnce configured, you will need to load this configuration in to kubernetes.\n\n  1. create a .zip file of the contents of the `asteriskconfig` directory:\n    - `cd asteriskconfig`\n    - `zip -r ../asterisk-config.zip *`\n  2. load that .zip file in as a Secret\n    - `kubectl -n voip create secret generic asterisk-config --from-file=asterisk-config.zip`\n\n### Kamailio nodeSelector\n\nThe default kamailio DaemonSet looks for a GKE nodepool named `kamailio`.  If\nthis nodepool does not exist, kamailio will not be scheduled to run anywhere.\nTherefore, you should either create the nodepool or modify the kamailio\nDaemonSet to look for a different `nodeSelector`.\n\n### Google Voice API key\n\nIf you intend to use the Google Speech APIs demo, you will need your own API key\nloaded.  When you create an API key on Google, you are given the option to\ndownload it as a `.JSON` file.  Do so, then load that file in as `key.json` in a\nSecret named `speech-key`.\n\n  - `kubectl -n voip create secret generic speech-key --from-file=key.json`\n\n### Firewall rules\n\nDepending on the environment your kubernetes is deployed to, there are any\nnumber of ways to configure the firewall.  Fundamentally, though, UDP ports 5060\nand 10000-30000 need to flow into the nodes on which the kamailio (and rtpproxy)\nPods are running.\n\nOn GCP, this is fairly easy.  You can create a special Node Pool on which the kamailio\nPods will be scheduled which have special instance tags applied.  Then, you can\ntell the GCP firewall to allow the UDP ports 5060,10000-30000 into instances\nwith those special tags.\n\nThe kamailio deployment currently expects a nodepool to be available and named\n`kamailio` in order to schedule kamailio Pods.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCyCoreSystems%2Fasterisk-k8s-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCyCoreSystems%2Fasterisk-k8s-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCyCoreSystems%2Fasterisk-k8s-demo/lists"}