コマンドラインツールはlinphone-cliへ移行
linphone-cli
https://pkgs.org/download/linphone-cli
linphone-nogtk:コマンドラインツールによる設定ファイルの作成
Linphoneをバージョンアップする毎に以前の設定ファイルを引継いで使用してきましたが、バージョンアップ後、ディスコンの設定事項に起因するエラーが発生したため、やはりバージョンごとに新規に設定ファイルを作成した方がいいようです。
インストール環境
OrangePi PC:Ubuntu Bionic with Armbian Linux 4.19.62-sunxi
linphone-nogtk:version: 3.6.1
コマンドのみでLinphoneを制御するため、linphone-nogtkをインストールします。
インストール後Linphoneを起動するとコマンドプロンプトが表示されるので、使用条件などをコマンドで入力します。使用条件を反映した設定ファイル(不可視ファイル “.linphonerc” )がlinphone起動ディレクトリに作成されます。再起動後は、この設定ファイルが自動的に読み込まれます。
linphonecとlinphonecshコマンドについて
linphonecコマンド
linphonecコマンドはLinphpneの起動コマンドで、Linphone起動後のコマンドプロンプトにより、メッセージ・コール送受信、ユーザ認証、条件設定などを実行します。
$ linphonec
コマンド一覧
linphonec> help
Commands are:
---------------------------
help Print commands help.
call Call a SIP uri or number
calls Show all the current calls with their id and status.
chat Chat with a SIP uri
terminate Terminate a call
answer Answer a call
pause pause a call
resume resume a call
transfer Transfer a call to a specified destination.
conference Create and manage an audio conference.
mute Mute microphone and suspend voice transmission.
camera Send camera output for current call.
unmute Unmute microphone and resume voice transmission.
playbackga Adjust playback gain.
duration Print duration in seconds of the last call.
autoanswer Show/set auto-answer mode
proxy Manage proxies
soundcard Manage soundcards
webcam Manage webcams
ipv6 Use IPV6
nat Set nat address
stun Set stun server address
firewall Set firewall policy
call-logs Calls history
friend Manage friends
play play a wav file
record record to a wav file
quit Exit linphonec
---------------------------
Type 'help <command>' for more details or
'help advanced' to list additional commands.
advancedコマンド一覧
linphonec> help advanced
Advanced commands are:
---------------------------
codec Audio codec configuration
vcodec Video codec configuration
ec Echo cancellation
el Echo limiter
nortp-on-a Set the rtp_no_xmit_on_audio_mute configuration parameter
vwindow Control video display window
pwindow Control local camera video display (preview window)
snapshot Take a snapshot of currently received video stream
vfureq Request the other side to send VFU for the current call
states Show internal states of liblinphone, registrations and calls, according to linphonecore.h definitions
register Register in one line to a proxy
unregister Unregister from default proxy
status Print various status information
ports Network ports configuration
param parameter set or read as normally given in .linphonerc
speak Speak a sentence using espeak TTS engine
staticpic Manage static pictures when nowebcam
identify Returns the user-agent string of far end
ringback Specifies a ringback tone to be played to remote end during incoming calls
redirect Redirect an incoming call
zrtp-set-v Set ZRTP SAS verified.
zrtp-set-u Set ZRTP SAS not verified.
---------------------------
Type 'help <command>' for more details.
ユーザ認証する場合(事前のユーザ登録はLinphoneのホームページで行います)
linphonec> help register
register <sip identity> <sip proxy> <password>
ex)
linphonec > register sip:user100@sip.linphone.org sip.linphone.org user100_password
linphonecshコマンド
linphonecshコマンドは、バックグラウンドで稼働しているLinphoneを通常のコマンドシェルから制御する場合に使用します。
$ linphonecsh
Usage:
linphonecsh <action> [arguments]
where action is one of
init : spawn a linphonec daemon (first step to make other actions)
followed by the arguments sent to linphonec
generic : sends a generic command to the running linphonec daemon
followed by the generic command surrounded by quotes,
for example "call sip:joe@example.net"
register : register; arguments are
--host <host>
--username <username>
--password <password>
unregister: unregister
dial : dial <sip uri or number>
status : can be 'status register', 'status autoanswer' or 'status hook'
soundcard: can be 'soundcard capture', 'soundcard playback', 'soundcard ring',
followed by an optional number representing the index of the soundcard,
in which case the soundcard is set instead of just read.
exit : make the linphonec daemon to exit.
ユーザ認証する場合
$ linphonecsh generic "register sip:user100@sip.linphone.org sip.linphone.org user100_password"
バックグラウンドで動作しているlinphoneを停止
$ linphonecsh exit
設定ファイルを指定してバックグラウンド(デーモン)起動
$ linphonecsh init -c /home/user/.linphonerc
ステータス確認
$ linphonecsh status register
registered, identity=sip:xxxxx@sip.linphone.org duration=3600