Kamailio 5.x custom for Kazoo
50K+
Joe Black | [email protected] | github
Minimal kamailio image with enhancements including running the database in ram. This image uses a custom, minimal version of Debian Linux.
The build environment has been split off from this repo and now lives @ https://github.com/telephoneorg/kamailio-builder. See the README.md file there for more details on the build environment.
The installation environment is used for configuring which modules are installed from our custom packages.
KAMAILIO_INSTALL_MODSThe following variables are standard in most of our dockerfiles to reduce duplication and make scripts reusable among different projects:
APP: kamailioUSER: kamailioHOME /opt/kamailioRun environment variables are used in the entrypoint script to render configuration templates, perform flow control, etc. These values can be overridden when inheriting from the base dockerfile, specified during docker run, or in kubernetes manifests in the env array.
PUBLIC_IPV4PUBLIC_FQDNDOMAIN_NAMEKAMAILIO_LOG_LEVELKAMAILIO_LOG_COLORKAMAILIO_MY_HOSTNAMEKAMAILIO_MY_IP_ADDRESSKAMAILIO_MY_WEBSOCKET_DOMAINKAMAILIO_AMQP_HOSTSRABBITMQ_USERRABBITMQ_PASSKAMAILIO_SHM_MEMORYKAMAILIO_PKG_MEMORYKAMAILIO_CHILD_PROCKAMAILIO_MTUKAMAILIO_ENABLE_ROLESSYNC_FREESWITCH_SOURCESYNC_FREESWITCH_ARGS[todo] Finish describing these.
All of our docker-* repos in github have CI pipelines that push to docker cloud/hub.
This image is available at:
docker pull telephoneorg/kamailioTo run:
docker run -d \
--name kamailio \
-h kamailio.example.local \
-p "5060-5061:5060-5061" \
-p "5060:5060/udp" \
-p "5064-5065:5064-5065" \
-p "5064-5065:5064-5065/udp" \
-p "7000-7001:7000-7001" \
-p "7000:7000/udp" \
-e "KAMAILIO_LOG_LEVEL=info" \
-e "KAMAILIO_ENABLE_ROLES=websockets,message,presence_query,presence_sync,presence_notify_sync,registrar_sync" \
-e "RABBITMQ_HOSTS=rabbitmq.local" \
--cap-add IPC_LOCK \
--cap-add SYS_NICE \
--cap-add SYS_RESOURCE \
--cap-add NET_RAW \
telephoneorg/kamailio
NOTE: Please reference the Run Environment section for the list of available environment variables.
NOTE: In production, you may want to run this container in the host's networking stack. In that case remove the port mappings above and insert --net=host. Under Kubernetes, if you are using our manifests, this is already taken care of.
Pull the images
docker-compose pull
Start application and dependencies
# start in foreground
docker-compose up --abort-on-container-exit
# start in background
docker-compose up -d
Edit the manifests under kubernetes/<environment> to reflect your specific environment and configuration.
Create a secret for the erlang cookie:
kubectl create secret generic erlang --from-literal=erlang.cookie=$(LC_ALL=C tr -cd '[:alnum:]' < /dev/urandom | head -c 64)
Create a secret for the kamailio credentials:
kubectl create secret generic kamailio --from-literal=kamailio.user=$(sed $(perl -e "print int rand(99999)")"q;d" /usr/share/dict/words) --from-literal=kamailio.pass=$(LC_ALL=C tr -cd '[:alnum:]' < /dev/urandom | head -c 32)
Deploy kamailio:
kubectl create -f kubernetes
Content type
Image
Digest
Size
63.8 MB
Last updated
almost 9 years ago
docker pull telephoneorg/kamailio