FreeSWITCH (FusionPBX) + Docker

FreeSWITCHインストール(Debian)

Debian | FreeSWITCH Documentation

System Information

Database Information

  • Name PostgreSQL
  • Version 17.6

FreeSWITCH Dockerfile

トークン取得

上記Dockerfileに下記のスクリプトを適用してDockerイメージを作成

作成したDockerfileは以降の記事参照のこと。


FusionPBX

FusionPBXインストールスクリプト

Dockerコンテナで運用するために編集が必要なファイル

fusionpbx-install.sh

fusionpbx-install.sh/debian/resources/config.sh
fusionpbx-install.sh/debian/resources/finish.sh
fusionpbx-install.sh/debian/resources/fusionpbx/config.conf
fusionpbx-install.sh/debian/resources/nginx/fusionpbx.conf

インストールスクリプトについて

Dockerコンテナで運用するため、下記スクリプトでインストールされる機能拡張などの必要なパッケージ・ファイルは、Dockerファイル、Docker-Composeファイルで指定しているため実行不要。実行必要なスクリプトは finish.sh のみです。

  • applications.sh:Docker-Commposeファイルで指定
  • ioncube.sh:php-fpmのDockerファイルで指定
  • monit.sh:Dockerで各コンテナを管理するため不要
  • php.sh:Dockerファイル、Docker-Composeファイルで指定
  • postgresql.sh:Docker-Composeファイルで指定
  • sngrep.sh:ホストに別途インストール、またはfreeswitchコンテナのDockerfileでインストール
  • switch.sh:Dockerファイル、Dcoker-Composeファイルで指定
  • arguments.sh:不要
  • environment.sh:不要
  • fail2ban.sh:ホストに別途インストール
  • finish.sh:コンテナ起動後にphp-fpmコンテナ内で実行(編集必要)
  • fusionpbx.sh:php-fpmコンテナとしてDocker-Composeファイルで指定
  • iptables.sh:ホストに別途インストール
  • letsencrypt.sh:certbotコンテナを使用してDNSチャレンジで事前取得
  • nftables.sh:ホストに別途インストール
  • nginx.sh:Docker-Composeファイルで指定

fusionpbx

fusionpbx/app/switch/resources/conf/vars.xml
fusionpbx/app/switch/resources/conf/autoload_configs/modules.conf.xml

docker-compose.yaml

services:
##### Memcached
  memcached:
    container_name: memcached
    image: memcached:alpine
    ports:
      - 127.0.0.1:11211:11211
    command:
      - --conn-limit=1024
      - --memory-limit=64
      - --threads=4
    restart: unless-stopped
    networks:
      fusionpbx-net:
        ipv4_address: 10.xx.xx.2
        ipv6_address: fdxx:xxxx:xxxx:xxxx::2

##### nginx
  nginx:
    container_name: nginx
    image: nginx:alpine
    tty: true
    volumes:
      # nginx config
      - ./resources/nginx:/etc/nginx/conf.d
      - ./letsencrypt:/etc/letsencrypt:ro
      # download fusionpbx : $ git clone $branch https://github.com/fusionpbx/fusionpbx.git
      - ./fusionpbx:/var/www/fusionpbx
      - ./nginx_log:/var/log/nginx
    restart: unless-stopped
    network_mode: "host"

##### postgresql https://hub.docker.com/_/postgres
  postgresql:
    container_name: postgresql
    image: postgres:17-alpine
    ports:
        - 127.0.0.1:5432:5432
    restart: unless-stopped
    # set shared memory limit when using docker compose
    shm_size: 128mb
    volumes:
      - ./db:/var/lib/postgresql
    environment:
      - POSTGRES_PASSWORD=${DATABASE_PASSWORD}
      - POSTGRES_USER=${DATABASE_USERNAME}
      - POSTGRES_DB=${DATABASE_NAME}
      - PGDATA=/var/lib/postgresql/17/docker
    networks:
      fusionpbx-net:
        ipv4_address: 10.xx.xx.4
        ipv6_address: fdxx:xxxx:xxxx:xxxx::4

### PHP-FPM(FusionPBX)
  php-fpm:
    container_name: php-fpm
    build:
      context: ./docker_files
      dockerfile: php-fpm-fusionpbx
    ### $ docker build -f $(pwd)/docker_files/php-fpm-fusionpbx -t php-8.2-fpm:20250817 $(pwd)/docker_files
    image: php-8.2-fpm:20250817
    volumes:
      #  Configuration File (php.ini) Path : /usr/local/etc/php
      - ./php-fpm_conf/php.ini:/usr/local/etc/php/php.ini
      - ./php-fpm_conf/supevisor.conf:/etc/supervisor/conf.d/supevisor.conf:ro
      - ./logs:/var/log/supervisor
      ### download fusionpbx : $ git clone $branch https://github.com/fusionpbx/fusionpbx.git
      ### optional 
      ### $ git clone https://github.com/fusionpbx/fusionpbx-app-transcribe.git ./fusionpbx/app/transcribe
      ### $ git clone https://github.com/fusionpbx/fusionpbx-app-speech.git ./fusionpbx/app/speech
      ### $ git clone https://github.com/fusionpbx/fusionpbx-app-device_logs.git ./fusionpbx/app/device_logs
      ### $ git clone https://github.com/fusionpbx/fusionpbx-app-dialplan_tools.git ./fusionpbx/app/dialplan_tools
      ### $ git clone https://github.com/fusionpbx/fusionpbx-app-edit.git ./fusionpbx/app/edit
      ### $ git clone https://github.com/fusionpbx/fusionpbx-app-sip_trunks.git ./fusionpbx/app/sip_trunks
      ### chown -R www-data:www-data /var/www/fusionpbx /var/cache/fusionpbx /etc/freeswitch
      - ./fusionpbx:/var/www/fusionpbx
      - ./resources/fusionpbx/config.conf:/etc/fusionpbx/config.conf
      - ./fusionpbx/app/switch/resources/conf:/etc/freeswitch
      - ./fusionpbx/app/switch/resources/scripts:/usr/share/freeswitch/scripts
      - freeswitch_lib:/var/lib/freeswitch
      - freeswitch_usr_lib:/usr/lib/freeswitch
      - freeswitch_share:/usr/share/freeswitch
      - freeswitch_log:/var/log/freeswitch
      - freeswitch_run:/var/run/freeswitch
      - ./cache:/var/cache/fusionpbx
      ### https://github.com/fusionpbx/fusionpbx-install.sh/tree/master/debian/resources
      - ./resources:/opt/fusionpbx-installer-sh
    depends_on:
      - freeswitch
    restart: unless-stopped
    network_mode: "host"

### FreeSwitch
  freeswitch:
    container_name: freeswitch
    #### $ docker build -f $(pwd)/docker_files/freeswitch_master/Dockerfile -t freeswitch:20250817 $(pwd)/docker_files/freeswitch_master
    build:
      context: ./docker_files/freeswitch_master
      dockerfile: Dockerfile
    image: freeswitch:20250817
    volumes:
      - ./letsencrypt:/etc/freeswitch/tls
      - ./resources/fusionpbx/config.conf:/etc/fusionpbx/config.conf
      - ./fusionpbx/app/switch/resources/conf:/etc/freeswitch
      - ./fusionpbx/app/switch/resources/scripts:/usr/share/freeswitch/scripts
      - ./tmp:/tmp
      - freeswitch_lib:/var/lib/freeswitch
      - freeswitch_usr_lib:/usr/lib/freeswitch
      - freeswitch_share:/usr/share/freeswitch
      - freeswitch_log:/var/log/freeswitch
      - freeswitch_run:/var/run/freeswitch
      - ./cache:/var/cache/fusionpbx
    depends_on:
      - nginx
      - postgresql
    restart: unless-stopped
    cap_add:
      - NET_ADMIN
      - SYS_RESOURCE
      - SYS_NICE
      - IPC_LOCK
    privileged: true
    network_mode: "host"

networks:
  fusionpbx-net:
    enable_ipv6: true
    ipam:
      driver: default
      config:
        - subnet: "10.xx.xx.0/24"
        - subnet: "fdxx:xxxx:xxxx:xxxx::/64"
volumes:
  freeswitch_lib:
  freeswitch_usr_lib:
  freeswitch_share:
  freeswitch_log:
  freeswitch_run:

php-fpmコンテナ内で以下のスクリプトfinish.shを実行(一度だけ)

$ docker compose exec php-fpm bash
# cd /opt/fusionpbx-installer-sh 
# ./finish.sh

改訂:finish.sh

#!/bin/sh

#move to script directory so all relative paths work
cd "$(dirname "$0")"

#includes
. ./config.sh
. ./colors.sh

#database details
database_username=fusionpbx
if [ .$database_password = .'random' ]; then
	database_password=$(dd if=/dev/urandom bs=1 count=20 2>/dev/null | base64 | sed 's/[=\+//]//g')
fi

#allow the script to use the new password
export PGPASSWORD=$database_password

#update the database password
psql --host=$database_host --port=$database_port --username=$database_username -c "ALTER USER fusionpbx WITH PASSWORD '$database_password';"
psql --host=$database_host --port=$database_port --username=$database_username -c "ALTER USER freeswitch WITH PASSWORD '$database_password';"
#sudo -u postgres psql -c "ALTER USER fusionpbx WITH PASSWORD '$database_password';"
#sudo -u postgres psql -c "ALTER USER freeswitch WITH PASSWORD '$database_password';"

#install the database backup
# cp backup/fusionpbx-backup /etc/cron.daily
# cp backup/fusionpbx-maintenance /etc/cron.daily
# chmod 755 /etc/cron.daily/fusionpbx-backup
# chmod 755 /etc/cron.daily/fusionpbx-maintenance
# sed -i "s/zzz/$database_password/g" /etc/cron.daily/fusionpbx-backup
# sed -i "s/zzz/$database_password/g" /etc/cron.daily/fusionpbx-maintenance

#add the config.conf
# mkdir -p /etc/fusionpbx
# cp fusionpbx/config.conf /etc/fusionpbx
# sed -i /etc/fusionpbx/config.conf -e s:"{database_host}:$database_host:"
# sed -i /etc/fusionpbx/config.conf -e s:"{database_name}:$database_name:"
# sed -i /etc/fusionpbx/config.conf -e s:"{database_username}:$database_username:"
# sed -i /etc/fusionpbx/config.conf -e s:"{database_password}:$database_password:"

#add the database schema
cd /var/www/fusionpbx && /usr/local/bin/php /var/www/fusionpbx/core/upgrade/upgrade.php --schema

#get the server hostname
if [ .$domain_name = .'hostname' ]; then
	domain_name=$(hostname -f)
fi

#get the ip address
if [ .$domain_name = .'ip_address' ]; then
	domain_name=$(hostname -I | cut -d ' ' -f1)
fi

#get the domain_uuid
domain_uuid=$(/usr/local/bin/php /var/www/fusionpbx/resources/uuid.php);

#add the domain name
psql --host=$database_host --port=$database_port --username=$database_username -c "insert into v_domains (domain_uuid, domain_name, domain_enabled) values('$domain_uuid', '$domain_name', 'true');"

#run app defaults
cd /var/www/fusionpbx && /usr/local/bin/php /var/www/fusionpbx/core/upgrade/upgrade.php --defaults

#add the user
user_uuid=$(/usr/local/bin/php /var/www/fusionpbx/resources/uuid.php);
user_salt=$(/usr/local/bin/php /var/www/fusionpbx/resources/uuid.php);
user_name=$system_username
if [ .$system_password = .'random' ]; then
	user_password=$(dd if=/dev/urandom bs=1 count=20 2>/dev/null | base64 | sed 's/[=\+//]//g')
else
	user_password=$system_password
fi
password_hash=$(/usr/local/bin/php -r "echo md5('$user_salt$user_password');");
psql --host=$database_host --port=$database_port --username=$database_username -t -c "insert into v_users (user_uuid, domain_uuid, username, password, salt, user_enabled) values('$user_uuid', '$domain_uuid', '$user_name', '$password_hash', '$user_salt', 'true');"

#get the superadmin group_uuid
#echo "psql --host=$database_host --port=$database_port --username=$database_username -qtAX -c \"select group_uuid from v_groups where group_name = 'superadmin';\""
group_uuid=$(psql --host=$database_host --port=$database_port --username=$database_username -qtAX -c "select group_uuid from v_groups where group_name = 'superadmin';");

#add the user to the group
user_group_uuid=$(/usr/local/bin/php /var/www/fusionpbx/resources/uuid.php);
group_name=superadmin
#echo "insert into v_user_groups (user_group_uuid, domain_uuid, group_name, group_uuid, user_uuid) values('$user_group_uuid', '$domain_uuid', '$group_name', '$group_uuid', '$user_uuid');"
psql --host=$database_host --port=$database_port --username=$database_username -c "insert into v_user_groups (user_group_uuid, domain_uuid, group_name, group_uuid, user_uuid) values('$user_group_uuid', '$domain_uuid', '$group_name', '$group_uuid', '$user_uuid');"

#update xml_cdr url, user and password
xml_cdr_username=$(dd if=/dev/urandom bs=1 count=20 2>/dev/null | base64 | sed 's/[=\+//]//g')
xml_cdr_password=$(dd if=/dev/urandom bs=1 count=20 2>/dev/null | base64 | sed 's/[=\+//]//g')
sed -i /etc/freeswitch/autoload_configs/xml_cdr.conf.xml -e s:"{v_http_protocol}:http:"
sed -i /etc/freeswitch/autoload_configs/xml_cdr.conf.xml -e s:"{domain_name}:$database_host:"
sed -i /etc/freeswitch/autoload_configs/xml_cdr.conf.xml -e s:"{v_project_path}::"
sed -i /etc/freeswitch/autoload_configs/xml_cdr.conf.xml -e s:"{v_user}:$xml_cdr_username:"
sed -i /etc/freeswitch/autoload_configs/xml_cdr.conf.xml -e s:"{v_pass}:$xml_cdr_password:"

#update application defaults
cd /var/www/fusionpbx && /usr/local/bin/php /var/www/fusionpbx/core/upgrade/upgrade.php --defaults

#update permissions
cd /var/www/fusionpbx && /usr/local/bin/php /var/www/fusionpbx/core/upgrade/upgrade.php --permissions

#restart freeswitch
#/bin/systemctl daemon-reload
#/bin/systemctl restart freeswitch

#make the /var/run directory and set the ownership
# mkdir -p /var/run/fusionpbx
# chown -R www-data:www-data /var/run/fusionpbx

#install the services
#cd /var/www/fusionpbx && /usr/local/bin/php /var/www/fusionpbx/core/upgrade/upgrade.php --services

#install crontab
#apt install cron

#welcome message
echo ""
echo ""
verbose "Installation Notes. "
echo ""
echo "   Please save this information and reboot this system to complete the install. "
echo ""
echo "   Use a web browser to login."
echo "      domain name: https://$domain_name"
echo "      username: $user_name"
echo "      password: $user_password"
echo ""
echo "   The domain name in the browser is used by default as part of the authentication."
echo "   If you need to login to a different domain then use username@domain."
echo "      username: $user_name@$domain_name";
echo ""
echo "   Official FusionPBX Training"
echo "      Fastest way to learn FusionPBX. For more information https://www.fusionpbx.com."
echo "      Available online and in person. Includes documentation and recording."
echo ""
echo "      Location:               Online"
echo "      Admin Training:          TBA"
echo "      Advanced Training:       TBA"
echo "      Continuing Education:   https://www.fusionpbx.com/training"
echo "      Timezone:               https://www.timeanddate.com/weather/usa/idaho"
echo ""
echo "   Additional information."
echo "      https://fusionpbx.com/members.php"
echo "      https://fusionpbx.com/training.php"
echo "      https://fusionpbx.com/support.php"
echo "      https://www.fusionpbx.com"
echo "      http://docs.fusionpbx.com"
echo ""

# pgpassword security and conflict avoidance
unset PGPASSWORD

オプションアプリのインストールについて

resources/applications.sh (このスクリプトからはインストールしません)

#optional applications
cd /var/www/fusionpbx/app
if [ .$application_transcribe = .'true' ]; then
	git clone https://github.com/fusionpbx/fusionpbx-app-transcribe.git transcribe
fi
if [ .$application_speech = .'true' ]; then
	git clone https://github.com/fusionpbx/fusionpbx-app-speech.git speech
fi
if [ .$application_device_logs = .'true' ]; then
	git clone https://github.com/fusionpbx/fusionpbx-app-device_logs.git device_logs
fi
if [ .$application_dialplan_tools = .'true' ]; then
	git clone https://github.com/fusionpbx/fusionpbx-app-dialplan_tools.git dialplan_tools
fi
if [ .$application_edit = .'true' ]; then
	git clone https://github.com/fusionpbx/fusionpbx-app-edit.git edit
fi
if [ .$application_sip_trunks = .'true' ]; then
	git clone https://github.com/fusionpbx/fusionpbx-app-sip_trunks.git sip_trunks
fi
chown -R www-data:www-data /var/www/fusionpbx

docker-composeファイルでコメントした各オプションアプリについては、ダウンロード後以下の作業を行うこと。

$ docker compose exec php-fpm bash
# chown -R www-data:www-data /var/www/fusionpbx/app/****

FusionPBXの作業画面から以下の2項目をチェックして実行

Run Advanced > Upgrade > Menu Defaults

Run Advanced > Upgrade > Permission Defaults

再ログインして有効になります。

docker_files/freeswitch_master/Dockerfile

# vim:set ft=dockerfile:
ARG DEBIAN_VERSION=bookworm
FROM debian:${DEBIAN_VERSION}

# ARGs are cleared after every FROM
# see: https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact
ARG DEBIAN_VERSION
ARG TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

# By default, install the full set of FreeSWITCH packages.  Specify an alternative with:
#   --build-arg="FS_META_PACKAGE=freeswitch-meta-vanilla"
# alternatives include:
#   freeswitch-meta-bare
#   freeswitch-meta-vanilla
#   freeswitch-meta-sorbet
#   freeswitch-meta-all-dbg
ARG FS_META_PACKAGE=freeswitch-meta-bare

# explicitly set user/group IDs
ARG FREESWITCH_UID=499
ARG FREESWITCH_GID=499
RUN groupadd -r freeswitch --gid=${FREESWITCH_GID} && useradd -r -g freeswitch --uid=${FREESWITCH_UID} freeswitch

# make the "en_US.UTF-8" locale so freeswitch will be utf-8 enabled by default
RUN apt-get update -qq \
    && apt-get install -y --no-install-recommends ca-certificates gnupg gnupg2 gosu locales wget curl lsb-release ntp gdb \
    && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
ENV LANG=en_US.utf8

# https://freeswitch.org/confluence/display/FREESWITCH/Debian
# https://developer.signalwire.com/freeswitch/FreeSWITCH-Explained/Installation/Linux/Debian_67240088/

# RUN wget --no-verbose --http-user=signalwire --http-password=${TOKEN} \
#      -O /usr/share/keyrings/signalwire-freeswitch-repo.gpg \
#      https://freeswitch.signalwire.com/repo/deb/debian-release/signalwire-freeswitch-repo.gpg \
#     && echo "machine freeswitch.signalwire.com login signalwire password ${TOKEN}" > /etc/apt/auth.conf \
#     && echo "deb [signed-by=/usr/share/keyrings/signalwire-freeswitch-repo.gpg] https://freeswitch.signalwire.com/repo/deb/debian-release/ ${DEBIAN_VERSION} main" > /etc/apt/sources.list.d/freeswitch.list \
RUN curl -sSL https://freeswitch.org/fsget | bash -s ${TOKEN} release \
    && apt-get -qq update \
    && apt-get install -y ${FS_META_PACKAGE}

RUN apt-get install -y freeswitch-conf-vanilla freeswitch-mod-commands freeswitch-meta-codecs freeswitch-mod-console freeswitch-mod-logfile freeswitch-mod-distributor \
    freeswitch-lang-en freeswitch-mod-say-en freeswitch-sounds-en-us-callie \
    freeswitch-mod-enum freeswitch-mod-cdr-csv freeswitch-mod-event-socket freeswitch-mod-sofia freeswitch-mod-sofia-dbg freeswitch-mod-loopback \
    freeswitch-mod-conference freeswitch-mod-db freeswitch-mod-dptools freeswitch-mod-expr freeswitch-mod-fifo libyuv-dev freeswitch-mod-httapi \
    freeswitch-mod-hash freeswitch-mod-esl freeswitch-mod-esf freeswitch-mod-fsv freeswitch-mod-valet-parking freeswitch-mod-dialplan-xml freeswitch-dbg \
    freeswitch-mod-sndfile freeswitch-mod-native-file freeswitch-mod-local-stream freeswitch-mod-tone-stream freeswitch-mod-lua freeswitch-meta-mod-say \
    freeswitch-mod-xml-cdr freeswitch-mod-verto freeswitch-mod-callcenter freeswitch-mod-rtc freeswitch-mod-png freeswitch-mod-json-cdr freeswitch-mod-shout \
    freeswitch-mod-sms freeswitch-mod-sms-dbg freeswitch-mod-cidlookup freeswitch-mod-memcache \
    freeswitch-mod-imagick freeswitch-mod-tts-commandline freeswitch-mod-directory freeswitch-mod-flite \
    freeswitch-mod-pgsql freeswitch-mod-av \
    freeswitch-music-default

RUN apt-get purge -y --auto-remove \
    && apt-get autoremove -y \
    && apt-get clean && rm -rf /var/lib/apt/lists/*

#remove the music package to protect music on hold from package updates
RUN mkdir -p /usr/share/freeswitch/sounds/temp
RUN mv /usr/share/freeswitch/sounds/music/*000 /usr/share/freeswitch/sounds/temp
RUN apt-get remove -y freeswitch-music-default
RUN mkdir -p /usr/share/freeswitch/sounds/music/default
RUN mv /usr/share/freeswitch/sounds/temp/* /usr/share/freeswitch/sounds/music/default
RUN rm -R /usr/share/freeswitch/sounds/temp

COPY docker-entrypoint.sh /
# Add anything else here

## Ports
# Document ports used by this container
### 8021 fs_cli, 5060 5061 5080 5081 sip and sips, 5066 ws, 7443 wss, 8081 8082 verto, 16384-32768, 64535-65535 rtp
EXPOSE 8021/tcp
EXPOSE 5060/tcp 5060/udp 5080/tcp 5080/udp
EXPOSE 5061/tcp 5061/udp 5081/tcp 5081/udp
EXPOSE 5066/tcp
EXPOSE 7443/tcp
EXPOSE 8081/tcp 8082/tcp
EXPOSE 64535-65535/udp
EXPOSE 16384-32768/udp

# Volumes
## Freeswitch Configuration
#VOLUME ["/etc/freeswitch"]
## Tmp so we can get core dumps out
#VOLUME ["/tmp"]

#VOLUME ["/etc/freeswitch", "/tmp", "/var/lib/freeswitch", "/usr/share/freeswitch", "/var/log/freeswitch", "/var/run/freeswitch"]

#RUN chown -R www-data:www-data /etc/freeswitch /var/lib/freeswitch /usr/share/freeswitch /var/log/freeswitch /var/run/freeswitch

# Limits Configuration
COPY    build/freeswitch.limits.conf /etc/security/limits.d/

# Healthcheck to make sure the service is running
SHELL       ["/bin/bash", "-c"]
HEALTHCHECK --interval=15s --timeout=5s \
    CMD  fs_cli -x status | grep -q ^UP || exit 1

ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["freeswitch"]

注) ARG TOKENには、SignalWireでアカウントを作成し、そこで取得したパーソナルアクセストークンを記入すること。

docker_files/php-fpm-fusionpbx

FROM php:8.2-fpm

RUN apt-get update && apt-get install -y nano git dbus haveged ssl-cert qrencode \
    ghostscript libtiff5-dev libtiff-tools at postgresql-client procps supervisor

# Install PHP extensions
# https://github.com/mlocati/docker-php-extension-installer
# https://hub.docker.com/_/php
RUN curl -sSLf \
        -o /usr/local/bin/install-php-extensions \
        https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions && \
    chmod +x /usr/local/bin/install-php-extensions && \
    install-php-extensions pdo_pgsql pgsql pdo_sqlite odbc curl imap xml mbstring ldap inotify ioncube_loader pcntl && \
    IPE_GD_WITHOUTAVIF=1 install-php-extensions gd
# Change UserID www-data from 33 to 499 to match FreeSWITCH's default user
RUN usermod -u 499 www-data
RUN groupmod -g 499 www-data

RUN mkdir -p /var/run/fusionpbx
RUN chown -R www-data:www-data /var/run/fusionpbx

RUN mkdir -p /var/log/supervisor

WORKDIR /var/www/fusionpbx

COPY entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

注)修正箇所の履歴は、右上のペンシルマークをクリックして確認のこと。

docker_files/entrypoint.sh

#!/bin/bash
# run supervisord on background
supervisord -c /etc/supervisor/supervisord.conf &
# run php-fpm on foreground (PID1)
exec php-fpm

php-fpmコンテナ用supervisor設定ファイル

Supervisorを利用してPHPのマルチコマンドを実行

php-fpm_conf/supevisor.conf

; ==============================
; FusionPBX Background Services
; ==============================

[program:active_calls]
command=/usr/local/bin/php /var/www/fusionpbx/app/active_calls/resources/service/active_calls.php
directory=/var/www/fusionpbx
user=www-data
autostart=true
autorestart=true
stdout_logfile=/var/log/supervisor/active_calls.log
stderr_logfile=/var/log/supervisor/active_calls.err

[program:email_queue]
command=/usr/local/bin/php /var/www/fusionpbx/app/email_queue/resources/service/email_queue.php
directory=/var/www/fusionpbx
user=www-data
autostart=true
autorestart=true
stdout_logfile=/var/log/supervisor/email_queue.log
stderr_logfile=/var/log/supervisor/email_queue.err

# [program:event_guard]
# command=/usr/local/bin/php /var/www/fusionpbx/app/event_guard/resources/service/event_guard.php
# directory=/var/www/fusionpbx
# user=www-data
# autostart=true
# autorestart=true
# stdout_logfile=/var/log/supervisor/event_guard.log
# stderr_logfile=/var/log/supervisor/event_guard.err

[program:fax_queue]
command=/usr/local/bin/php /var/www/fusionpbx/app/fax_queue/resources/service/fax_queue.php
directory=/var/www/fusionpbx
user=www-data
autostart=true
autorestart=true
stdout_logfile=/var/log/supervisor/fax_queue.log
stderr_logfile=/var/log/supervisor/fax_queue.err

[program:xml_cdr]
command=/usr/local/bin/php /var/www/fusionpbx/app/xml_cdr/resources/service/xml_cdr.php
directory=/var/www/fusionpbx
user=www-data
autostart=true
autorestart=true
stdout_logfile=/var/log/supervisor/xml_cdr.log
stderr_logfile=/var/log/supervisor/xml_cdr.err

[program:websockets]
command=/usr/local/bin/php /var/www/fusionpbx/core/websockets/resources/service/websockets.php
directory=/var/www/fusionpbx
user=www-data
autostart=true
autorestart=true
stdout_logfile=/var/log/supervisor/websockets.log
stderr_logfile=/var/log/supervisor/websockets.err

[program:system_status]
command=/usr/local/bin/php /var/www/fusionpbx/app/system/resources/service/system_status.php
directory=/var/www/fusionpbx
user=www-data
autostart=true
autorestart=true
stdout_logfile=/var/log/supervisor/system_status.log
stderr_logfile=/var/log/supervisor/system_status.err

トラブルシュート


FreeSWITCHの環境変数の設定エラー

FusionPBXで以下のFreeswitchデフォルト設定を参照して調整

Switch

Switch specific default settings. These defaults will change depending if you compiled the SWITCH source or used the newest default of packages.

注)FALSEの箇所はFusionPBXで定義されるため、FreeSWITCHの動作に反映されません。

Default Setting Subcategory Default Setting Name Default Setting Value Default Setting Enabled Default Setting Description
bin dir TRUE Server path for bin.
base dir /usr TRUE Server path for base.
call_center dir /etc/freeswitch/autoload_configs FALSE Server path for Call Center.
conf dir /etc/freeswitch TRUE Server path for Conf files.
db dir /var/lib/freeswitch/db TRUE Server path for sqlite db files.
dialplan dir /etc/freeswitch/dialplan FALSE Server path for xml dialplan
extensions dir /etc/freeswitch/directory FALSE Server path for extension directory.
grammar dir /usr/share/freeswitch/grammar TRUE Server path for grammar xml.
log dir /var/log/freeswitch TRUE Server path for SWITCH logs.
mod dir /usr/lib/freeswitch/mod TRUE Server path for SWITCH mod’s.
phrases dir /etc/freeswitch/lang TRUE Server path for SWITCH xml phrases.
recordings dir /var/lib/freeswitch/recordings TRUE Server path for SWITCH recordings.
scripts dir /usr/share/freeswitch/scripts TRUE Server path for SWITCH scripts.
sip_profiles dir /etc/freeswitch/sip_profiles FALSE Server path for SWITCH xml sip profiles.
sounds dir /usr/share/freeswitch/sounds TRUE Server path for SWITCH sounds.
storage dir /var/lib/freeswitch/storage TRUE Server path for SWITCH storage.
voicemail dir /var/lib/freeswitch/storage/voicemail TRUE Server path for SWITCH voicemails.

補足) FreeSWITCHのウェブソケットのデフォルトのリスンIPが127.0.0.1のため、php-fpmのネットワークモードをホストに変更。

/etc/freeswitch/autoload_configs/event_socket.conf.xml

<configuration name="event_socket.conf" description="Socket Client">
  <settings>
    <param name="nat-map" value="false"/>
    <param name="listen-ip" value="127.0.0.1"/>
    <param name="listen-port" value="8021"/>
    <param name="password" value="ClueCon"/>
    <!--<param name="apply-inbound-acl" value="lan"/>-->
  </settings>
</configuration>

FusionPBX > advanced > modulesで各モジュールがリストアップされない。

原因:
Docker-ComposeのサービスであるFreeSWITCHの/usr/lib/freeswitch/modをFusionPBXと共有していなかったため。

対策:
fusionpbx/app/modules/resources/classes/modules.phpでは、/usr/lib/freeswitch/mod.so ファイルを読み取ることでモジュール設定ファイル /etc/freeswitch/autoload_configs/modules.conf.xml を構築しているため、/usr/lib/freeswitch をFusionPBXと共有する必要があります。

docker-compose.yamlでfreeswitchの以下のディレクトリをphp-fpm(fusionpbx)と共有(各サービスのボリュームセクションに追加)
- freeswitch_usr_lib:/usr/lib/freeswitch

修正後


Advanced>Variablesで環境変数がリストアップされない

以下のファイルの中身が空になっていないか再確認。空になっていた場合は、アップグレードスクリプトを実行しても空のままです。

fusionpbx/app/switch/resources/conf/vars.xml

上記の内容を確認後、以下の項目をチェックし、アップグレートするPHPスクリプトを実行します。

Upgrade — FusionPBX Docs documentation

直接php-fpmコンテナ内で実行する場合

$ docker compose exec php-fpm bash
# cd /opt/fusionpbx-installer-sh
# php php /var/www/fusionpbx/core/upgrade/upgrade.php

[CRIT] switch_loadable_module.c:1785 Error Loading module /usr/lib/freeswitch/mod/mod_local_stream.so

キャッシュをクリアして再起動(php-fpmとfreeswitchコンテナで、以下ディレクトリはホストで共有)

# rm -R /var/cache/fusionpbx/*

片通話(ワンウェイオーディオ)や通話確立できない

原因:ACKが相手に届いていない、登録されたIPが更新されない。

NATでブロックされる代表的なケース

(1) NATマッピングの期限切れ

  • ACKはINVITE → 200 OK の後に送られますが、もしNATが短いUDPタイムアウトでマッピングを消してしまうと、ACKが内側から外に出られない/外から届かないことがあります。
  • 特にUDPでのSIP利用時に顕著。

(2) SIPヘッダ内のアドレス情報の不整合

  • ViaContact ヘッダに プライベートIP が書かれている場合、相手側がそのままACKを返すとNATを越えられません。
  • これによりACKが相手に届かず、通話が確立しないケースがあります。

(3) 対称NAT(Symmetric NAT)

  • 相手がACKを送っても、NATの変換テーブルが一致しないため捨てられるケースがあります。
  • STUN/TURN/ICEやSIP ALGなしでは難しい。

(4) SIP ALGの不具合

  • 一部のルータのSIP ALG(Application Layer Gateway)がSIPヘッダを書き換えますが、ACKの処理を誤って破棄・変換してしまうことがあります。
  • ALGを無効化して、代わりにSBCやプロキシを使うのが安定的。

対策

  • SIP ProxyやSBCを経由させる(外部IPで正しいシグナリング処理)。
  • NAT keepalive(OPTIONS, CRLF, re-REGISTERなど)でポートマッピングを維持。
  • STUN/TURN/ICEを利用(特にSIP over WebRTCやモバイル環境)。
  • SIP ALGは多くの場合オフにした方が安定。
  • 内線のAdvanced設定で以下の項目を指定
  • SIP Force Contact: Rewrite Contact IP
  • SIP Force Expires: 90
  • Force Ping: True


sip_profilesの設定ファイル読み込みエラー

Advanced -> SIP Profiles では、internal,external ともに有効になっているが、Status -> SIP Status では external profile が 非表示となっている他、/etc/freeswitch/sip_profiles に必要な *.xml ファイルが作成されていない。

正常であれば、以下のように *.xml.noload ファイルから *.xml フ ァイルが作成されます。

root@fusion-pbx:/# ls /etc/freeswitch/sip_profiles
empty.xml  external  external-ipv6  external-ipv6.xml  external-ipv6.xml.noload  external.xml  external.xml.noload  internal  internal-ipv6  internal-ipv6.xml  internal-ipv6.xml.noload  internal.xml  internal.xml.noload

エラーの場合、以下の sofia status profile external(-ipv6) が非表示

解決策

Advanced -> Default Settings -> Switch -> sip_profilesfalse(無効)であることを確認。

Advanced -> SIP Profiles で全てのprofileを削除後、Upgrade → Application Defaults をチェックして実行し、profilesを作成します。

上記のイメージで示した内容と *.xml ファイルが作成されたか確認してください。


登録したドメインが削除できない

管理ユーザが所属するグループ(SuperAdmin)の権限にドメイン削除が許可されていない。

Advanced -> Group Manager

管理ユーザが所属するグループで domain_delete をチェック。

再ログインして有効になります。

注) resources/config.sh で指定したホストネームは削除しないこと。削除した場合は再度 ./finish.sh を実行すること。


TLSの有効化

デフォルトではExternal, InternalともにTLS接続は無効となっているため、ExternalについてはTLS接続を有効にします。

Advanced > Switch Variables > SIP Profile: External

external_ssl_enable > true

Status > SIP Status

sofia status profile external

sofia status profile external-ipv6

RESCANを実行

セキュリティ

event_guard は使わずにホストの iptables(ip6tables)fail2ban で対応。

iptables(ip6tables)

$ sudo apt-get install -y iptables-persistent
$ sudo apt-get install -y ip6tables-persistent

$ sudo nano iptables-setup.sh
$ sudo nano ip6tables-setup.sh

$ sudo chmod +x ./iptables-setup.sh
$ sudo chmod +x ./ip6tables-setup.sh

$ sudo ./iptables-setup.sh
$ sudo ./ip6tables-setup.sh

$ sudo iptables-save > /etc/iptables/rules.v4
$ sudo ip6tables-save > /etc/iptables/rules.v6

iptables-setup.sh

#!/bin/bash
# iptables-setup.sh
# Firewall rules for VoIP + Web + SSH (IPv4)

# Reset existing rules
iptables -F
iptables -t mangle -F
iptables -X
iptables -t mangle -X

# Basic rules
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

# Drop known SIP scanners by string matching
for proto in tcp udp; do
  for pattern in "friendly-scanner" "sipcli/" "VaxSIPUserAgent/" "pplsip" "system " "exec." "multipart/mixed;boundary"; do
    iptables -A INPUT -p $proto --dport 5060:5091 -m string --string "$pattern" --algo bm --icase -j DROP
  done
done

# Allow ports
iptables -A INPUT -p tcp --dport 22 -s 192.168.xx.0/24 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -j ACCEPT
iptables -A INPUT -p tcp --dport 7443 -j ACCEPT
iptables -A INPUT -p tcp --dport 5060:5091 -j ACCEPT
iptables -A INPUT -p udp --dport 5060:5091 -j ACCEPT
iptables -A INPUT -p udp --dport 16384:32768 -j ACCEPT
iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT

# DSCP marks (QoS)
iptables -t mangle -A OUTPUT -p udp --sport 16384:32768 -j DSCP --set-dscp 46
iptables -t mangle -A OUTPUT -p udp --sport 5060:5091 -j DSCP --set-dscp 26
iptables -t mangle -A OUTPUT -p tcp --sport 5060:5091 -j DSCP --set-dscp 26

# Default policies
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT

ip6tables-setup.sh

#!/bin/bash
# ip6tables-setup.sh
# Firewall rules for VoIP + Web + SSH (IPv6)

# Reset existing rules
ip6tables -F
ip6tables -t mangle -F
ip6tables -X
ip6tables -t mangle -X

# Basic rules
ip6tables -A INPUT -i lo -j ACCEPT
ip6tables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

# Drop known SIP scanners by string matching
for proto in tcp udp; do
  for pattern in "friendly-scanner" "sipcli/" "VaxSIPUserAgent/" "pplsip" "system " "exec." "multipart/mixed;boundary"; do
    ip6tables -A INPUT -p $proto --dport 5060:5091 -m string --string "$pattern" --algo bm --icase -j DROP
  done
done

# Allow ports
ip6tables -A INPUT -p tcp --dport 80 -j ACCEPT
ip6tables -A INPUT -p tcp --dport 443 -j ACCEPT
ip6tables -A INPUT -p tcp --dport 7443 -j ACCEPT
ip6tables -A INPUT -p tcp --dport 5060:5091 -j ACCEPT
ip6tables -A INPUT -p udp --dport 5060:5091 -j ACCEPT
ip6tables -A INPUT -p udp --dport 16384:32768 -j ACCEPT
ip6tables -A INPUT -p icmpv6 --icmpv6-type echo-request -j ACCEPT

# DSCP marks (QoS)
ip6tables -t mangle -A OUTPUT -p udp --sport 16384:32768 -j DSCP --set-dscp 46
ip6tables -t mangle -A OUTPUT -p udp --sport 5060:5091 -j DSCP --set-dscp 26
ip6tables -t mangle -A OUTPUT -p tcp --sport 5060:5091 -j DSCP --set-dscp 26

# Default policies
ip6tables -P INPUT DROP
ip6tables -P FORWARD DROP
ip6tables -P OUTPUT ACCEPT

fail2ban

$ sudo apt-get install -y fail2ban rsyslog

設定ファイルをコピーしてfail2banを再起動するスクリプトを作成

fail2ban.sh

#!/bin/sh

#send a message
verbose "copy Fail2ban config"

#move the filters
cp fail2ban/freeswitch.conf /etc/fail2ban/filter.d/freeswitch.conf
cp fail2ban/freeswitch-acl.conf /etc/fail2ban/filter.d/freeswitch-acl.conf
cp fail2ban/sip-auth-failure.conf /etc/fail2ban/filter.d/sip-auth-failure.conf
cp fail2ban/sip-auth-challenge.conf /etc/fail2ban/filter.d/sip-auth-challenge.conf
cp fail2ban/auth-challenge-ip.conf /etc/fail2ban/filter.d/auth-challenge-ip.conf
cp fail2ban/freeswitch-ip.conf /etc/fail2ban/filter.d/freeswitch-ip.conf
cp fail2ban/fusionpbx.conf /etc/fail2ban/filter.d/fusionpbx.conf
cp fail2ban/fusionpbx-mac.conf /etc/fail2ban/filter.d/fusionpbx-mac.conf
cp fail2ban/fusionpbx-404.conf /etc/fail2ban/filter.d/fusionpbx-404.conf
cp fail2ban/nginx-404.conf /etc/fail2ban/filter.d/nginx-404.conf
cp fail2ban/nginx-dos.conf /etc/fail2ban/filter.d/nginx-dos.conf
cp fail2ban/jail.local /etc/fail2ban/jail.local

#update config if source is being used
#if [ .$switch_source = .true ]; then
#	sed 's#var/log/freeswitch#usr/local/freeswitch/log#g' -i /etc/fail2ban/jail.local
#fi

#restart fail2ban
/usr/sbin/service fail2ban restart
$ sudo chmod +x ./fail2ban.sh
$ sudo ./fail2ban.sh

ログローテーションの設定

以下参照

IP電話機

使用するIP電話は、snom製D315 : IPv4, IPv6対応、登録SIPアドレス:4

https://service.snom.com/display/wiki/D315


Reset your phone via Rescue Mode:ファクトリーリセット

Model D3xx/D7xx/D81x phones

Disconnect the phone from the power source, **press and hold the hash key # and power up the phone again

Or press " * * # # " and hold down the hash key # while the phone reboots.

In both cases, you will be able to access the “Rescue Mode” on the display

レスキューモード(Rescue Mode)の表示画面から “1.Settings reset” を選択。


ファームウェア

ウェブインターフェイスでファイル指定して適用


SIPテキストメッセージの受信・表示

Identities - SIP Settings(Section): Support broken Registrar —> on
Advanced - QoS/Security (Tab) - Security(Section): Filter packets from Registrar —> off
Advanced → SIP/RTP → SIP → Network Identity (Port) (Reboot required) —> 5060

電話機LCDに表示されるメッセージは、受信後表示されるinfoアイコンをクリックして管理。

注) snom D315 は RFC 3428 (SIP MESSAGE) の 基本的な text/plain メッセージには対応していますが、CPIM(Common Profile for Instant Messaging) や IMDN (既読通知などの拡張) はサポートしていません。SIPクライアントからメッセージを送信する場合、これらの設定を無効にすること。
LinphoneのE2EサーバURLも指定しないこと。


IPv6対応

IPv6はDHCP onまたは Autoconfiguration にして有効化。


SRTP対応端末との接続

Linphone が SRTP を有効にしている場合は、Snom 側でも以下の設定が必要です:

  • Transport: TLS
  • SRTP: mandatory

SIP が UDP/TCP のままになっていると、SRTP のネゴシエーションで失敗して
「sip_transport_state_cb context lost」や「idle/connect timeout」が発生します。

SRTP接続を必須にしている端末と接続する場合、以下の設定がオフ(デフォルト)のままだと繋がりません。

E-Mail機能( 外部SMTPサーバを利用して送信)

ユーザー向けの役割

  1. ボイスメール通知
  • 留守電にメッセージが入ると、音声ファイル(WAVやMP3)を添付してユーザーにメール送信。
  • 件名や本文に「発信者番号」「受信時間」を入れられる。
  • ユーザーはメールから直接音声を再生可能。
  1. FAX通知
  • 受信したFAXをPDFに変換し、メールで送信。
  • FAXサーバ代わりに使える。
  1. 通話録音の送信(オプション)
  • 通話を録音した場合、そのファイルを添付してメール送信。
  1. ユーザーアカウント関連
  • 新規アカウント作成時のログイン情報送付。
  • パスワードリセット用リンクを送る。

管理者向けの役割

  1. システム通知・アラート
  • ディスク容量不足や障害検知などを、管理者のメールアドレスへ通知。
  • モジュールやスクリプトと連携させてカスタマイズも可能。
  1. ユーザー管理サポート
  • 管理者が一斉にユーザーへ初期設定情報を配布する際にメール利用。
  1. 保守・監査用通知
  • 特定のイベント(新規登録、内線追加、セキュリティアラートなど)をメールで受け取る。

Advanced -> Default SettingsCategoryからEmailを選択。

Email Templates機能で、通知メールの本文や件名を自由に編集可能。

設定のポイント

  • FreeSWITCHのexternal(-ipv6).xmlでは、TLS接続を有効にする設定をすること。
  • 端末のFreeSWITCHのSIPサーバへの接続には、TLSを指定すること。
  • 端末のメディア暗号化にはDTLSを選択すること。
  • FusionPBXにより生成されるXMLファイルについては以下参照。これは Advanced → Default Settings → Switchで、FALSEに設定されたカテゴリが対象。

Geminiにより技術的内容の校閲・修正

FusionPBX環境において、FreeSWITCHの各種設定は、mod_luaを利用したLuaスクリプトによって動的に生成・ロードされます。

この仕組みでは、FreeSWITCHが必要とする設定をデータベースから読み出し、XMLファイルを生成してキャッシュディレクトリ(例:/var/cache/freeswitch/)に保存します。FreeSWITCHは起動時やリロード時にこのキャッシュされたXMLファイルを参照して動作します。autoload_configsディレクトリ配下にある設定(ただしsip_profilesディレクトリを除く)の多くが、この動的な仕組みで管理されています。

一方で、autoload_configs/sip_profilesディレクトリ内の設定は例外的に扱われ、動的生成の対象外です。このディレクトリに配置された*.xmlファイルは、FreeSWITCHによって直接読み込まれます。

同ディレクトリ内に存在する*.xml.noloadファイルは、これらの*.xmlファイルを生成するための テンプレート(または参照ファイル) として機能します。FusionPBXのインストール時や、管理画面の Advanced -> Upgrade -> Application Defaults を実行した際に、この.noloadファイルを元にして新しい*.xmlファイルが生成(または上書き)される仕組みになっています。

なお、FusionPBXでプロファイルやACLの設定を変更した場合は、必ず管理画面から該当プロファイルを再起動してください。再起動を行わないと、キャッシュディレクトリ内のXMLが更新されず、設定変更が反映されません。

Status->SIP Status

fs_cliコマンドで実行する場合は下記参照願います。

Dockerコンテナから実行

$ docker exec -ti freeswitch bash
# fs_cli
> sofia profile external-ipv6 restart
> help
reloadacl,,Reload XML,mod_commands
reloadxml,,Reload XML,mod_commands
> sofia help
USAGE:
--------------------------------------------------------------------------------
sofia global siptrace <on|off> リアルタイムでログ確認
sofia        capture  <on|off>
             watchdog <on|off>

sofia profile <name> [start | stop | restart | rescan] [wait]
                     flush_inbound_reg [<call_id> | <[user]@domain>] [reboot]
                     check_sync [<call_id> | <[user]@domain>]
                     [register | unregister] [<gateway name> | all]
                     killgw <gateway name>
                     [stun-auto-disable | stun-enabled] [true | false]]
                     siptrace <on|off>
                     capture  <on|off>
                     watchdog <on|off>

sofia <status|xmlstatus> profile <name> [reg [<contact str>]] | [pres <pres str>] | [user <user@domain>]
sofia <status|xmlstatus> gateway <name>

sofia loglevel <all|default|tport|iptsec|nea|nta|nth_client|nth_server|nua|soa|sresolv|stun> [0-9]
sofia tracelevel <console|alert|crit|err|warning|notice|info|debug>

ゲートウェイの追加

050番号が付与されたSIPアカウントをゲートウェイに登録することで、この番号への着信を内線番号へ転送することができます。ゲートウェイに登録するSIPアカウントは、他のSIPフリーアカウントでも構いません。例えば、Linphoneのフリーアカウントficusonlineを取得し、
[email protected]への着信を内線1001へ転送するという設定も可能です。

ゲートウェイを設けることで、050番号の通信費で携帯から呼出が行えるだけでなく、着信で生じる相手の通信費も抑えることができます。

Gateways — FusionPBX Docs documentation

Accounts → Gateways → + ADD

注) Contextには、外線対応の設定が適用されるPublicを指定してください。

注) 上記の設定のみだと、ある時間経過後にNAT(ルータ)により接続が遮断されてユーザ不明の状態になります。このエラーを回避するため、常に接続を維持する必要がありますが、それをADVANCEDの項目pingで設定します。

以下ADVANCEDの設定です。

  • Auth Username: ficusonline

  • Register Transport: TCP, UDP or TLS.

  • Register Proxy: sip.linphone.org

  • Caller ID In From: true

  • Supress CNG: true

  • Extension In Contact: true

  • Ping: 30

  • Contact in Ping: true

  • Domain: sip.yourdomain.com

インバウンドの追加

Dialplan → Inbound Roots → +ADD

条件出しは任意ですが、下図ではSIP URLとアカウント名が一致した場合に内線1001へ転送されます。

注) Contextには、外線対応の設定が適用されるPublicを指定してください。

ACLの設定

Advanced → Access Controls → providers

外線用設定ファイルexternal.xml,external-ipv6.xmlに適用されるACL(Access Control List)ルールにsip.linphone.orgのIPを追加します。

external.xml, external-ipv6.xml

<param name="apply-inbound-acl" value="providers"/>

IPの確認にはdigコマンドを使用します。

$ dig sip.linphone.org
;; ANSWER SECTION:
sip.linphone.org.	9700	IN	A	5.135.215.43


ビデオ通話

コーデック変数にH264を追加

AdvancedSwitch Variables

StatusSIP StatusRESCAN

で追加内容が反映されます。

アップロード