linphonec, linphonecshコマンドによる各操作




OrangePi PC:Ubuntu Bionic with Armbian Linux 4.19.62-sunxi
linphone-nogtk:version: 3.6.1

インストール後Linphoneを起動するとコマンドプロンプトが表示されるので、使用条件などをコマンドで入力します。使用条件を反映した設定ファイル(不可視ファイル “.linphonerc” )が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.


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.


linphonec> help register
register <sip identity> <sip proxy> <password>


linphonec > register user100 user100_password



$ linphonecsh
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"
	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 user100 user100_password"


$ linphonecsh exit


$ linphonecsh init -c /home/user/.linphonerc


$ linphonecsh status register
registered, duration=3600

本家Linphone - Belledonne Communications提供のSIPサーバは頻繁にアップデートしているためか、現在デフォルトのTLS接続によるユーザ認証ができない不具合が発生しているようです。


$ linphonecsh exit

設定ファイル .linphonerc 内 [sip] セクションに以下追加

$ nano /home/xxx/.linphonerc


$ linphonecsh init -c /home/user/.linphonerc