Book Image

Elastix Unified Communications Server Cookbook

Book Image

Elastix Unified Communications Server Cookbook

Overview of this book

Table of Contents (24 chapters)
Elastix Unified Communications Server Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Description and Use of the Most Well-known FreePBX Modules
Addon Market Module
Asterisk Essential Commands
Asterisk Gateway Interface Programming
Helpful Linux Commands
Index

Appendix C. Asterisk Essential Commands

The following table shows the list of commands we can execute in Asterisk's Command Line Interface (CLI).

  • The easiest way to connect to Asterisk's CLI is by typing the command asterisk -r in the Linux command line console.

  • We can even execute Asterisk commands outside the CLI by typing asterisk -rx command, where command is the Asterisk command we want to execute.

The following table shows the most-used commands available in Asterisk's CLI. A complete list of commands can be seen by typing core show help in the CLI.

Command

Description

agent show

This shows the status of agents.

agent show online

This shows all online agents

agi set debug

This enables/disables AGI debugging.

agi show commands

This lists AGI commands or specific help.

cdr show status

This displays the CDR status.

channel request hangup

This requests a hangup on a given channel.

core reload

The performs a global reload.

core restart gracefully

This restarts Asterisk gracefully.

core restart now

This restarts Asterisk immediately.

core restart when convenient

This restarts Asterisk at empty call volume.

core set debug channel

This enables/disables debugging on a channel.

core show codecs

This displays a list of codecs.

core show codec

This shows a specific codec.

core show help

This displays the help list or specific help for a command.

core show hints

This shows dialplan hints.

core show uptime [seconds]

This shows uptime information.

core show version

This displays version information.

core stop gracefully

This gracefully shuts down Asterisk.

core stop now

This shuts down Asterisk immediately.

core stop when convenient

This shuts down Asterisk at empty call volume.

dahdi show channels

This shows active DAHDI channels.

dahdi show status

This shows all DAHDI card statuses.

database del

This removes database key/values.

database deltree

This removes database keytree/values.

database get

This gets the database values.

database put

This adds/updates database values.

database show

This shows database contents.

database showkey

This shows database contents.

dialplan reload

This reloads extensions and *only* extensions.

dundi show peers

This shows defined dundi peers.

features reload

This reloads configured features.

hangup request

This requests a channel hangup.

help

<no description required>.

iax2 reload

This reloads IAX configuration.

iax2 set debug

This enables/disables IAX debugging.

iax2 show channels

This lists active IAX channels.

iax2 show peers

This lists defined IAX peers.

iax2 show registry

This displays IAX registration status.

logger reload

This reopens the log files.

logger rotate

This rotates and reopens the log files.

logger set level

This enables/disables a specific logging level for this console.

logger show channels

This lists configured log channels.

manager reload

This reloads manager configurations.

manager set debug

This shows, enables, and disables debugging of the manager code.

manager show command

This shows a manager interface command.

manager show commands

This lists manager interface commands.

manager show connected

This lists connected manager interface users.

manager show eventq

This lists manager interface queued events.

manager show settings

This shows manager global settings.

manager show users

This lists configured manager users.

manager show user

This displays information on a specific manager user.

meetme list [concise]

This lists all or one conference.

mfcr2 call files

This enables/disables MFC/R2 call files.

mfcr2 set blocked

This resets MFC/R2 channel, forcing it to BLOCKED.

mfcr2 set debug

This sets MFC/R2 channel logging level.

mfcr2 set idle

This resets MFC/R2 channel, forcing it to IDLE.

mfcr2 show channels

This shows MFC/R2 channels.

mfcr2 show variants

This shows supported MFC/R2 variants.

mfcr2 show version

This shows OpenR2 library version.

pri service disable channel

This removes a channel from service.

pri service enable channel

This returns a channel to service.

pri set debug

This enables PRI debugging on a span.

pri set debug file

This sends PRI debug output to the specified file.

pri show channels

This displays PRI channel information.

pri show debug

This displays current PRI debug settings.

pri show spans

This displays PRI span information.

pri show span

This displays PRI span information.

pri show version

This displays libpri version.

queue add member

This adds a channel to a specified queue.

queue reload

This reloads queues, members, queue rules, or parameters.

queue remove member

This removes a channel from a specified queue.

queue reset stats

This resets statistics for a queue.

queue set penalty

This sets penalty for a channel of a specified queue.

queue show

This shows status of a specified queue.

queue {pause/unpause} member

This pauses or unpauses a queue member.

queue show rules

This shows the rules defined in queuerules.conf.

reload

This reloads Asterisk's configuration.

sip notify

This sends a notify packet to a SIP peer.

sip prune realtime

This prunes cached realtime users/peers.

sip qualify peer

This sends an "options" packet to a peer.

sip reload

This reloads SIP configuration.

sip set debug

This enables/disables SIP debugging.

sip set history

This enables/disables SIP history.

sip show

This lists active SIP channels or subscriptions.

sip show channelstats

This lists statistics for active SIP channels.

sip show channel

This shows detailed SIP channel information.

sip show domains

This lists local SIP domains.

sip show history

This shows SIP dialog history.

sip show inuse

This lists all in use/limits.

sip show mwi

This shows MWI subscriptions.

sip show objects

This lists all SIP object allocations.

sip show peers

This lists defined SIP peers.

sip show peer

This shows details of a specific SIP peer.

sip show registry

This lists the SIP registration status.

sip show sched

This presents a report on the status of the scheduler queue.

sip show settings

This shows SIP global settings.

sip show tcp

This lists TCP connections.

sip show users

This lists the defined SIP users.

sip show user

This shows details of a specific SIP user

sip unregister

This unregisters (forces expiration) a SIP peer from the registry.

voicemail reload

This reloads voicemail configuration.

voicemail show users

This lists defined voicemail boxes.

Tip

To learn more about Asterisk's CLI, please visit https://wiki.asterisk.org/wiki/display/AST/Connecting+to+the+CLI.