「Asterisk CLI」の版間の差分

提供: VoIP-Info.jp
移動先: 案内検索
("Asterisk CLI" を保護しました。: SPAM対策 [edit=autoconfirmed:move=autoconfirmed])
(コマンド解説)
 
(2人の利用者による、間の4版が非表示)
9行目: 9行目:
 
==ヘルプ==
 
==ヘルプ==
 
? で、その階層で使用できるコマンドの一覧が、helpでコマンドとその説明が表示される。<br>
 
? で、その階層で使用できるコマンドの一覧が、helpでコマンドとその説明が表示される。<br>
例えばsipコマンドなら
+
例えばpjsipコマンドなら
  *CLI> sip show ?
+
  *CLI> pjsip show ?
  channel       channels       domains        history        inuse
+
aor                    aors                  auth                  auths
  objects        peer           peers         registry      rt200ne
+
  channel               channels               channelstats          contact
  settings      subscriptions users          user
+
contacts              endpoint              endpoints              history
 +
identifiers            identifies            identify              qualify
 +
registration          registrations          scheduled_tasks       settings
 +
  subscription           subscriptions         transport              transport-monitors
 +
  transports            unidentified_requests version
 
上記のように表示される。?それ自体はエコーバックされない。
 
上記のように表示される。?それ自体はエコーバックされない。
 +
 
==コマンドの概念==
 
==コマンドの概念==
Asterisk 1.4系でトップのコマンドは以下の例のようになっている。
+
Asterisk 20系でトップのコマンドは以下の例のようになっている。
  *CLI> ?
+
  *CLI>
  !          abort      add        ael         agent      agi
+
  !             acl            aeap           ael           agi           aoc
  cdr        clear      convert    core       dahdi       database
+
  ari            bridge        cc            cdr           cel            channel
  debug       dialplan   dnsmgr     dont        dump        extensions
+
cli            confbridge    config         core           dahdi         database
  feature    file        group       help        http       iax2
+
  devstate       dialplan       dnsmgr         fax            features      file
include     indication  load        local       logger     manager
+
  group         http           indication     keys          local         logger
  meetme      mixmonitor  module      moh         no          originate
+
  malloc        manager        media          minivm        mixmonitor     module
  queue       realtime    reload      remove      restart    rtcp
+
  moh           no             parking        pjproject      pjsip         presencestate
rtp         say         set        show        sip        sla
+
  pri            realtime       rtcp           rtp           say           sorcery
  soft        stop        stun       transcoder udptl       unload
+
  stasis        stun           timing        transcoder     udptl         ulimit
  voicemail   zap
+
  voicemail     xmldoc
 
基本的に、トップのコマンドは「モジュール」の名称(機能)である。ただし、一部のコマンドに関してはモジュールに依存しておらず、Asterisk本体に組み込み。PBXコア部分の機能はcoreで始まるコマンドになる。<br>
 
基本的に、トップのコマンドは「モジュール」の名称(機能)である。ただし、一部のコマンドに関してはモジュールに依存しておらず、Asterisk本体に組み込み。PBXコア部分の機能はcoreで始まるコマンドになる。<br>
このコマンドはAsterisk 1.2まではきれいにモジュールに分けられていなかったのだが、1.4系から整理が始まり、1.6系ではモジュール単位に分割がかなり進んでいる。つまり、コマンドはモジュールに依存しているので、トップで使えるコマンドの数は読み込んでいるモジュールの数に依存する。例えばSIPチャネルを使用していない場合(chan_sipを読み込んでいない場合)には、sip コマンドは現れない。
+
このコマンドはAsterisk 1.2まではきれいにモジュールに分けられていなかったのだが、1.4系から整理が始まり、1.6系ではモジュール単位に分割がかなり進んだ。つまり、コマンドはモジュールに依存しているので、トップで使えるコマンドの数は読み込んでいるモジュールの数に依存する。例えばSIPチャネルを使用していない場合(chan_sipを読み込んでいない場合)には、sip コマンドは現れない。上記の例でもchan_sipは読み込まれておらず、sipコマンドは表示されないがpjsipコマンドは表示されている。
==コマンド解説==
 
*Asterisk 1.6系CLI
 
:[[Asterisk_1.6_CLI]]
 
:現在、整備中です。協力していただける方はぜひ執筆を。
 

2024年8月19日 (月) 06:22時点における最新版

Asterisk Command Line Interface
Asteriskの基本となる管理インタフェース。

CLIの起動と終了

Asteriskをバックグラウンドで起動している場合には

asterisk -vvvcr

のようにして接続する。
終了するにはCLIプロンプトで

*CLI> quit

ヘルプ

? で、その階層で使用できるコマンドの一覧が、helpでコマンドとその説明が表示される。
例えばpjsipコマンドなら

*CLI> pjsip show ?
aor                    aors                   auth                   auths
channel                channels               channelstats           contact
contacts               endpoint               endpoints              history
identifiers            identifies             identify               qualify
registration           registrations          scheduled_tasks        settings
subscription           subscriptions          transport              transport-monitors
transports             unidentified_requests  version

上記のように表示される。?それ自体はエコーバックされない。

コマンドの概念

Asterisk 20系でトップのコマンドは以下の例のようになっている。

*CLI>
!              acl            aeap           ael            agi            aoc
ari            bridge         cc             cdr            cel            channel
cli            confbridge     config         core           dahdi          database
devstate       dialplan       dnsmgr         fax            features       file
group          http           indication     keys           local          logger
malloc         manager        media          minivm         mixmonitor     module
moh            no             parking        pjproject      pjsip          presencestate
pri            realtime       rtcp           rtp            say            sorcery
stasis         stun           timing         transcoder     udptl          ulimit
voicemail      xmldoc

基本的に、トップのコマンドは「モジュール」の名称(機能)である。ただし、一部のコマンドに関してはモジュールに依存しておらず、Asterisk本体に組み込み。PBXコア部分の機能はcoreで始まるコマンドになる。
このコマンドはAsterisk 1.2まではきれいにモジュールに分けられていなかったのだが、1.4系から整理が始まり、1.6系ではモジュール単位に分割がかなり進んだ。つまり、コマンドはモジュールに依存しているので、トップで使えるコマンドの数は読み込んでいるモジュールの数に依存する。例えばSIPチャネルを使用していない場合(chan_sipを読み込んでいない場合)には、sip コマンドは現れない。上記の例でもchan_sipは読み込まれておらず、sipコマンドは表示されないがpjsipコマンドは表示されている。