Asterisk Command Reference

Asterisk Command Reference

Digium, Inc.

Portions of this manual are Copyright © 2005-2007 O'Reilly Media, Inc. Used with permission.

No part of this publication may be copied, distributed, transmitted, transcribed, stored in a retrieval system, or translated into any human or computer language without the prior written permission of Digium, Inc.

Digium, Inc. has made every effort to ensure that the instructions contained in this document are adequate and error free. The manufacturer will, if necessary, explain issues which may not be covered by this documentation. The manufacturer’s liability for any errors in the documents is limited to the correction of errors and the aforementioned advisory services.

This document has been prepared for use by professional and properly trained personnel, and the customer assumes full responsibility when using it.

Adobe and Acrobat are registered trademarks, and Acrobat Reader is a trademark of Adobe Systems Incorporated.

Asterisk, Digium, Switchvox, and AsteriskNOW are registered trademarks and Asterisk Business Edition, AsteriskGUI, and Asterisk Appliance are trademarks of Digium, Inc.

Any other trademarks mentioned in the document are the property of their respective owners.

Abstract

This is the Administrator Manual for Release C of Asterisk Business Edition.


Table of Contents

A. Application Reference
AddQueueMember() — Dynamically adds queue members to the specified call queue
ADSIProg() — Loads an ADSI script into an ADSI-capable phone
AgentCallbackLogin() — Enables agent login with callback
AgentLogin() — Allows a call agent to log in to the system
AgentMonitorOutgoing() — Records an agent’s outgoing calls
AGI() — Executes an AGI-compliant application
AMD() — Answering machine detection
Answer() — Answers a channel, if it is ringing
AppendCDRUserField() — Appends a value to the user field of the Call Detail Record
Authenticate() — Requires that the caller enter a correct password before continuing
Background() — Plays a file while accepting touch-tone (DTMF) digits
BackgroundDetect() — Plays a file in the background and detects talking
Busy() — Indicates a busy condition to the channel
ChangeMonitor() — Changes the monitoring filename of a channel
ChanIsAvail() — Finds out if a specified channel is currently available
ChannelRedirect() — Redirects a channel to a new location in the dialplan
ChanSpy() — Listens to the audio on a channel, and optionally whisper to the calling channel
Congestion() — Indicates congestion on the channel
ContinueWhile() — Restart a While() loop
ControlPlayback() — Plays a file, with the ability to fast forward and rewind the file
DateTime() — Says the date and/or time in the user-specified format
DBdel() — Deletes a key from the AstDB
DBdeltree() — Deletes a family or key tree from the AstDB
DeadAGI() — Executes an AGI-compliant script on a dead (hung-up) channel
Dial() — Attempts to connect channels
Dictate() — Virtual dictation machine
Directory() — Provides a dialable directory of extensions
DISA() — Direct Inward System Access: allows inbound callers to make outbound calls
DumpChan() — Dumps information about the calling channel to the console
EAGI()
Echo() — Echoes inbound audio back to the caller
EndWhile() — Ends a while loop
Exec() — Executes an Asterisk application dynamically
ExecIf() — Conditionally executes an Asterisk application
ExitWhile() — Exit from a While() loop, whether or not the conditional has been satisfied
ExtenSpy() — Listen to the audio on an extension, and optionally whisper to the calling channel
ExternalIVR() — Interfaces with an external IVR application
Flash() — Flashes a Zap trunk
FollowMe() — Find me/follow me functionality
ForkCDR() — Creates an additional CDR from the current call
GetCPEID() — Gets the CPE ID from an ADSI-capable telephone
Gosub() — Branches to a new location, saving the return address
GosubIf() — Conditionally branches to a new location, saving the return address
Goto() — Sends the call to the specified priority, extension, and context
GotoIf() — Conditionally goes to the specified priority
GotoIfTime() — Conditionally branches, depending on the time and day
Hangup() — Unconditionally hangs up the current channel
HasNewVoicemail() — Checks to see if there is new voicemail in the indicated voicemail box
HasVoicemail() — Indicates whether there is voicemail in the indicated voicemail box
IAX2Provision() — Provisions a calling IAXy device
ImportVar() — Sets a variable based on a channel variable from a different channel
Log() — Logs a custom message from the dialplan
LookupBlacklist() — Performs a lookup of a Caller ID name/number from the blacklist database
LookupCIDName() — Performs a lookup of a Caller ID name from the AstDB
Macro() — Calls a previously defined dialplan macro
MacroExclusive() — Runs a macro, exclusive of any other channel
MacroExit() — Explicitly returns from a macro
MacroIf() — Conditionally calls a previously defined macro
MailboxExists() — Conditionally branches if the specified voicemail box exists
MeetMe() — Puts the caller in to a MeetMe conference bridge
MeetMeAdmin() — Performs MeetMe conference administration
MeetMeCount() — Counts the number of participants in a MeetMe conference
Milliwatt() — Generates a 1,000 Hz tone
MixMonitor() — Records a channel in the background, mixing both directions synchronously
Monitor() — Monitors (records) the audio on the current channel
MorseCode() — Plays Morse code
MP3Player() — Plays an MP3 file or stream
MusicOnHold() — Plays music on hold indefinitely
NBScat() — Plays an NBS local stream
NoCDR() — Disables Call Detail Records for the current call
NoOp() — Does nothing
Page() — Opens one-way audio to multiple phones
Park() — Parks the current call
ParkAndAnnounce() — Parks the current call and announces the call over the specified channel
ParkedCall() — Answers a parked call
PauseMonitor() — Suspends monitoring of a channel
PauseQueueMember() — Temporarily blocks a queue member from receiving calls
Pickup() — Answers a ringing call from another phone
Playback() — Plays the specified audio file to the caller
Playtones() — Plays a tone list
PrivacyManager() — Requires a caller to enter his phone number, if no Caller ID information is received
Progress() — Indicates progress
Queue() — Places the current call in to the specified call queue
QueueLog() — Writes arbitrary queue events to the queue log
Random() — Conditionally branches, based upon a probability
Read() — Reads DTMF digits from the caller and assigns the result to a variable
ReadFile() — Reads the contents of a file in to a variable
RealTime — Looks up information from the RealTime configuration handler
RealTimeUpdate() — Updates a value via the RealTime configuration handler
Record() — Records channel audio to a file
RemoveQueueMember() — Dynamically removes queue members
ResetCDR() — Resets the Call Detail Record
RetryDial() — Attempts to place a call, and retries on failure
Return() — Returns from a Gosub() or GosubIf()
Ringing() — Indicates ringing tone
SayAlpha() — Spells a string
SayDigits() — Says the specified digits
SayNumber() — Says the specified number
SayPhonetic() — Spells the specified string phonetically
SayUnixTime() — Says the specified time in a custom format
SendDTMF() — Sends arbitrary DTMF digits to the channel
SendImage() — Sends an image file
SendText() — Sends text to the channel
SendURL() — Sends the specified URL to the channel (if supported)
Set() — Sets a variable to the specified value
SetAMAFlags() — Sets AMA flags in the Call Detail Record
SetCallerID() — Sets the Caller ID for the channel
SetCallerPres() — Sets Caller ID presentation flags
SetCDRUserField() — Sets the Call Detail Record user field
SetGlobalVar() — Sets a global variable to the specified value
SetMusicOnHold() — Sets the default music-on-hold class for the current channel
SetTransferCapability() — Sets the ISDN transfer capability of a channel
SIPAddHeader() — Adds a SIP header to the outbound call
SIPDtmfMode() — Changes the DTMF method for a SIP call
SLAStation() — Shared line appearance station
SLATrunk() — Shared line appearance trunk
SoftHangup() — Performs a soft hangup of the requested channel
StackPop() — Removes last address from Gosub() stack
StartMusicOnHold() — Starts music on hold
StopMixMonitor() — Stops monitoring a channel
StopMonitor() — Stops monitoring a channel
StopPlaytones() — Stops playing a tone list
StopMusicOnHold() — Stops music on hold
System() — Executes an operating system command
Transfer() — Transfers the caller to a remote extension
TryExec() — Tries to execute an Asterisk application
TrySystem() — Tries to execute an operating system command
UnpauseMonitor() — Resumes monitoring of a channel
UnpauseQueueMember() — Unpauses a queue member
UserEvent() — Sends an arbitrary event to the Manager Interface
Verbose() — Sends arbitrary text to verbose output
VMAuthenticate() — Authenticates the caller from voicemail passwords
VoiceMail() — Leaves a voicemail message in the specified mailbox
VoiceMailMain() — Enters the voicemail system
Wait() — Waits for a specified number of seconds
WaitExten() — Waits for an extension to be entered
WaitForRing() — Waits the specified number of seconds for a ring
WaitForSilence() — Waits for a specified amount of silence
WaitMusicOnHold() — Waits the specified number of seconds, playing music on hold
While() — Starts a while loop
Zapateller() — Uses a special information tone to block telemarketers
ZapBarge() — Barges in on (monitors) a Zap channel
ZapRAS() — Executes the Zaptel ISDN Remote Access Server
ZapScan() — Scans Zap channels to monitor calls
B. Asterisk Dialplan Functions
AGENT — Returns information about an agent
ARRAY — Allows one to define several variables at one time
BASE64_DECODE — Decodes a BASE64 encoded string
BASE64_ENCODE — Encodes a string in BASE64
BLACKLIST — Checks if the Caller ID is on the blacklist
CALLERID — Gets or sets Caller ID data on the channel
CDR — Gets or sets CDR information for this call (which will be written to the CDR log)
CHANNEL — Gets or sets various channel parameters
CHECK_MD5 — Validate an MD5 digest
CHECKSIPDOMAIN — Checks if a domain is local
CURL — Returns the data resulting from a GET or POST to a URI
CUT — Cuts a string based on a given delimiter
DB — Read or write to AstDB
DB_DELETE — Deletes a key or key family from the AstDB database
DB_EXISTS — Checks AstDB for specified key
DUNDILOOKUP — Queries DUNDi peers for a particular number
ENUMLOOKUP — Queries the ENUM database for a particular number
ENV — References environment variables
EVAL — Evaluates stored variables
EXISTS — Checks if value is non-blank
FIELDQTY — Counts fields
FILTER — Strips string of illegal characters
GLOBAL — References global namespace
GROUP — Associates the channel into a set group
GROUP_COUNT — Counts the number of channels in the specified group.
GROUP_LIST — Lists channel groups
GROUP_MATCH_COUNT — Counts channels in a matching group name
IAXPEER — Obtains IAX channel information
IF — Conditional value selection
IFTIME — Compares the current system time to a time specification
ISNULL — Checks if a value is blank
KEYPADHASH — Converts letters into numbers
LANGUAGE — Accesses the channel language
LEN — Calculates the string length
MATH — Mathematical calculations
MD5 — Calculates MD5 digest
MUSICCLASS — Access a channel’s music-on-hold setting
QUEUE_MEMBER_COUNT — Counts queue members
QUEUE_MEMBER_LIST — Lists queue members
QUEUE_WAITING_COUNT — Count waiting calls
QUEUEAGENTCOUNT
QUOTE — Escapes a string
RAND — Random number
REALTIME — Retrieves real-time data
REGEX — Compares based upon a regular expression
SET — Sets a variable
SHA1 — SHA-1 digest
SIP_HEADER — Retrieves a SIP header
SIPCHANINFO — Retrieves info on a SIP channel
SIPPEER — Retrieves info about a SIP peer
SORT — Sorts a list
SPEECH — Retrieves info on speech recognition results
SPEECH_ENGINE — Modifies speech engine property
SPEECH_GRAMMAR — Retrieves speech grammar information
SPEECH_SCORE — Retrieves speech recognition confidence score
SPEECH_TEXT — Retrieves recognized text
SPRINTF — Formats a string
STAT — Evaluates filesystem attributes
STRFTIME — Formats the date and time
STRPTIME — Converts a string into a date and time
TIMEOUT — Accesses channel timeout values
TXTCIDNAME — DNS lookup
URIDECODE — Decodes a URI
URIENCODE — Encodes a URI
VMCOUNT — Counts voicemail messages
C. Command-line Reference
bang — Execute a shell command
abort halt — Cancel a running halt
add — Used to add dialplan entries from the Asterisk command line interface
ael — Commands for dealing with AEL
agent — Commands related to queue agents
agi — Various commands related to the Asterisk Gateway Interface (AGI)
answer — Answer an incoming console call
autoanswer — Sets/displays autoanswer
cdr status — Display the Call Detail Record (CDR) status
clear profile — Clear profiling information
console — Various commands used for the control of the console channel
convert — Convert an audio file from one format to another
core — A set of core system commands
database — A set of commands to manage the local Asterisk database (AstDB)
debug — Get debugging information about your system
dialplan — Various commands for getting and setting information about your dialplan
dial — Dial from the Asterisk console
dnsmgr — Asterisk DNS manager
dont include — Remove an included context from the dialplan
dump agihtml — Dump the AGI commands to <filename> in HTML format
dundi — Distributed Universal Number Directory (DUNDi) related commands
extensions reload — Reload dialplan
features show — Lists configured features
file convert — Convert an audio file
flash — Flash an active console channel
funcdevstate list — List of custom device states
group show channels — Display active channels with group(s)
help — Display help list, or specific help on a command
http show status — Display HTTP server status
iax2 — Commands related to the IAX2 channel
include context — Include a dialplan context into another context
indication — Get information about country indications
init keys — Initializes private keys (by reading in pass code from the user)
keys — Commands related to initializing and viewing loaded keys
load — Load modules
local — Display currently active Local channels
logger — Information about logging
manager — Display information about the Asterisk Manager Interface (AMI)
meetme — Control and display information about active MeetMe conferences
mgcp — Information about the Media Gateway Control Protocol (MGCP) channel driver
mixmonitor — Start or stop MixMonitor for a provided channel
module — Commands to control modules
moh — Music on Hold module
mute — Mute a console channel
no debug channel — Stop debugging a channel
odbc — Show currently loaded ODBC classes
originate — Originate a call from the console
osp — Displays information on Open Settlement Protocol support
oss — Change the volume on the console channel
pri — Commands related to debugging Primary Rate Interfaces (PRI)
queue — Command related to the Queue module
realtime — Load and update variables in realtime
reload — Reload one or more modules
remove — Remove data from your dialplan
restart — Restart Asterisk
rtcp — Debug Real Time Control Protocol (RTCP)
rtp — Debug Real-time Transport Protocol
save — Save changes to the dialplan
say — Report the status of current say mode
send — Send text to a console channel
set — Set various levels of debugging information
show — Show information about a module
sip — Information about the SIP channel driver
skinny — Get information about the Skinny channel driver
sla — Show information about Shared Line Appearance
soft — Hangup a call
stop — Stop the Asterisk process
stun — Simple Traversal of UDP through NAT (STUN) debugging
transcoder — Displays channel utilization of Zaptel transcoder(s)
transfer — Transfer a console channel
udptl — Debug UDPTL / T.38 Fax over IP
unload — Unload a module
unmute — Unmute a console channel
voicemail — Commands related to the Voicemail module
zap — Commands related to the Zaptel channel driver
D. AGI Reference
ANSWER
CHANNEL STATUS
DATABASE DEL
DATABASE DELTREE
DATABASE GET
DATABASE PUT
EXEC
GET DATA
GET FULL VARIABLE
GET OPTION
GET VARIABLE
HANGUP
NoOp
RECEIVE CHAR
RECORD FILE
SAY ALPHA
SAY DATE
SAY DATETIME
SAY DIGITS
SAY NUMBER
SAY PHONETIC
SAY TIME
SEND IMAGE
SEND TEXT
SET AUTOHANGUP
SET CALLERID
SET CONTEXT
SET EXTENSION
SET MUSIC ON
SET PRIORITY
SET VARIABLE
STREAM FILE
TDD MODE
VERBOSE
WAIT FOR DIGIT
E. Asterisk Manager Interface Actions
AbsoluteTimeout — Sets the AbsoluteTimeout on a channel
AgentCallbackLogin — Sets an agent as logged in to the queue system in callback mode
AgentLogoff — Sets an agent as no longer logged in
Agents — Lists agents and their status
ChangeMonitor — Changes monitoring filename of a channel
Command — Executes an Asterisk CLI command
DBGet — Gets AstDB entry
DBPut — Puts DB entry
Events — Controls event flow
ExtensionState — Checks extension status
GetConfig — Retrieves configuration
GetVar — Retrieves the value of a variable
Hangup — Hangs up channel
IAXNetstats — Shows IAX statistics
IAXPeers — Lists IAX peers
ListCommands — Lists the manager commands
Logoff — Logs off manager session
MailboxCount — Checks mailbox message count
MailboxStatus — Checks mailbox status
MeetmeMute — Mutes a MeetMe user
MeetMeUnmute — Unmutes a MeetMe user
Monitor — Monitors a channel
Originate — Originates call
Park — Parks a channel
ParkedCalls — Lists parked calls
PauseMonitor — Pauses the recording of a channel
Ping — Keeps connection alive
PlayDTMF — Plays DTMF on a channel
QueueAdd — Adds a member to the specified queue
QueuePause — Pauses or unpauses a member in a call queue
QueueRemove — Removes interface from queue
QueueStatus — Checks queue status
Queues — Shows basic queue information
Redirect — Redirects (transfers) a channel
SIPpeers — Lists all SIP peers
SIPShowPeer — Shows information about a SIP peer
SetCDRUserField — Sets the CDR UserField
SetVar — Sets channel variable
Status — Lists channel status
StopMonitor — Stops the recording of a channel
UnpauseMonitor — Unpauses monitoring
UpdateConfig — Updates a config file
UserEvent — Sends an arbitrary event
WaitEvent — Waits for an event to occur
ZapDNDoff — Sets a Zap channel’s do not disturb status to off
ZapDNDon — Sets a Zap channel’s do not disturb status to on
ZapDialOffhook — Dials over Zap channel while off-hook
ZapHangup — Hangs up Zap channel
ZapRestart — Fully restarts Zaptel channels
ZapShowChannels — Shows status Zapata channels
ZapTransfer — Transfers Zap channel

Thank you

This information about the asterisk business edition is very information and handy. No one can remember so many code of the computer at a time. It take time to remember these kind of short cut key. Short cut key plays the role for the computer user to do work fast and efficiently.

Thank you
Webmaster @ Call Center

Although I do concord with

Although I do concord with your send, I hump my own reservations.
________________________________________________________________
utah retirement home | seized cars auctions | massage therapy Herndon | plastic surgeon orange county | face lift seattle | imersão

What to do?

My previous commenter is just a spammer. Because he left so many link here and not related. This blog post is about asterisk business edition shortcut key we can use with the system. Shortcut key make computer user to use any program or a software much more fast and effectively, efficiently.

Thank you
webmaster @ Call Center