CLI Commands 482

Quick reference for commonly used Asterisk CLI commands.

Explore other reference groups

Tags: All cli 482 debugging 1 console 1 commands 1 reference 1
Cheat Sheet
Select 2-6 entries:
A
acl show Shows a list of named ACLs or lists all entries in a given named ACL. aeap show client Show the AEAP settings for a given client aeap show clients Show all configured AEAP clients ael reload Reloads AEL configuration. ael set debug {read|tokens|contexts|off} Enable AEL read, token, or context debugging, or disable all AEL debugging messages. agent logoff Sets an agent as no longer logged in. agent show Show information about the <agent-id> agent agent show all Provides summary information for all agents. agent show online Provides summary information for logged in agents. agi dump html Dumps the AGI command list in HTML format to the given file. agi exec Add AGI command to the execute queue of the specified channel in Async AGI agi set debug [on|off] Enables/disables dumping of AGI transactions for debugging purposes. agi show commands [topic] When called with a topic as an argument, displays usage information on the given command. aoc set debug ari mkpasswd Encrypts a password for use in ari.conf Be aware that the password will be shown in the command line... ari set debug Enable or disable debugging on a specific application. ari show app Provide detailed information about a registered application. ari show apps Lists all registered applications. ari show outbound-websocket Shows a specific ARI outbound websocket ari show outbound-websockets Shows all ARI outbound-websockets ari show status Shows all ARI settings ari show user Shows a specific ARI user ari show users Shows all ARI users ari show websocket sessions Shows all ARI websocket sessions ari shutdown websocket session Shuts down ARI websocket session ari shutdown websocket sessions Shuts down all ARI websocket sessions ari start outbound-websocket Starts a specific ARI outbound websocket astobj2 container check Perform a container integrity check on <name>. astobj2 container dump Show contents of the container <name>. astobj2 container stats Show statistics about the specified container <name>. astobj2 show stats Show astobj2 show stats astobj2 test Runs astobj2 test.
C
CLI Commands Quick Reference Quick reference for commonly used Asterisk CLI commands -- PJSIP, dialplan, channel, system, voicema... calendar dump sched Dump the calendar sched context calendar show calendar Displays information about a calendar calendar show calendars Lists all registered calendars. calendar show types Lists all registered calendars types. cc cancel [core|all] core ID equal to the specified core ID. cc report status Report the current status of any ongoing CC transactions cdr set debug [on|off] Enable or disable extra debugging in the CDR Engine. cdr show active Displays a summary of all Call Detail Records when [channel] is omitted; displays all of the Call De... cdr show pgsql status Shows current connection status for cdr_pgsql cdr show status Displays the Call Detail Record engine system status. cdr submit Posts all pending batched CDR data to the configured CDR backend engine modules. cel show status Displays the Channel Event Logging system status. channel dump frames List all frames queued to a channel. channel originate There are two ways to use this command. channel redirect Redirect an active channel to a specified extension. channel request hangup Request that one or more channels be hung up. cli check permissions Check permissions config for a user@group or list the allowed commands for the specified user. cli reload permissions Reload the 'cli_permissions.conf' file. cli show aliases Displays a list of aliased CLI commands. cli show permissions Shows CLI configured permissions. confbridge kick Kicks a channel out of the conference bridge. confbridge list Lists all currently active conference bridges or a specific conference bridge. confbridge lock Lock a conference. confbridge mute Mute a channel in a conference. confbridge record start <file> is optional, Otherwise the bridge profile record file will be used. confbridge record stop Stop a previously started recording. confbridge show menu confbridge show menus confbridge show profile bridge confbridge show profile bridges confbridge show profile user confbridge show profile users confbridge unlock Unlock a previously locked conference. confbridge unmute Unmute a channel in a conference. config list Show all modules that have loaded a configuration file config reload Reloads all modules that reference <filename.conf> config show help Display detailed information about module configuration. console answer Answers an incoming call on the console channel. console dial Dials a given extension (and context if specified) console flash Flashes the call currently placed on the console. console hangup Hangs up any call currently placed on the console. console list available List all available devices. console list devices List all configured devices. console send text Sends a text message for display on the remote terminal. console {mute|unmute} Mute/unmute the microphone. console {set|show} active Set or show the active console device for the Asterisk CLI. console {set|show} autoanswer [on|off] Enables or disables autoanswer feature. core abort shutdown Causes Asterisk to abort an executing shutdown or restart, and resume normal call operations. core clear profile clear profile information core eat memory Eats all available memory so you can test if the system survives core ping taskprocessor Displays the time required for a task to be processed core reload Execute a global reload. core reset taskprocessor Resets stats for the specified taskprocessor core reset taskprocessors Resets stats for all taskprocessors core restart gracefully Causes Asterisk to stop accepting new calls and exec() itself performing a cold restart when all act... core restart now Causes Asterisk to hangup all calls and exec() itself performing a cold restart. core restart when convenient Causes Asterisk to perform a cold restart when all active calls have ended. core set debug core set debug off core set debug category core set debug category off [<category> [<category>] ...] core set debug channel Enables/disables debugging on all or on a specific channel. core set trace core set trace off core set verbose core set verbose off core show application Describes a particular application. core show applications [like|describing] List applications which are currently available. core show calls [uptime] Lists number of currently active calls and total number of calls processed through PBX since last re... core show channel Shows lots of information about the specified channel. core show channels [concise|verbose|count] Lists currently defined channels and some information about them. core show channeltype Show details about the specified channel type, <name>. core show channeltypes Lists available channel types registered in your Asterisk server. core show codec Displays codec mapping core show codecs [audio|video|image|text] Displays codec mapping core show config mappings Shows the filenames to config engines. core show device2extenstate Lists device state to extension state combinations. core show fd List all file descriptors currently in use and where each was opened, and with what command. core show file formats Displays currently registered file formats (if any). core show function Describe a particular dialplan function. core show functions [like] List builtin functions, optionally only those matching a given string core show hanguphandlers Show hangup handlers of a specified channel. core show hanguphandlers all Show hangup handlers for all channels. core show help When called with a topic as an argument, displays usage information on the given command. core show hint List registered hint. core show hints List registered hints. core show image formats Displays currently registered image formats (if any). core show license Shows the license(s) for this copy of Asterisk. core show locks This command is for lock debugging. core show profile show profile information core show settings Show core misc settings core show sound Shows information about the specified sound. core show sounds Shows a listing of sound files available on the system. core show switches List registered switches core show sysinfo List current system information. core show taskprocessor alerted subsystems Shows a list of task processor subsystems that are currently alerted core show taskprocessor name Displays detailed information about a specific taskprocessor, including all queued tasks and their o... core show taskprocessors [like] Shows a list of instantiated task processors and their statistics core show threads List threads currently active in the system. core show translation as the chart is being displayed. core show uptime [seconds] Shows Asterisk uptime information. core show version Shows Asterisk version information. core show warranty Shows the warranty (if any) for this copy of Asterisk. core stop gracefully Causes Asterisk to not accept new calls, and exit when all active calls have terminated normally. core stop now Shuts down a running Asterisk immediately, hanging up all active calls . core stop when convenient Causes Asterisk to perform a shutdown when all active calls have ended. core waitfullybooted Wait until Asterisk has fully booted. corosync ping Send a test ping to the cluster. corosync show config Show configuration loaded from res_corosync.conf corosync show members Show corosync cluster members
D
dahdi create channels dahdi create channels new - add channels not yet created For ISDN and SS7 the range should include c... dahdi destroy channels DON'T USE THIS UNLESS YOU KNOW WHAT YOU ARE DOING. dahdi restart Restarts the DAHDI channels: destroys them all and then re-reads them from chan_dahdi.conf. dahdi set dnd Sets/resets DND (Do Not Disturb) mode on a channel. dahdi set hwgain {rx|tx} Sets the hardware gain on a given channel and overrides the value provided at module loadtime. dahdi set mwi Sets/unsets MWI (Message Waiting Indicator) manually on a channel. dahdi set swgain {rx|tx} Sets the software gain on a given channel and overrides the value provided at module loadtime. dahdi show cadences Shows all cadences currently defined dahdi show channel Detailed information about a given channel dahdi show channels [group|context] Shows a list of available channels with optional filtering <group> must be a number between 0 and 63 dahdi show status Shows a list of DAHDI cards with status dahdi show version Shows the DAHDI version in use database del Deletes an entry in the Asterisk database for a given family and key. database deltree separated by either a space or a slash. database get Retrieves an entry in the Asterisk database for a given family and key. database put Adds or updates an entry in the Asterisk database for a given family, key, and value. database query Run a user-specified SQL query on the database. database show may be separated either by a space or by a slash. database showkey Shows Asterisk database contents, restricted to a given key. devstate change Change a custom device to a new state. devstate list List all custom device states that have been set by using the DEVICE_STATE dialplan function. dialplan add extension This command will add the new extension into <context>. dialplan add ignorepat This command adds a new ignore pattern into context <context> dialplan add include Include a context in another context. dialplan debug Show dialplan context Trie(s). dialplan eval function Evaluate a dialplan function call A dummy channel is used to evaluate the function call, so only glo... dialplan exec application Execute a single dialplan application call for testing. dialplan locks show List all locks known to func_lock, along with their current status. dialplan reload Reload extensions.conf without reloading any other modules. dialplan remove context Removes all extensions from a specified context. dialplan remove extension Remove an extension from a given context. dialplan remove ignorepat This command removes an ignore pattern from context <context> dialplan remove include Remove an included context from another context. dialplan save Save dialplan created by pbx_config module. dialplan set chanvar Set channel variable <varname> to <value> dialplan set extenpatternmatchnew false Use the NEW extension pattern matching algorithm, true or false. dialplan set extenpatternmatchnew true Use the NEW extension pattern matching algorithm, true or false. dialplan set global Set global dialplan variable <name> to <value> dialplan show Show dialplan dialplan show chanvar List current channel variables and their values dialplan show globals List current global dialplan variables and their values dnsmgr refresh Performs an immediate refresh of the managed DNS entries. dnsmgr reload Reloads the DNS manager configuration. dnsmgr status Displays the DNS manager status. dundi flush [stats] Flushes DUNDi answer cache, used primarily for debug. dundi lookup Lookup the given number within the given DUNDi context (or e164 if none is specified). dundi precache Lookup the given number within the given DUNDi context (or e164 if none is specified) and precaches ... dundi query Attempts to retrieve contact information for a specific DUNDi entity identifier (EID) within a given... dundi set debug {on|off} Enables/Disables dumping of DUNDi packets for debugging purposes dundi show cache Lists all DUNDi cache entries. dundi show entityid Displays the global entityid for this host. dundi show hints Lists all DUNDi 'DONTASK' hints in the cache. dundi show mappings Lists all known DUNDi mappings. dundi show peer Provide a detailed description of a specifid DUNDi peer. dundi show peers [registered|include|exclude|begin] Lists all known DUNDi peers. dundi show precache Lists all known DUNDi scheduled precache updates. dundi show requests Lists all known pending DUNDi requests. dundi show trans Lists all known DUNDi transactions. dundi store history {on|off} Enables/Disables storing of DUNDi requests and times for debugging purposes
I
iax2 provision Provisions the given peer or IP address using a template matching either 'template' or '*' if the te... iax2 prune realtime Prunes object(s) from the cache iax2 reload Reloads IAX configuration from iax.conf iax2 set debug jb {on|off} Enables/Disables jitterbuffer debugging information iax2 set debug trunk {on|off} Enables/Disables debugging of IAX trunking iax2 set debug {on|off|peer} Enables/Disables dumping of IAX packets for debugging purposes. iax2 set mtu Set the system-wide IAX IP mtu to <value> bytes net or zero to disable. iax2 show cache Display currently cached IAX Dialplan results. iax2 show callnumber usage Shows current IP addresses which are consuming iax2 call numbers iax2 show channels Lists all currently active IAX channels. iax2 show firmware Lists all known IAX firmware images. iax2 show netstats Lists network status for all currently active IAX channels. iax2 show peer Display details on specific IAX peer iax2 show peers Lists all known IAX2 peers. iax2 show provisioning Lists all known IAX provisioning templates or a specific one if specified. iax2 show registry Lists all registration requests and status. iax2 show stats Display statistics on IAX channel driver. iax2 show threads Lists status of IAX helper threads iax2 show users [like] Lists all known IAX2 users. iax2 test jitter For testing, simulate maximum jitter of +/- <ms> on <pct> percentage of packets. iax2 test late For testing, count the next frame as <ms> ms late iax2 test losspct For testing, throws away <percentage> percent of incoming packets iax2 test resync For testing, adjust all future frames by <ms> ms iax2 unregister Unregister (force expiration) an IAX2 peer from the registry. indication add Add the given indication to the country. indication remove Remove the given indication from the country. indication show Display either a condensed summary of all countries and indications, or a more verbose list of indic...
M
malloc trim Try to give excess memory back to the OS. manager kick session Kick an active Asterisk Manager Interface session manager reload Reloads the manager configuration. manager set debug [on|off] Show, enable, disable debugging of the manager code. manager show command Shows the detailed description for a specific Asterisk manager interface command. manager show commands Prints a listing of all the available Asterisk manager interface commands. manager show connected Prints a listing of the users that are currently connected to the Asterisk manager interface. manager show event Provides a detailed description a Manager interface event. manager show eventq Prints a listing of all events pending in the Asterisk manger event queue. manager show events Prints a listing of the available Asterisk manager interface events. manager show settings Provides detailed list of the configuration of the Manager. manager show user Display all information related to the manager user specified. manager show users Prints a listing of all managers that are currently configured on that system. media cache create Create an item in the media cache by associating a local media file with some URI. media cache delete Delete an item from the media cache. media cache refresh Ask for a refresh of a particular URI. media cache show Display all information about a particular item in the media cache. media cache show all Display a summary of all current items in the media cache. meetme kick Kick a conference or a user in a conference. meetme list List all conferences or a specific conference. meetme {lock|unlock} Lock or unlock a conference to new users. meetme {mute|unmute} Mute or unmute a conference or a user in a conference. memory atexit list {on|off} Enable dumping a list of still allocated memory segments at exit. memory atexit summary {off|byline|byfunc|byfile} Summary of still allocated memory segments at exit options. memory backtrace {on|off} Enable dumping an allocation backtrace with memory diagnostics. memory show allocations Dumps a list of segments of allocated memory. memory show summary Summarizes heap memory allocations by file, or optionally by line if a file is specified. mfcr2 call files [on|off] Enable call files creation on the specified channel. mfcr2 destroy link Destroys D-channel of link and its B-channels. mfcr2 set blocked DON'T USE THIS UNLESS YOU KNOW WHAT YOU ARE DOING. mfcr2 set debug Set a new logging level for the specified channel. mfcr2 set idle DON'T USE THIS UNLESS YOU KNOW WHAT YOU ARE DOING. mfcr2 show channels [group|context] Shows the DAHDI channels configured with MFC/R2 signaling. mfcr2 show links Shows the DAHDI MFC/R2 links. mfcr2 show variants Shows the list of MFC/R2 variants supported. mfcr2 show version Shows the version of the OpenR2 library being used. minivm list accounts [for] Lists all mailboxes currently set up minivm list templates Lists message templates for e-mail, paging and IM minivm list zones Lists zone message formats minivm reload Reload mini-voicemail configuration and reset statistics minivm show settings Display Mini-Voicemail general settings minivm show stats Display Mini-Voicemail counters mixmonitor {start|stop|list} The optional arguments are passed to the MixMonitor application. mobile cusd Send cusd <command> to the rfcomm port on the device with the specified <device ID>. mobile rfcomm Send <command> to the rfcomm port on the device with the specified <device ID>. mobile search Searches for Bluetooth Cell / Mobile devices in range. mobile show devices Shows the state of Bluetooth Cell / Mobile devices. module load Loads the specified module into Asterisk. module refresh Unloads and loads the specified module into Asterisk. module reload Reloads configuration files for all listed modules which support reloading, or for all supported mod... module show [like] Shows Asterisk modules currently in use, and usage statistics. module unload Unloads the specified module from Asterisk. moh reload Reloads the MusicOnHold module. moh show classes Lists all MusicOnHold classes. moh show files Lists all loaded file-based MusicOnHold classes and their files. moh unregister class Unregisters a realtime moh class. mwi delete all Delete all external MWI mailboxes. mwi delete like Delete external MWI mailboxes matching a regular expression. mwi delete mailbox Delete a specific external MWI mailbox. mwi list all List all external MWI mailboxes. mwi list like List external MWI mailboxes matching a regular expression. mwi show mailbox Show a specific external MWI mailbox. mwi update mailbox Update a specific external MWI mailbox.
P
parking show Shows a list of parking lots or details of a specific parking lot. phoneprov show routes Lists all registered phoneprov http routes. pjproject set log level {default|0|1|2|3|4|5|6} Set the maximum active pjproject logging level. pjproject show buildopts Show the compile time config of the pjproject that Asterisk is running against. pjproject show log level Show the current maximum active pjproject logging level. pjproject show log mappings Show pjproject to Asterisk log mappings pjsip dump endpt [details] Dump the res_pjsip endpt internals. pjsip export config_wizard primitives [to] Export the config_wizard objects as pjsip primitives to the console or to <filename> pjsip list ciphers List available OpenSSL cipher names. pjsip list subscriptions {inbound|outbound} [like] The regex selects output lines that match. pjsip qualify Send a SIP OPTIONS request to all contacts on the endpoint. pjsip reload qualify aor Synchronize the PJSIP Aor qualify options. pjsip reload qualify endpoint Synchronize the qualify options for all Aors on the PJSIP endpoint. pjsip send notify Send a NOTIFY request to an endpoint Message types are defined in pjsip_notify.conf pjsip send register Unregisters the specified (or all) outbound registration(s) then starts registration(s) and schedule... pjsip send unregister Unregisters the specified (or all) outbound registration(s) and stops future registration attempts. pjsip set history {on|off|clear} Enables/disables/clears the PJSIP history. pjsip set logger {on|off|host|add|method|methodadd|verbose|pcap} Enables or disabling logging of SIP packets read on ports bound to PJSIP transports either globally ... pjsip show history Displays the currently collected history or an entry within the history. pjsip show identifiers List all registered endpoint identifiers pjsip show qualify aor Show the PJSIP Aor current qualify options. pjsip show qualify endpoint Show the current qualify options for all Aors on the PJSIP endpoint. pjsip show scheduled_tasks Show scheduled pjsip tasks pjsip show settings Show global and system configuration options pjsip show subscription {inbound|outbound} pjsip show subscriptions {inbound|outbound} [like] The regex selects a subscriptions output that matches. pjsip show transport-monitors Show pjsip transport monitors pjsip show version Show the version of pjproject that res_pjsip is running against presencestate change Change a custom presence to a new state. presencestate list List all custom presence states that have been set by using the PRESENCE_STATE dialplan function. pri destroy span Destroys D-channel of span and its B-channels. pri service disable channel Send an AT&T / NFAS / CCS ANSI T1.607 maintenance message to remove a channel from service, with opt... pri service enable channel Send an AT&T / NFAS / CCS ANSI T1.607 maintenance message to restore a channel to service, with opti... pri set debug file Sends PRI debug output to the specified output file pri set debug {on|off|hex|intense|0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15} span Enables debugging on a given PRI span Level is a bitmap of the following values: 1 General debugging... pri show channels Displays PRI channel information such as the current mapping of DAHDI B channels to Asterisk channel... pri show debug Show the debug state of pri spans pri show span Displays PRI Information on a given PRI span pri show spans Displays PRI span information pri show version Show libpri version information prometheus show metrics Displays the current metrics and their values, without counting as an actual scrape. prometheus show status Displays the status of metrics collection.
S
say load [new|old] skel show config List app_skel global config skel show games List app_skel active games skel show levels List the app_skel levels sla show stations This will list all stations defined in sla.conf sla show trunks This will list all trunks defined in sla.conf sorcery memory cache dump Dump a list of the objects within the cache, listed by object identifier. sorcery memory cache expire Expire a specific object or ALL objects within a sorcery memory cache. sorcery memory cache populate Expire all objects in the cache and populate it with ALL objects from backend. sorcery memory cache show Show sorcery memory cache configuration and statistics. sorcery memory cache stale Mark a specific object or ALL objects as stale in a sorcery memory cache. sorcery show settings Show global configuration options ss7 mtp3 Send a NET MNG message WARNING!!! ss7 reset cic Send a RSC for the given CIC on the specified linkset ss7 reset group Send a GRS for the given CIC range on the specified linkset ss7 restart mtp3 Restart link ss7 set debug {on|off} linkset Enables debugging on a given SS7 linkset ss7 show calls Show SS7 calls on the specified linkset ss7 show channels Displays SS7 channel information at a glance. ss7 show cics Shows the cics of an SS7 linkset. ss7 show linkset Shows the status of an SS7 linkset. ss7 show version Show the libss7 version ss7 {block|unblock} cic Sends a remote {blocking|unblocking} request for the given CIC on the specified linkset ss7 {block|unblock} group Sends a remote {blocking|unblocking} request for CIC range on the specified linkset ss7 {reset|block|unblock} linkset Sends a remote {reset|blocking|unblocking} request for all CICs on the given linkset stasis show topic Show stasis topic detail info. stasis show topics Shows a list of topics stasis statistics show messages Shows a list of message types and their general statistics stasis statistics show subscription Show stasis subscription statistics. stasis statistics show subscriptions Shows a list of subscriptions and their general statistics stasis statistics show topic Show stasis topic statistics. stasis statistics show topics Shows a list of topics and their general statistics stir_shaken show attestation Show the stir/shaken attestation settings stir_shaken show eprofile Show the stir/shaken eprofile settings for a given id stir_shaken show eprofiles Show all eprofiles for stir/shaken stir_shaken show profile Show the stir/shaken profile settings for a given id stir_shaken show profiles Show all profiles for stir/shaken stir_shaken show tn Show the settings for a given TN stir_shaken show tns Show all attestation TNs stir_shaken show verification Show the stir/shaken verification settings stir_shaken verify certificate_file Verify an external certificate file against the global or profile verification store stun set debug {on|off} Enable/Disable STUN (Simple Traversal of UDP through NATs) debugging stun show status List all known STUN servers and statuses.