Ubuntu18.04にSIPサーバであるFlexisipをビルド・インストールします。VoIP電話(050電話、各種SNSメッセンジャーなど)システムでは、SIPプロトコルにより複数の端末間でリアルタイムに音声、テキスト、映像情報などが遣り取りされていますが、これら端末間の繋がりはSIPサーバ(AsteriskなどオープンなSIPサーバは数多く存在します)により確立されています(端末間IPアドレス、ポートの割当、コマンドメッセージ処理など)。
本システムをRaspberry Piなどのシングルボードコンピュータにインストールすることにより、携帯端末に繋がるインターホンを製作することも出来ます。
ソースファイル
GitLab
Github
Flexisipバージョン
$ flexisip -v
flexisip version: 1.0.13 (git: 1.0.13-247-g3ba0a222)
sofia-sip version 1.13.35bc
Compiled with:
- SNMP
- Transcoder
- Redis
- Soci
- Protobuf
- Presence
- Conference
ビルド・インストール環境
Linux 4.15.0-55-generic/Ubuntu18.04 x86_64 GNU/Linux
事前準備
事前に開発に必要なDockerパッケージの準備、SIPサーバ用にドメイン名を取得します。
- Docker CE(linphone-sdkのコンテナイメージ作成・コンテナ起動)
Dockerのインストールについては以下フォーラム記事を参照願います。
Docker Engine/Docker Composeのインストール - ドメイン名を利用すると後の設定が楽になります。ドメイン名を利用しない場合はグローバルIPアドレス(xxx.xxx.xxx.xxx)に置き換えて下さい。
サブドメインは"sip"でなくても構いません。
ex) "sip.freedomain.com"でも"test.freedomain.com"でも可
A.ビルド・インストール手順
- プロジェクトフォルダの作成
- linphone-sdkコンテナイメージの作成とコンテナの起動
- ソースファイルのダウンロード(git clone)
- prepare.pyによるビルドスクリプトの作成
- makeコマンドによるビルド
- debパッケージのインストール
- パスの指定
B.関連アプリのインストール・設定
- Redis Serverのインストール・設定
- SNMPのインストール・設定
- MariaDBのインストール・SQLデータベース・テーブルの作成
C.起動・動作確認
- ルータのポート開放(ポートフォワード)
- Flexisipの設定・起動
- 携帯端末による動作確認
- Netstatによる各セッションの確認
A.ビルド・インストール手順
A-1.プロジェクトフォルダの作成
以下作業ディレクトリを作成、作業ディレクトリ内に移動します。
$ mkdir ~/build_project
$ cd build_project
A-2.linphone-sdkコンテナイメージの作成とコンテナの起動
以下コマンドによりDockerイメージのダウンロード、コンテナlinphone-sdkが起動、そのままコンテナ内シェルに移動します (Linphone-desktopの記事で作成したコンテナをそのまま利用しても構いません) 。
$ docker run --name bc-flexisip -v $PWD:/home/bc -it gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-ubuntu:18.04
bc@container_id:~$
Dockerファイルは以下参照して下さい。
別のターミナルにより起動コンテナを確認出来ます。
$ docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
xxxxxxxxxxx gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-ubuntu:18.04 "/bin/sh -c bash" 15 hours ago Exited (0) 5 hours ago linphone-desktop
以下3,4,5の作業はコンテナ内で実行します。
A-3.ソースファイルのダウンロード(git clone)
コンテナ内シェルで以下コマンドを実行します。
$ cd /home/your_user_name/build_project
$ git clone https://gitlab.linphone.org/BC/public/flexisip.git
$ cd flexisip
$ git submodule sync && git submodule update --init --recursive
A-4.prepare.pyによるビルドスクリプトの作成
prepare.pyによりcmakeスクリプトを作成します。
$ ./prepare.py flexisip-rpm -DENABLE_REDIS=YES -DENABLE_TRANSCODER=YES -DENABLE_UNIT_TESTS=OFF -DENABLE_SOCI=YES -DENABLE_PRESENCE=YES -DENABLE_CONFERENCE=YES -DENABLE_SNMP=YES -DENABLE_DOC=OFF -DENABLE_PROTOBUF=YES -DENABLE_MDNS=NO -DENABLE_JWE_AUTH_PLUGIN=YES -DENABLE_EXTERNAL_AUTH_PLUGIN=YES
上記コマンドにより全オプションのステータスが表示されます。
-- Enabled features:
* Redis, Enable hiredis support.
* Presence, Enable presence server support.
* Conference, Enable conference server support.
* SNMP, Enable SNMP support.
* Transcoder, Enable transcoder support.
* Protobuf, Enable protobuf for REDIS.
* Jwe Auth Plugin, Enable JweAuth plugin support.
* External Auth Plugin, Enable ExternalAuth plugin support
* SOCI, Enable SOCI support.
* CXX wrapper, Build the C++ wrapper for Liblinphone.
* LIME, Enable Linphone IM Encryption support in Liblinphone.
* Mbedtls, Crypto stack implementation based on mbeddtls.
-- Disabled features:
* Unit tests, Enable unit tests support with BCUnit library.
* Debug logs, Enable debug level logs in libinphone and mediastreamer2.
* Doc, Enable documentation generation with Doxygen and Sphinx
* Tools, Enable tools binary compilation.
* unmaintained, Allow inclusion of unmaintained code in the build.
* GTK UI, Enable the GTK user interface of Linphone.
* CSharp wrapper, Build the C# wrapper from Liblinphone.
* Swift wrapper, Build the Swift wrapper from Liblinphone.
* Jazzy doc, Build the Swift doc from Liblinphone.
* Java wrapper, Build the Java wrapper from Liblinphone.
* LIME X3DH, Enable Linphone IM Encryption version 2 support in Liblinphone.
* NLS, Enable internationalization of Linphone and Liblinphone.
* Update Check, Enable update check.
* VCARD, Enable vCard 4 support in Linphone and Liblinphone.
* Relative prefix, liblinphone and mediastreamer will look for their respective ressources relatively to their location.
* Tunnel, Secure tunnel for SIP/RTP (require license).
* RTP Map always in SDP, Always include rtpmap in SDP.
* mDNS, Multicast DNS support
* GPL third parties, Usage of GPL third-party code (FFmpeg and x264).
* Non free codecs, Allow inclusion of non-free codecs in the build.
* SRTP, SRTP media encryption support.
* ZRTP, ZRTP media encryption support.
* WebRTC AEC, WebRTC echo canceller support.
* WebRTC AECM, WebRTC echo canceller for mobile support.
* WASAPI, Windows Audio Session API (WASAPI) sound card support.
* AMRNB, AMR narrow-band audio encoding/decoding support (require license).
* AMRWB, AMR wide-band audio encoding/decoding support (require license).
* Codec2, Codec2 audio encoding/decoding support.
* G729, G.729 audio encoding/decoding support.
* G729B CNG, G.729 annex B confort noise generation.
* G726, G.726 audio encoding/decoding support.
* GSM, GSM audio encoding/decoding support.
* iLBC, iLBC audio encoding/decoding support.
* ISAC, ISAC audio encoding/decoding support.
* OPUS, OPUS audio encoding/decoding support.
* Silk, Silk audio encoding/decoding support.
* Speex, Speex audio encoding/decoding support.
* WebRTC VAD, WebRTC voice activation detector support.
* BV16, BroadVoice 16 audio encoding/decoding support.
* Video, Ability to capture and display video.
* jpeg, JPEG support with libjpeg-turbo.
* qrcode, QRCode support with zxing.
* FFmpeg, Some video processing features via FFmpeg: JPEG encoding/decoding, video scaling, H264 decoding...
* H263, H263 video encoding/decoding support (require license).
* H263p, H263+ video encoding/decoding support (require license).
* MKV, MKV playing and recording support.
* MPEG4, MPEG4 video encoding/decoding support (require license).
* OpenH264, H.264 video encoding/decoding support with the openh264 library (require license).
* VPX, VPX (VP8) video encoding/decoding support.
* X264, H.264 video encoding support with the x264 library (require license).
* AAudio, AAudio Android sound card for Android 8+.
* PCAP, PCAP support.
* Polarssl, Crypto stack implementation based on polarssl.
NOTE) Disabled features一覧から有効化したいオプションがある場合、 -DENABLE_XXXXX=ON (YES)
を追加します。
上記のprepare.pyスクリプトにより、flexisip/WORKフォルダ内にflexisip-rpmが作成されます。
このままmakeするとmacros関連の次のエラーが発生します (Linphone-desktopの記事で作成したDockerコンテナを利用する場合エラー対策は必要ありません) 。
エラー
“%cmake error”
エラー対策
以下パッケージをダウンロードしてコンテナ内の該当フォルダにコピーします。以下の作業は別ターミナル(コンテナ外)から行う場合です。
https://rpmfind.net/linux/rpm2html/search.php?query=cmake-rpm-macros
$ docker cp cmake.prov container_name:/usr/lib/rpm/cmake.prov
$ docker cp cmake.req container_name:/usr/lib/rpm/cmake.req
$ docker cp cmake.attr container_name:/usr/lib/rpm/fileattrs/cmake.attr
$ docker cp macros.cmake container_name:/usr/lib/rpm/macros.d/macros.cmake
A-5.makeコマンドによるビルド
コンテナ内でmakeコマンドを実行します。
$ make
A-6.debパッケージのインストール
コンテナから出てdebパッケージをインストールします。
$ exit
flexisip/WORK/flexisip-rpm/rpmbuild/DEBSフォルダ内にdebパッケージが作成されています。
このフォルダ内でdpkgコマンドによりインストールします。
$ cd WORK/flexisip-rpm/rpmbuild/DEBS
$ sudo dpkg -i linphone-*.deb
A-7.パスの指定
バイナリパスは/opt/belledonne-communications/bin
ライブラリパスは/opt/belledonne-communications/lib
のため、各々のパスを設定ファイルに追加します。
バイナリパスの指定
ホームフォルダ内の.bashrcファイルの最後に以下を追加します。
export PATH=$PATH:/opt/belledonne-communications/bin
ライブラリパスの指定
$ sudo nano /etc/ld.so.conf.d/flexisip.conf
/opt/belledonne-communications/lib
ライブラリパスの有効化
$ sudo ldconfig
暫定的には
$ export PATH=$PATH:/opt/belledonne-communications/bin
$ export LD_LIBRARY_PATH=/opt/belledonne-communications/lib
B.関連アプリのインストール・設定
B-1.Redis Serverのインストール・設定
端末間セッション確立のために必要なIPアドレス情報を一時的に保管するためのサーバ(メモリ内)を用意します。
Redis-serverのインストール
$ sudo apt install redis-server
パスワードにはMD5アルゴリズムを適用します(任意)。
$ echo your_password | md5sum
/etc/redis/redis.confの設定 bind, systemd, パスワードを設定します。
sudo nano /etc/redis/redis.conf
################################## NETWORK #####################################
# By default, if no "bind" configuration directive is specified, Redis listens
# for connections from all the network interfaces available on the server.
# It is possible to listen to just one or multiple selected interfaces using
# the "bind" configuration directive, followed by one or more IP addresses.
bind 127.0.0.1 ::1
################################# GENERAL #####################################
# By default Redis does not run as a daemon. Use 'yes' if you need it.
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
daemonize yes
# If you run Redis from upstart or systemd, Redis can interact with your
# supervision tree. Options:
# supervised no - no supervision interaction
# supervised upstart - signal upstart by putting Redis into SIGSTOP mode
# supervised systemd - signal systemd by writing READY=1 to $NOTIFY_SOCKET
# supervised auto - detect upstart or systemd method based on
# UPSTART_JOB or NOTIFY_SOCKET environment variables
# Note: these supervision methods only signal "process is ready."
# They do not enable continuous liveness pings back to your supervisor.
supervised systemd
################################## SECURITY ###################################
# Require clients to issue AUTH <PASSWORD> before processing any other
# commands. This might be useful in environments in which you do not trust
# others with access to the host running redis-server.
#
# This should stay commented out for backward compatibility and because most
# people do not need auth (e.g. they run their own servers).
#
# Warning: since Redis is pretty fast an outside user can try up to
# 150k passwords per second against a good box. This means that you should
# use a very strong password otherwise it will be very easy to break.
#
requirepass xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
B-2.SNMPのインストール・設定
SIPサーバ自体の状態(CPU、メモリ、ディスク、ネットワーク使用率)監視のため、SNMPデーモンをインストールします。
SNMP: “Simple Network Management Protocol.” に必要なパッケージは以下の通りです。
$ sudo apt install snmp snmpd snmp-mibs-downloader
SNMPマネージャがMIBファイルを読み取れるように/etc/snmp/snmp.confの"mibs :"をコメントアウト(無効に)します。
# As the snmp packages come without MIB files due to license reasons, loading
# of MIBs is disabled by default. If you added the MIBs you can reenable
# loading them by commenting out the following line.
#mibs : コメントアウト
snmpd設定ファイル/etc/snmp/snmpd.confを編集します。
sudo pico /etc/snmp/snmpd.conf
agentAddress udp:127.0.0.1:161
master agentx
rocommunity public localhost
rwcommunity private localhost
rouser authOnlyUser
rwuser authPrivUser priv
B-3.MariaDBのインストール・SQLデータベース・テーブルの作成
登録ユーザを保管するデータベースとして利用します。sociによるSQLデータベース接続の際にはMariadb Client Libraryが必要となります。
(linphone-sdkのDocker File docker-files/bc-dev-ubuntu-rolling · master · BC / public / linphone-sdk · GitLab ではMariadbを指定しているため)。
MariaDBをインストールします。
$ sudo apt install mariadb-server mariadb-client libmariadb3
MariaDBパスワード設定
$ sudo mysql_secure_installation
rootユーザによるログイン
$ mysql -u root -p
flexisipがアクセスできる専用ユーザ"flexisip"と専用データベース"flexisip"を作成、ユーザflexisipで再ログインしてテーブル"accounts"を作成します。
MariaDB [(none)]> create user 'flexisip'@'localhost' identified by 'password';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> grant all privileges on flexisip.* to 'flexisip'@'localhost';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> create database flexisip;
MariaDB [(none)]> system mysql -u flexisip -p
MariaDB [(none)]> use flexisip;
MariaDB [flexisip]> create table if not exists accounts ( registerID INT UNSIGNED NOT NULL AUTO_INCREMENT, login VARCHAR(20) NOT NULL DEFAULT 'loginid', domain VARCHAR(20) NOT NULL DEFAULT 'sip.server.com', authid VARCHAR(20) NOT NULL DEFAULT 'authid', password VARCHAR(40) NOT NULL DEFAULT 'dd02c7c2232759874e1c205587017bed', algorithm VARCHAR(10) NOT NULL DEFAULT 'MD5', phone VARCHAR(20) NOT NULL DEFAULT '818012345678', PRIMARY KEY (registerID) );
Query OK, 0 rows affected (0.51 sec)
MariaDB [flexisip]> SHOW TABLES;
+--------------------+
| Tables_in_flexisip |
+--------------------+
| accounts |
+--------------------+
1 row in set (0.00 sec)
MariaDB [flexisip]> DESCRIBE accounts;
+------------+------------------+------+-----+----------------------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------+------------------+------+-----+----------------------------------+----------------+
| registerID | int(10) unsigned | NO | PRI | NULL | auto_increment |
| login | varchar(20) | NO | | loginid | |
| domain | varchar(20) | NO | | sip.server.com | |
| authid | varchar(20) | NO | | authid | |
| password | varchar(40) | NO | | dd02c7c2232759874e1c205587017bed | |
| algorithm | varchar(10) | NO | | MD5 | |
| phone | varchar(20) | NO | | 818012345678 | |
+------------+------------------+------+-----+----------------------------------+----------------+
7 rows in set (0.00 sec)
MariaDB [flexisip]> SHOW CREATE TABLE accounts \G
*************************** 1. row ***************************
Table: accounts
Create Table: CREATE TABLE `accounts` (
`registerID` int(10) unsigned NOT NULL AUTO_INCREMENT,
`login` varchar(20) NOT NULL DEFAULT 'loginid',
`domain` varchar(20) NOT NULL DEFAULT 'sip.server.com',
`authid` varchar(20) NOT NULL DEFAULT 'authid',
`password` varchar(40) NOT NULL DEFAULT 'dd02c7c2232759874e1c205587017bed',
`algorithm` varchar(10) NOT NULL DEFAULT 'MD5',
`phone` varchar(20) NOT NULL DEFAULT '818012345678',
PRIMARY KEY (`registerID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1 row in set (0.01 sec)
MariaDB [flexisip]> INSERT INTO accounts VALUES (1001, 'friend1','sip.server.com', 'friend1', '', '', '');
Query OK, 1 row affected (0.06 sec)
MariaDB [flexisip]> select * from accounts;
+------------+---------+----------------------+---------+----------+------------+-------+
| registerID | login | domain | authid | password | algorithm | phone |
+------------+---------+----------------------+---------+----------+------------+-------+
| 1001 | friend1 | sip.server.com | friend1 | | | |
+------------+---------+----------------------+---------+----------+------------+-------+
1 row in set (0.00 sec)
C.起動・動作確認
C-1.ルータのポート開放(ポートフォワード)
ルータのfirewall設定メニューでポートフォワードを設定します。WANからの5070/tcp,udpアクセスをLANのIPアドレス(flexisipのIP192.168.x.xxx:5070 tcp/udp)へ導きます。ルータにより設定方法・名称が異なります。
RTP用ポート(flexisip.confの[module::mediarelay]で設定する ポート10000-10100 udp)も同様に開放します。
C-2.Flexisipの設定・起動
Flexisipの設定ファイルの雛形を/etc/flexisip/flexisip.confにコピーします。
$ sudo /opt/belledonne-communications/bin/flexisip --dump-default all > /etc/flexisip/flexisip.conf
/etc/flexisip/flexisip.confを編集します。設定項目が多く本設定が最適とは限りません。必要であれば変更・修正して下さい。
[global]
log-directory=/var/opt/belledonne-communications/log/flexisip
log-level=error
syslog-level=error
user-errors-logs=false
contextual-log-filter=
contextual-log-level=debug
dump-corefiles=true
auto-respawn=true
aliases=sip.testsite.com localhost
default-servers=proxy presence
transports=sip:sip.testsite.com:5070;maddr=192.168.x.xxx
idle-timeout=3600
keepalive-interval=1800
proxy-to-proxy-keepalive-interval=0
require-peer-certificate=false
transaction-timeout=32000
udp-mtu=1460
enable-snmp=true
unique-id=
plugins-dir=/opt/belledonne-communications/lib/flexisip/plugins
plugins=
[stun-server]
enabled=true
bind-address=0.0.0.0
port=3478
[presence-server]
enabled=true
transports=sip:127.0.0.1:5065;transport=tcp
expires=600
notify-limit=200
leak-detector=false
long-term-enabled=true
bypass-condition=false
external-list-subscription-request=
soci-connection-string=db=flexisip user=flexisip password='password' host=localhost
max-thread=50
max-thread-queue-size=50
[conference-server]
enabled=true
transport=sip:127.0.0.1:6064;transport=tcp
conference-factory-uri=
enable-one-to-one-chat-room=true
outbound-proxy=sip:127.0.0.1:5070;transport=tcp
database-backend=mysql
database-connection-string=db=flexisip user=flexisip password='password' host=localhost
check-capabilities=true
[module::DoSProtection]
enabled=true
filter=
time-period=15000
packet-rate-limit=20
ban-time=1
iptables-chain=FLEXISIP
[module::SanityChecker]
enabled=true
filter=
[module::NatHelper]
enabled=true
filter= !(user-agent contains 'No NatHelper')
contact-verified-param=verified
fix-record-routes=false
fix-record-routes-policy=safe
[module::Authentication]
enabled=true
filter=
auth-domains=sip.testsite.com localhost
disable-qop-auth=false
no-403=false
nonce-expires=3600
realm-regex=
trusted-hosts=127.0.0.1
db-implementation=soci
cache-expire=1800
reject-wrong-client-certificates=false
new-auth-on-407=false
enable-test-accounts-creation=false
trust-domain-certificates=false
soci-password-request=select password from accounts where login = :id and domain = :domain
soci-user-with-phone-request=select login from accounts where phone = :phone
soci-users-with-phones-request=select login, domain, phone from accounts where phone in (:phones)
soci-poolsize=100
soci-backend=mysql
soci-connection-string=db=flexisip user=flexisip password='password' host=localhost
soci-max-queue-size=1000
[module::Presence]
enabled=true
filter=is_request && (request.method-name == 'PUBLISH' || request.method-name == 'NOTIFY' || request.method-name == 'SUBSCRIBE')
presence-server=sip:127.0.0.1:5065;transport=tcp
only-list-subscription=false
check-domain-in-presence-results=false
[module::Registrar]
enabled=true
filter=
reg-domains=sip.testsite.com
reg-on-response=false
max-contacts-by-aor=12
unique-id-parameters=+sip.instance pn-tok line
max-expires=86400
min-expires=60
force-expires= -1
static-records-file=
static-records-timeout=600
db-implementation=redis
redis-server-domain=localhost
redis-server-port=6379
redis-auth-password=xxxxxxxxxxxxxxxxxxxxxxxxxx
redis-server-timeout=1500
redis-record-serializer=protobuf
redis-slave-check-period=60
service-route=
name-message-expires=message-expires
register-expire-randomizer-max=0
[module::StatisticsCollector]
enabled=true
filter=is_request && request.method-name == 'PUBLISH'
collector-address=sip:sip.testsite.com:5070
[module::Router]
enabled=true
filter=
use-global-domain=false
fork=true
stateful=true
fork-late=false
fork-no-global-decline=false
treat-decline-as-urgent=false
treat-all-as-urgent=false
call-fork-timeout=20
call-fork-urgent-timeout=5
call-fork-current-branches-timeout=10
call-push-response-timeout=0
message-fork-late=true
message-delivery-timeout=60
message-accept-timeout=15
fallback-route=
allow-target-factorization=false
permit-self-generated-provisional-response=true
generated-contact-route=
generated-contact-expected-realm=
generate-contact-even-on-filled-aor=false
preroute=
resolve-routes=true
parent-domain-fallback=false
[module::MediaRelay]
enabled=true
filter=
nortpproxy=nortpproxy
sdp-port-range-min=10000
sdp-port-range-max=10500
bye-orphan-dialogs=false
max-calls=0
force-relay-for-non-ice-targets=true
prevent-loops=true
early-media-relay-single=true
max-early-media-per-call=0
inactivity-period=3600
force-public-ip-for-sdp-masquerading=false
drop-telephone-event=false
[module::Forward]
enabled=true
filter=
route=
add-path=true
rewrite-req-uri=false
default-transport=udp
params-to-remove=pn-tok pn-type app-id pn-msg-str pn-call-str pn-call-snd pn-msg-snd pn-timeout pn-silent
Flexisipをサービスデーモンとして起動します。
$ sudo service flexisip-proxy start
ステータス確認
$ sudo service flexisip-proxy status
● flexisip-proxy.service - Flexisip proxy server
Loaded: loaded (/lib/systemd/system/flexisip-proxy.service; disabled; vendor preset: enabled)
Active: active (running) since Mon 2019-07-22 11:06:43 JST; 7h ago
Docs: http://www.linphone.org/technical-corner/flexisip/overview
Process: 26504 ExecStart=/opt/belledonne-communications/bin/flexisip --server proxy --daemon --syslog --pidfile /var/run/flexisip-proxy.pid (code=exited, status=0/SUCCESS)
Main PID: 26527 (flexisipwd-prox)
Tasks: 110 (limit: 4915)
CGroup: /system.slice/flexisip-proxy.service
├─26527 /opt/belledonne-communications/bin/flexisip --server proxy --daemon --syslog --pidfile /var/run/flexisip-proxy.pid
└─26528 /opt/belledonne-communications/bin/flexisip --server proxy --daemon --syslog --pidfile /var/run/flexisip-proxy.pid
7月 22 11:06:42 thinkpad-e450 systemd[1]: Starting Flexisip proxy server...
7月 22 11:06:42 thinkpad-e450 flexisip[26504]: Writing logs in : /var/opt/belledonne-communications/log/flexisip/flexisip-proxy.log
7月 22 11:06:42 thinkpad-e450 flexisip[26504]: [LAUNCHER] Watchdog PID: 26527
7月 22 11:06:43 thinkpad-e450 flexisip[26504]: NET-SNMP version 5.7.3 AgentX subagent connected
7月 22 11:06:43 thinkpad-e450 systemd[1]: Started Flexisip proxy server.
C-3.携帯端末による動作確認
2つの異なる外部ネットワークの端末から接続を試みます。SIP-VoIPアプリとしてLinphone、ZoiPerなどを利用します。
- SIPポートは5070/tcpを指定(flexisip.confの設定による)
- DTMF:SIP
- STUNサーバーとプロキシサーバのドメインとポート番号は同一
- Outbound Proxyを指定(SIPプロキシ経由で呼び出し)
C-4.Netstatによる確立したセッションの確認
Netstatにより両者間のIPアドレスによるセッション確立状態を確認します。
$ sudo netstat -antpu | grep flexisip
tcp 0 0 192.168.x.xxx:5070 0.0.0.0:* LISTEN 8515/flexisip
tcp 0 0 127.0.0.1:39338 127.0.0.1:6379 ESTABLISHED 8515/flexisip
tcp 0 0 127.0.0.1:39336 127.0.0.1:6379 ESTABLISHED 8515/flexisip
tcp 0 0 192.168.x.xxx:5070 39.122.226.44:63008 ESTABLISHED 8515/flexisip
tcp 0 0 192.168.x.xxx:5070 150.66.94.119:45470 ESTABLISHED 8515/flexisip
udp 0 0 0.0.0.0:10036 0.0.0.0:* 8515/flexisip
udp 0 0 0.0.0.0:10037 0.0.0.0:* 8515/flexisip
udp 0 0 0.0.0.0:10492 0.0.0.0:* 8515/flexisip
udp 0 0 0.0.0.0:10493 0.0.0.0:* 8515/flexisip
udp 0 0 0.0.0.0:3478 0.0.0.0:* 8515/flexisip
udp 0 0 192.168.x.xxx:5070 0.0.0.0:* 8515/flexisip