Asterisk Dialplan Commands
Here is a list of all the commands that you can use in your Dialplan (extensions.conf).
Obtaining a List of Available Applications in the CLI
- Asterisk 1.4 or earlier: Type “show applications” or “show application <name>”
- Asterisk 1.6 or later: Type “core show applications” or “core show application <name>”
Page Contents
- General commands
- Billing
- Call management (hangup, answer, dial, etc)
- Caller presentation (ID, Name etc)
- ADSI
- Database handling
- Application integration
- Control flow & timeouts
- String & variable manipulation
- Sounds: Playback
- Sounds: Recording and monitoring (listening-in)
- SIP commands
- DAHDI (was ZAP) commands
- Voicemail and conferencing
- Queue and ACD management
- Short Message Service (SMS)
- Alarm Monitoring/Central Station
- Amateur Radio/Repeater Linking
- External applications – not in the Digium distribution (svn or http tarballs)
- Bristuff application
- vISDN applications
- Applications for Sirrix channels
- See Also
Notes:
- An alphabetical list can be found at the end of this page
- Please only list applications integrated in the Asterisk releases or CVS versions, with notes about version where it is included. Third party add-ons is listed in a separate section.
- Colors:
- Green – Added/functional version
- Orange – Deprecated version
- Red – Removed/no longer in present version
General Commands
- Authenticate: Authenticate a user. (1.0)
- Bridge: Connect two arbitrary callers. (1.6)
- ChannelRedirect: Redirect an existing channel to the dialplan. (1.4)
- CheckGroup: Checks if the total # of channels exceeds max. Deprecated in favor of Asterisk func group_count. (1.2, 1.4)
- ClearHash: Clear the keys from a specified hashname (1.6)
- Curl: Allows for the retrieval of external URLs. Also supports POSTing. Deprecated in favor of CURL. (1.2, 1.4).
- DUNDiLookup: Look up a number with DUNDi. Deprecated in favor of Asterisk func dundilookup. (1.2, 1.4)
- GetGroupCount: Group count for specified group or channel is in. Deprecated in favor of Asterisk func group_count (1.2, 1.4)
- GetGroupMatchCount: Calculates group count for all groups that match pattern. Deprecated in favor of Asterisk func group_match_count (1.2, 1.4)
- KeepAlive: Returns AST_PBX_KEEPALIVE value (1.6)
- Log: Append text to the Asterisk log file(s) (1.4)
- Page: Page multiple endpoints at once. (1.2)
- PickupChan: Pickup a ringing channel (1.6)
- SendDTMF: Sends arbitrary DTMF digits. (1.0)
- SendImage: Send an image file. (1.0)
- SendText: Send client a text message. (1.0)
- SendURL: Send a client a URL to display. (1.0)
- SetGroup: Sets the group for the current channel. Deprecated in favor of Asterisk func group (1.2, 1.4)
- System: Execute a system command. (1.0)
- Transfer: Transfer caller to remote extension. (1.0)
- TrySystem: Execute a system command with always 0 returned. (1.0)
- VMAuthenticate: Authenticate a user based on voicemail.conf. (1.2)
- Wait: Waits for some time. (1.0)
- WaitExten: Waits for some time for caller to dial a new extension. (1.0)
- WaitForRing: Wait for Ring Application. (1.0)
- WaitMusicOnHold: Wait, playing Music On Hold. Deprecated in favor of extended MusicOnHold. (1.6)
Billing
- AppendCDRUserField: Append data to CDR User field. Deprecated in favor of CDR(userfield) (1.4, 1.6)
- ForkCDR: Fork The CDR into 2 seperate entities. (1.0)
- NoCDR: Make sure asterisk doesn’t save CDR for a certain call. (1.0)
- ResetCDR: Reset CDR data. (1.0)
- SetAccount: Sets account code. Deprecated in favor of CDR(accountcode) (1.0, 1.4)
- Asterisk cmd SetAMAFlags: Set the channel AMA Flags for billing. (1.0)
- SetCDRUserField: Set CDR User field. Deprecated in favor of CDR(userfield) (1.4, 1.6)
Call Management (Hangup, Answer, Dial, etc)
- AMD: Answering machine detection. (1.4)
- Answer: Answer a channel if ringing. (1.0)
- Busy: Indicate busy condition and wait for hangup. (1.0)
- ChanIsAvail: Check if channel is available. (1.0)
- Congestion: Indicate congestion and wait for hangup. (1.0)
- Dial: Place a call and connect to the current channel. (1.0)
- DISA: DISA (Direct Inward System Access). (1.0)
- Hangup: Unconditional hangup. (1.0)
- Incomplete: Returns AST_PBX_INCOMPLETE value. (1.6)
- Originate: Originate a call and connect to a specified extension or application (1.6.2)
- RetryDial: Place a call, retrying on failure allowing optional exit extension. (1.2)
- Ringing: Indicate ringing. (1.0)
Caller Presentation (ID, Name, etc)
- CallingPres: Change the presentation for the callerid. (1.2)
- LookupBlacklist: Look up Caller*ID name/number from blacklist database. Deprecated in favor of BLACKLIST (1.4, 1.6)
- LookupCIDName: Look up CallerID Name from local database. Deprecated in favor of Asterisk func db. (1.4, 1.6)
- PrivacyManager: Require phone number to be entered, if no CallerID sent. (1.0)
- SetCallerID: Set CallerID. Deprecated in favor of CALLERID. (1.4, 1.6)
- SetCallerPres: Channel independent setting of caller presenation. Deprecated in favor of CALLERPRES (1.6)
- SetCIDName: Set CallerID Name. Deprecated in favor of CALLERID. (1.4, 1.6)
- SetCIDNum: Set only the Caller ID number (not name). Deprecated in favor of CALLERID. (1.4, 1.6)
- SoftHangup: Request hangup on another channel. (1.0)
- Zapateller: Block telemarketers with SIT. (1.0)
ADSI
Database Handling
- DBdel: Delete a key from the database. Deprecated in favor of DB_DELETE. (1.4, 1.6)
- DBdeltree: Delete a family or keytree from the database. (1.0)
- DBget: Retrieve a value from the database. Deprecated in favor of DB. (1.4, 1.6)
- DBput: Store a value in the database. Deprecated in favor of DB. (1.4, 1.6)
- ODBCFinish: Clear the resultset of a successful multirow query (1.6)
- RealTime: Populate variables with details from database using RealTime. Deprecated in favor of Asterisk func realtime. (1.4, 1.6)
- RealTimeUpdate: Update a field in a database using RealTime. Deprecated in favor of Asterisk func realtime. (1.4, 1.6)
See Asterisk database for more information.
Application Integration
- AGI: Executes an AGI compliant application. (1.0)
- DeadAGI: Executes AGI on a hung-up channel. (1.0)
- EAGI: Executes an AGI compliant application with sound channels. (1.0)
- EnumLookup: Lookup number in ENUM. Deprecated in favor of Asterisk func enumlookup. (1.2, 1.4)
- ExternalIVR: Executes an ExternalIVR generator. (1.2)
- JabberJoin: Join a group chat. (1.8)
- JabberLeave: Leave a group chat. (1.8)
- JabberSend: Send a text message via Jabber. (1.4)
- JabberSendGroup: Send a message to a group chat. (1.8)
- JabberStatus: Return presence status of client or transport as values 1-7 (1.4)
- Asterisk cmd jack: Interface to JACK audio for audio manipulation. (1.6)
- Read: Read DTMF tones into a variable. (1.0)
- ReadFile: Read the contents of a text file into a channel variable. (1.2)
- TXTCIDName: Lookup caller name from TXT record. Deprecated in favor of Asterisk func txtcidname. (1.2, 1.4)
- UserEvent: Send an arbitrary event to the manager interface. (1.0)
Control Flow & Timeouts
- AbsoluteTimeout: Set absolute maximum time of call. Deprecated in favor of TIMEOUT(absolute) (1.2, 1.4)
- AELSub: Launch subroutine built with AEL (1.4)
- ContinueWhile: Restart a while loop (1.4)
- DigitTimeout: Set maximum timeout between digits. Deprecated in favor of TIMEOUT(digit) (1.2, 1.4+)
- EndWhile: End A While Loop. (1.2)
- Exec: Execute dialplan application. (1.0)
- ExecIf: Conditional exec. (1.2)
- ExecIfTime: Executes dialplan application conditionally based on current time. (1.2)
- ExitWhile: End a While loop. (1.2)
- Gosub: Jump to a subroutine and return. (1.2)
- GosubIf: Conditional jump to a subroutine and return (1.2)
- Goto: Goto a particular priority, extension, or context. (1.0)
- GotoIf: Conditional goto. (1.0)
- GotoIfTime: Conditional goto on current time. (1.0)
- Macro: Macro Implementation. Deprecated in favor of Gosub/Return. (1.6)
- MacroExclusive: Only one channel at a time may call this macro, all others have to wait (1.4) Replaced by dialplan functions LOCK(), TRYLOCK(), and UNLOCK() (1.6)
- MacroExit: Exit the macro as if it had fully completed (1.4) Deprecated in favor of Return (1.6)
- MacroIf: Conditional Macro Implementation. Deprecated in favor of GosubIf (1.6)
- NoOp: No operation. For debugging, see Verbose or Log. (1.0)
- Random: jump to a specified location based on a random probability. Deprecated in favor of Asterisk func rand (1.4, 1.6)
- ResponseTimeout: Set maximum timeout awaiting response. Deprecated in favor of TIMEOUT(response) (1.2, 1.4)
- Return: Return from a Gosub or GosubIf. (1.2)
- StackPop: Remove a return address without returning. (1.2)
- While: Start A While Loop. (1.2)
String & Variable Manipulation
- Cut: Split a string on a specified delimiter. Deprecated in favor of Asterisk func cut. (1.2, 1.4)
- DumpChan: Dump Info About The Calling Channel. (1.0)
- ImportVar: Set variable to value. (1.2)
- Math: Perform (rather simple) calculations. Deprecated in favor of MATH. (1.2, 1.4)
- MSet: Set channel variable(s) or function value(s) (1.6)
- SetGlobalVar: Set variable to value. Deprecated in favor of GLOBAL. (1.2, 1.4)
- Set: Set channel variable(s) or function value(s). (1.0)
Sounds: Playback
- Background: Play a sound file while waiting an extension. (1.0)
- BackgroundDetect: Background a file with talk detect. (1.0)
- ControlPlayback: Play a sound file with fast forward, rewind and exit controls. (1.0)
- DateTime: Say the date and/or time. Same as SayUnixTime. (1.0)
- Echo: Echo audio read back to the user. (1.0)
- Festival: Say text with the Festival voice synthesizer. (1.0)
- Milliwatt: Generate a Constant 1000Hz tone at 0dbm (mu-law) (1.0)
- MP3Player: Play an MP3 sound file or stream. (1.0)
- MusicOnHold: Play Music On Hold indefinitely. (1.0)
- Playback: Play a sound file. (1.0)
- Playtones: Play a tone list while executing other commands. (1.0)
- Asterisk cmd proceeding: Indicate proceeding (1.6)
- Progress: Play early audio to the caller before answering the line. (1.0)
- SayUnixTime: Say the date and/or time. (1.0)
- SayAlpha: Say Alpha. (1.0)
- SayCountedAdj: Say declining counting phrases (1.8)
- SayCountedNoun: Say declining counting phrases (1.8)
- SayDigits: Say Digits. (1.0)
- SayNumber: Say Number. (1.0)
- SayPhonetic: Say Phonetic. (1.0)
- SetMusicOnHold: Set default Music On Hold class. Deprecated in favor of Asterisk func channel (1.6)
- SetLanguage: Change language setting for sound playback. Deprecated in favor of Asterisk func language. (1.2, 1.4)
- StopPlaytones: Stop playing a tone list. (1.0)
See Asterisk sound files for more information.
Sounds: Recording and Monitoring (Listening-in)
- ChangeMonitor: Change monitoring filename of a channel. (1.0)
- ChanSpy: Universal channel barge-in. (1.2)
- Dictate: Records and plays back a dictation. (1.2)
- ExtenSpy: Listen/whisper to a specific extension (1.4)
- MixMonitor: Record and mix call legs natively (unlike Monitor). (1.2)
- Monitor: Record a telephone conversation to a sound file. (1.0)
- Record: Record user voice input to a file. (1.0)
- StopMonitor: Stop monitoring a channel. (1.0)
- StopMixMonitor: Stop monitoring a channel monitored with MixMonitor. (1.4)
SIP Commands
- Asterisk cmd SipAddHeader: Add header to outbound SIP invite. (1.2)
- SIPdtmfMode: Change DTMF mode during SIP call. (1.0)
- SIPGetHeader: Get a SIP header from an incoming call. Deprecated in favor of Asterisk func sip_header. (1.2, 1.4)
DAHDI (was ZAP) Commands
- DAHDIBarge: Barge in (monitor) DAHDI channel (was ZapBarge) (1.0)
- DAHDIRAS: Provide ISDN data service (was ZapRAS)
- DAHDIScan: Scan DAHDI channels to monitor calls (was ZapScan)
- DAHDISendKeypadFacility: Send digits out of band over a PRI
- Flash: Flashes a Zap/DAHDI Trunk. (1.0)
- ZapCD: ISDN call deflection (bristuff)
- ZapEC: Echo cancellation on/off (bristuff)
See Asterisk ZAP channels, Asterisk config zapata.conf for more information.
Voicemail and Conferencing
- ConfBridge: Conference bridge application. (1.6.2)
- Directory: Provide directory of voicemail extensions. (1.0)
- HasNewVoicemail: Conditionally branches to priority + 101. Deprecated in favor of Asterisk func vmcount. (1.4, 1.6)
- HasVoicemail: Conditionally branches to priority + 101. Deprecated in favor of Asterisk func vmcount. (1.4, 1.6)
- MailboxExists: Checks if mailbox exists. (1.0+)
- MeetMe: Simple MeetMe conference bridge. (1.0)
- Asterisk cmd MeetmeAdmin: MeetMe conference Administration. (1.0)
- MeetMeChannelAdmin: MeetMe conference Administration (channel specific) (1.6)
- MeetMeCount: MeetMe participant count. (1.0)
- MiniVM: Mini-Voicemail (1.6)
- MinivmAccMess: Mini-Voicemail – record account specific messages (1.6)
- MinivmDelete: Mini-Voicemail – delete voicemail messages (1.6)
- MinivmGreet: Mini-Voicemail – Play prompts (1.6)
- MinivmNotify: Mini-Voicemail – Notify voicemail owner about new messages (1.6)
- MinivmRecord: Mini-Voicemail – Receive voicemail and forward via email (1.6)
- VoiceMail: Leave a voicemail message. (1.0)
- VoiceMailMain: Enter voicemail system. (1.0)
- VMAuthenticate: Authenticate a user based on voicemail.conf. (1.2)
- VMSayName: Play the recording name of the voicemail user if it exists, otherwise play the mailbox number. (1.8)
See Asterisk config voicemail.conf for more information.
Queue and ACD Management
- AddQueueMember: Dynamically adds queue members. (1.0)
- AgentCallbackLogin: Call agent callback login. Deprecated. (1.4, 1.6)
- AgentLogin: Call agent login. (1.0)
- AgentMonitorOutgoing: Record agent’s outgoing call. (1.0)
- Park: Park yourself. (1.0)
- ParkAndAnnounce: Park and Announce. (1.0)
- ParkedCall: Answer a parked call. (1.0)
- PauseQueueMember: Pauses an agent. (1.2)
- Queue: Queue a call for a call queue. (1.0)
- RemoveQueueMember: Dynamically removes queue members. (1.0)
- UnpauseQueueMember: Resumes an agent. (1.2)
Short Message Service (SMS)
- SMS: Pass SMS (short messaging service) to and from SMSc (SMS Center). (1.0)
Alarm Monitoring/Central Station
- AlarmReceiver: Emulate an Ademco Contact ID Alarm Receiver. (1.0)
Amateur Radio/Repeater Linking
- Rpt: Support Amateur Radio and Commercial Two Way Repeater Linking. (1.0)
External Applications – Not in the Digium Distribution (Svn or Http Tarballs)
- ALSAMonitor: Monitor the ALSA console.
- app Prepaid: Designed for Postgres
- ASR – professional, multi lingual speech recognition for Asterisk
- Asterisk app_dbodbc: Dialplan modifiers using unixODBC
- Backticks: Store shell command result to asterisk variable
- DBRewrite: Execute perl compatible regular expression and substitution out of a MySQL Database.
- DBQuery: Execute predefined queries against MySQL Servers, and get the result back into the dialplan.
- DTMFToText: Enter alphanumeric strings with DTMF phone
- DynExtenDB: Store extensions in database
- Flite: Say text with the Festival Lite voice synthesizer (faster response than Festival)
- ICES: Streaming calls to the Internet
- Iconv: Convert character sets.
- LDAPget: Retrieve a value from a LDAP directory server
- MYSQL: Perform various mySQL database activities.
- NBScat: Play an NBS local stream
- PPPD: PPP daemon connector
- Perl: res_perl is the mod_perl of Apache, only for Asterisk.
- PHP: res_php integrates PHP into Asterisk without AGI.
- PPPD: PPP daemon connector
- Asterisk Cmd Voximal – VoiceXML interpreter for Asterisk
- Vxml – professional, VoiceXML interpreter for Asterisk
Bristuff Application
All of those are part of the Bristuff asterisk patch.
- Autoanswer: Autoanswer a call for a specified extension
- AutoanswerLogin: Login to the autoanswer application
- Devstate: Generate a device state change event (inuse, busy, ringing …)
- PickUp: Mostly channel independent.
- PickUpChan: Pick up the specified channel
- PickupSIPuri
- PickDown: Hang up on a remotely ringing call
- Segfault: Crash Asterisk with segfault
- Steal: Take over a bridged call (leg)
- Asterisk cmd BristuffZapCD: ISDN call deflection
- ZapEC: Enable or disable echo cancellation for Zap
- ZapInband: Inband call progress (pre-answer)
vISDN applications
Applications for Sirrix channels
- SrxDeflect: Deflect an incoming call
- SrxEchoCan: Disable/enable Echo Cancellation
- SrxMWI: Set / reset MessageWaitingIndication (MWI) on a Sirrix group
See Also
Asterisk | Applications | Functions | Variables | Expressions | Asterisk FAQ