Coder Social home page Coder Social logo

docker-freeswitch's Introduction

docker-freeswitch

Run FreeSWITCH in a Docker container

Usage

Build

$ docker build -t freeswitch .

Run

Foreground:

$ docker run -it --net=host -e DEFAULT_PASSWORD=s3cure --name freeswitch freeswitch

Detached:

$ docker run -itd --net=host -e DEFAULT_PASSWORD=s3cure --name freeswitch freeswitch

Runtime Environment Variables

There should be a reasonable amount of flexibility using the available variables. If not please raise an issue so your use case can be covered!

  • CONFIG_PREWIPE - wipe /etc/freeswitch before reconfiguring in entrypoint - true or false, default is false
  • CONFIG_OVERLAY_GIT_URI - URI for git clone of a custom configuration repo to overlay on top of the default configuration
  • CONFIG_OVERLAY_GIT_PRIVATE_KEY - SSH private key for the git repo (if required, private is recommended)
  • DEFAULT_PASSWORD - The default password, this should always be set to override the default of 1234
  • EC2 - Configure for EC2/VPC usage - true or false, default is false
  • SOFTTIMER_TIMERFD - Whether to enable or disable timerfd - true or false, default is true

Runtime Management

Bring up the FreeSWITCH console:

$ docker exec -it freeswitch fs_cli

Check the status of the server:

freeswitch@internal> sofia status profile internal

Exit the console using the /exit command.

Updating and Reloading with the Overlay Repository
$ docker exec -it freeswitch /opt/local/bin/reload.sh

Files and Directories

Directories Overview
  • /etc/freeswitch - home of all configuration files
  • /var/log/freeswitch - log files
Configuration Files
  • /etc/freeswitch/vars.xml
  • /etc/freeswitch/sip_profiles/internal.xml
  • /etc/freeswitch/sip_profiles/external.xml
  • /etc/freeswitch/autoload_configs/switch.conf.xml
  • /etc/freeswitch/dialplan/default.xml - default dialplan

Testing the Server

FreeSWITCH comes out of the box with a default password for registrations to users 1000-1019 as '1234'. The default password should be changed by setting DEFAULT_PASSWORD with the container run.

Connect your SIP (e.g. a soft phone) with username 1000 and the value of DEFAULT_PASSWORD.

Once your container is running and a SIP client connected, test some extensions:

  • 5000 - Default IVR
  • 9195 - five second delay echo test
  • 9196 - standard echo test
  • 9197 - milliwatt extension
  • 9198 - Tetris music
  • 9664 - music on hold

Conference rooms:

  • 9888 - 8k codec
  • 91616 - 16k codec; disabled
  • 93232 - 32k codec; disabled

More information: https://wiki.freeswitch.org/wiki/Getting_Started_Guide

Firewall Configuration

If you run a firewall on the host:

Tag and Push

$ docker tag freeswitch flaccid/freeswitch
$ docker push flaccid/freeswitch

Useful Resources

See https://wiki.freeswitch.org/wiki/Freeswitch_Gui for frontends.

License and Authors

Copyright 2016, Chris Fordham

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

docker-freeswitch's People

Contributors

chris-scentregroup avatar flaccid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

docker-freeswitch's Issues

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.