Asterisk на linux команды

Asterisk CLI

The Asterisk server has to be running in the background for the CLI to start.

Page Contents

  • General commands
  • Server management
  • AGI commands
  • Database handling commands
  • IAX Channel commands
  • H323 channel commands
  • SIP channel commands
  • Zap channel commands
  • Console channel commands
  • MGCP channel commands
  • skinny channel commands
  • CAPI channel commands
  • Sirrix ISDN channel commands
  • Batch files with CLI
  • See also

If you want to run a CLI command in a shell script, use the x option

asterisk -rx “logger reload”

For help in the CLI mode, use the core show help command (formerly help). To get help on various applications you can use in the extensions.conf config file, use the core show applications command (formerly show applications).

General commands

  • ! : Executes a given shell command
  • abort halt: Cancel a running halt
  • add extension: Add new extension into context
  • add ignorepat: Add new ignore pattern
  • add indication: Add the given indication to the country
  • agent show: Show status of Asterisk Agents
  • debug channel: Enable debugging on a channel
  • dont include: Remove a specified include from context
  • help: Display help list, or specific help on a command
  • include context: Include context in another context
  • load: Load a dynamic module by name
  • logger reload: Reopen log files. Use after rotating the log files.
  • mixmonitor : Execute a MixMonitor command.
  • no debug channel: Disable debugging on a channel
  • originate: originate a call.
  • remove extension: Remove a specified extension
  • remove ignorepat: Remove ignore pattern from context
  • remove indication: Remove the given indication from the country
  • save dialplan: Overwrites your current extensions.conf file with an exported version based on the current state of the dialplan. A backup copy of your old extensions.conf is not saved. The initial values of global variables defined in the [globals] category retain their previous initial values; the current values of global variables are not written into the new extensions.conf. Using “save dialplan” will result in losing any comments in your current extensions.conf.
  • dialplan save (1.4): BROKEN, doesn’t parse correctly. Overwrites your current extensions.conf file with an exported version based on the current state of the dialplan. A backup copy of your old extensions.conf is not saved. The initial values of global variables defined in the [globals] category retain their previous initial values; the current values of global variables are not written into the new extensions.conf. Using “save dialplan” will result in losing any comments in your current extensions.conf.
  • set verbose: Set level of verboseness
  • show applications: Shows registered applications
  • show application: Describe a specific application
  • show channel: Display information on a specific channel
  • show channels: Display information on channels
  • show codecs: Display information on codecs
  • show conferences: Show status of conferences
  • show dialplan: Show dialplan
  • show hints: Show registered hints
  • show image formats: Displays image formats
  • show indications: Show a list of all country/indications
  • show locals: Show status of local channels
  • show manager command: Show manager commands
  • show manager connect: Show connected manager users
  • show parkedcalls: Lists parked calls
  • show queues: Show status of queues, see details here
  • show switches: Show alternative switches
  • show translation: Display translation matrix
  • soft hangup: Request a hangup on a given channel – in Asterisk 1.6.2: “channel request hangup ”
  • show voicemail users: List defined voicemail boxes
  • show voicemail zones: List zone message formats
  • devstate change: Change state of a custom device (new in Asterisk 1.6.0)

Server management

  • restart gracefully: Restart Asterisk gracefully, i.e. stop receiving new calls and restart at empty call volume
  • restart now: Restart Asterisk immediately
  • restart when convenient: Restart Asterisk at empty call volume
  • reload: Reload configuration
  • stop gracefully: Gracefully shut down Asterisk, i.e. stop receiving new calls and shut down at empty call volume
  • stop now: Shut down Asterisk immediately
  • stop when convenient: Shut down Asterisk at empty call volume
  • dialplan reload: Reload extensions and only extensions (formerly extensions reload)
  • unload: Unload a dynamic module by name
  • show modules: List modules and info about them
  • show uptime: Show uptime information
  • show version: Display Asterisk version info

AGI commands

  • show agi: Show AGI commands or specific help
  • dump agihtml: Dumps a list of agi command in html format

Database handling commands

  • database del: Removes database key/value
  • database deltree: Removes database keytree/values
  • database get: Gets database value
  • database put: Adds/updates database value
  • database show: Shows database contents
  • database showkey: Shows database contents: An alternative to showing keys by family with database show, this command shows all the families with a particular key

IAX Channel commands

  • iax2 debug: Enable IAX debugging
  • iax2 no debug: Disable IAX debugging
  • iax2 set jitter: Sets IAX jitter buffer
  • iax2 show cache: Display IAX cached dialplan
  • iax2 show channels: Show active IAX channels
  • iax2 show netstats: Show network and jitter buffer statistics for active IAX calls
  • iax2 show peers: Show defined IAX peers
  • iax2 show registry: Show IAX registration status
  • iax2 show stats: Display IAX statistics
  • iax2 show users: Show defined IAX users
  • iax2 trunk debug: Request IAX trunk debug
  • iax debug: Enable IAX debugging
  • iax no debug: Disable IAX debugging
  • iax set jitter: Sets IAX jitter buffer
  • iax show cache: Display IAX cached dialplan
  • iax show channels: Show active IAX channels
  • iax show peers: Show defined IAX peers
  • iax show registry: Show IAX registration status
  • iax show stats: Display IAX statistics
  • iax show users: Show defined IAX users
  • init keys: Initialize RSA key passcodes
  • show keys: Displays RSA key information

H323 channel commands

  • h.323 debug: Enable chan_h323 debug
  • h.323 gk cycle: Manually re-register with the Gatekeper
  • h.323 hangup: Manually try to hang up a call
  • h.323 no debug: Disable chan_h323 debug
  • h.323 no trace: Disable H.323 Stack Tracing
  • h.323 show codecs: Show enabled codecs
  • h.323 show tokens: Manually try to hang up a call
  • h.323 trace: Enable H.323 Stack Tracing

SIP channel commands

Оцените статью
Adblock
detector