login | register
Sat 04 of Jul, 2009 [03:42 UTC]

voip-info.org

History

Asterisk - documentation of application commands

Created by: oej,Last modification on Wed 29 of Apr, 2009 [17:02 UTC] by JustRumours


Asterisk Dialplan Commands

Here is a list of all the commands that you can use in your Dialplan (extensions.conf). You can obtain your Asterisk's list of available applications at the CLI by typing "show applications" and "show application <name>".

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 present version

General commands

  • Authenticate: Authenticate a user
  • VMAuthenticate: Authenticate a user based on voicemail.conf
  • Bridge: Connect two arbitrary callers (1.6+)
  • ChannelRedirect: Redirect an existing channel to the dialplan
  • Curl: Allows for the retrieval of external URLs. Also supports POSTing. Deprecated in favor of CURL.
  • DUNDiLookup: Look up a number with DUNDi (1.2, 1.4+)
  • Log: Append text to the Asterisk log file(s) (1.6+)
  • JabberSend: Send a text message via Jabber
  • Page: Page a mobile device (new in Asterisk v1.2)
  • SendDTMF: Sends arbitrary DTMF digits
  • SendImage: Send an image file
  • SendText: Send client a text message
  • SendURL: Send a client a URL to display
  • System: Execute a system command
  • Transfer: Transfer caller to remote extension
  • TrySystem: Execute a system command with always 0 returned
  • Wait: Waits for some time
  • WaitExten: Waits for some time for caller to dial a new extension
  • WaitForRing: Wait for Ring Application
  • WaitMusicOnHold: Wait, playing Music On Hold. Deprecated in favor of extended MusicOnHold. (1.6)





Billing





Call management (hangup, answer, dial, etc)

  • AMD: Answering machine detection
  • Answer: Answer a channel if ringing
  • Busy: Indicate busy condition and wait for hangup
  • ChanIsAvail: Check if channel is available
  • Congestion: Indicate congestion and wait for hangup
  • Dial: Place a call and connect to the current channel
  • DISA: DISA (Direct Inward System Access)
  • Hangup: Unconditional hangup
  • RetryDial: Place a call, retrying on failure allowing optional exit extension.
  • Ringing: Indicate ringing


Caller presentation (ID, Name etc)


ADSI


Database handling

  • DBdel: Delete a key from the database.
  • DBdeltree: Delete a family or keytree from the database.
  • DBget: Retrieve a value from the database. Deprecated in favor of DB.
  • DBput: Store a value in the database. Deprecated in favor of DB.
  • MYSQL: Perform various mySQL database activities
  • DBQuery: Execute predefined queries against MySQL Servers, and get the result back into the dialplan.
  • RealTime: Populate variables with details from database using RealTime
  • RealTimeUpdate: Update a field in a database using RealTime

See Asterisk database for more information.

Application integration

  • AGI: Executes an AGI compliant application
  • DeadAGI: Executes AGI on a hung-up channel
  • EAGI: Executes an AGI compliant application with sound channels
  • EnumLookup: Lookup number in ENUM
  • ExternalIVR: Executes an ExternalIVR generator
  • Jack: Interface to JACK audio for audio manipulation (1.6+)
  • Macro: Macro Implementation
  • MacroExclusive: Only one channel at a time may call this macro, all others have to wait (1.4)
  • MacroExit: Exit the macro as if it had fully completed (1.4)
  • NoOp: No operation. Can print values to console for debugging.
  • Perl: res_perl is the mod_perl of Apache, only for Asterisk
  • PHP: res_php integrates PHP into Asterisk without AGI
  • Read: Read a variable with DTMF
  • TXTCIDName: Lookup caller name from TXT record
  • UserEvent: Send an arbitrary event to the manager interface


Control flow & timeouts

  • AbsoluteTimeout: Set absolute maximum time of call. Deprecated in favor of TIMEOUT(absolute) (1.2, 1.4+)
  • DigitTimeout: Set maximum timeout between digits. Deprecated in favor of TIMEOUT(digit) (1.2, 1.4+)
  • Gosub: Jump to a subroutine and return (new in v1.2)
  • GosubIf: Conditional jump to a subroutine and return (new in v1.2)
  • Goto: Goto a particular priority, extension, or context
  • GotoIf: Conditional goto
  • GotoIfTime: Conditional goto on current time
  • Random: jump to a specified location based on a random probability (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 (new in v1.2)
  • StackPop: Remove a return address without returning (new in v1.2)
  • While: Start A While Loop - *1.2beta
  • EndWhile: End A While Loop - *1.2beta
  • ExecIf: Conditional exec - *1.2beta
  • ExitWhile: End a While loop


String & variable manipulation

  • ImportVar: Set variable to value
  • Math: Perform (rather simple) calculations. Deprecated in favor of MATH.
  • SetGlobalVar: Set variable to value. Deprecated in favor of Asterisk func global.
  • Set: Set channel variable(s) or function value(s)
  • DBRewrite: Execute perl compatible regular expression and substitution out of a MySQL Database.
  • Asterisk cmd DumpChan: Dump Info About The Calling Channel

Sounds: Playback

  • Background: Play a sound file while waiting an extension
  • BackgroundDetect: Background a file with talk detect
  • ControlPlayback: Play a sound file with fast forward, rewind and exit controls
  • DateTime: Say the date and/or time (Obsolete)
  • Echo: Echo audio read back to the user
  • Festival: Say text with the Festival voice synthesizer
  • Asterisk cmd Flite: Say text with the Festival Lite voice synthesizer (faster response than Festival)
  • Milliwatt: Generate a Constant 1000Hz tone at 0dbm (mu-law)
  • MP3Player: Play an MP3 sound file or stream
  • MusicOnHold: Play Music On Hold indefinitely
  • Playback: Play a sound file
  • Playtones: Play a tone list while executing other commands
  • Progress: Play early audio to the caller before answering the line
  • SayUnixTime: Say the date and/or time
  • SayAlpha: Say Alpha
  • SayDigits: Say Digits
  • SayNumber: Say Number
  • SayPhonetic: Say Phonetic
  • SetMusicOnHold: Set default Music On Hold class
  • SetLanguage: Change language setting for sound playback
  • StopPlaytones: Stop playing a tone list

See Asterisk sound files for more information.

Sounds: Recording and monitoring (listening-in)

  • ALSAMonitor: Monitor the ALSA console
  • ChangeMonitor: Change monitoring filename of a channel
  • ChanSpy: Universal channel barge-in
  • Dictate: Records and plays back a dictation
  • ExtenSpy: Listen/whisper to a specific extension (new in 1.4)
  • MixMonitor: Record and mix call legs natively (unlike Monitor) v1.2.x
  • Monitor: Record a telephone conversation to a sound file
  • Record: Record user voice input to a file
  • StopMonitor: Stop monitoring a channel
  • StopMixMonitor: Stop monitoring a channel monitored with MixMonitor

SIP commands



DAHDI (was ZAP) commands

  • Flash: Flashes a Zap Trunk
  • DAHDIBarge: Barge in (monitor) DAHDI channel (was ZapBarge)
  • ZapCD: ISDN call deflection (bristuff)
  • Asterisk cmd BristuffZapEC: Echo cancellation on/off (bristuff)
  • DAHDISendKeypadFacility: Send digits out of band over a PRI
  • DAHDIRAS: Provide ISDN data service (was ZapRAS)
  • DAHDIScan: Scan DAHDI channels to monitor calls (was ZapScan)

See Asterisk zap channels, zapata.conf for more information.


Voicemail and conferencing


See voicemail.conf for more information.

Queue and ACD management



Alarm Monitoring/Central Station


Amateur Radio/Repeater Linking

  • Rpt: Support Amateur Radio and Commercial Two Way Repeater Linking

External applications - not in the Digium distribution (svn or http tarballs)



Bristuff application

All of those are part of the Bristuff asterisk patch.
  • PickUp: Mostly channel independent.
  • PickUpChan: Pick up the specified channel
  • Asterisk cmd BristuffPickupSIPuri
  • PickDown: Hang up on a remotely ringing call
  • Steal: Take over a bridged call (leg)
  • Devstate: Generate a device state change event (inuse, busy, ringing ...)
  • Asterisk cmd BristuffSegfault: Crash Asterisk with segfault
  • ZapCD: ISDN call deflection
  • Asterisk cmd BristuffZapEc: Enable or disable echo cancellation for Zap
  • Asterisk cmd BristuffZapInband: Inband call progress (pre-answer)
  • Asterisk cmd BristuffAutoanswer: Autoanswer a call for a specified extension
  • Asterisk cmd BristuffAutoanswerLogin: Login to the autoanswer application


vISDN applications

  • Asterisk cmd vISDNOverlapDial)

Applications for Sirrix channels

  • SrxEchoCan: Disable/enable Echo Cancellation
  • SrxDeflect: Deflect an incoming call
  • SrxMWI: Set / reset MessageWaitingIndication (MWI) on a Sirrix group


Alphabetical list

  • AbsoluteTimeout: Set absolute maximum time of call. Deprecated in favor of TIMEOUT(absolute) (1.2, 1.4+)
  • AddQueueMember: Dynamically adds queue members
  • ADSIProg: Load Asterisk ADSI Scripts into phone
  • AgentCallbackLogin: Call agent callback login. Deprecated. (1.4, 1.6+)
  • AgentLogin: Call agent login
  • AgentMonitorOutgoing: Monitor Outgoing Agent Calls (0.7.3)
  • AGI: Executes an AGI compliant application
  • AlarmReceiver: Emulate an Ademco Contact ID Alarm Receiver
  • ALSAMonitor: Monitor the ALSA console
  • AMD: Answering machine detection
  • Answer: Answer a channel if ringing
  • AppendCDRUserField: Append data to the CDR user field. Deprecated in favor of CDR(userfield)(1.4, 1.6+)
  • Authenticate: Authenticate a user
  • BackGround: Play a file while awaiting extension
  • BackgroundDetect: Background a file with talk detect
  • Bridge: Connect two arbitrary callers (1.6)
  • Busy: Indicate busy condition and wait for hangup
  • CallingPres: Change the presentation for the callerid in a ZAP channel (1.2)
  • ChangeMonitor: Change monitoring filename of a channel
  • ChanIsAvail: Check if channel is available
  • ChannelRedirect: Redirect an existing channel to the dialplan
  • ChanSpy: Universal channel barge-in
  • CheckGroup: checks if the total # of channels exceeds max (1.2, 1.4+)
  • ClearHash: Clear the keys from a specified hashname (1.6+)
  • Congestion: Indicate congestion and wait for hangup
  • ContinueWhile: Restart a while loop (1.4+)
  • ControlPlayback: Play a sound file with fast forward, rewind and exit controls
  • DBdel: Delete a key from the database.
  • DBdeltree: Delete a family or keytree from the database.
  • DBQuery: Execute predefined queries against MySQL Servers, and get the result back into the dialplan. (3rd party addon)
  • DBRewrite: Execute perl compatible regular expression and substitution out of a MySQL Database. (3rd party addon)
  • DeadAGI: Executes AGI on a hungup channel
  • Dial: Place an call and connect to the current channel
  • Dictate: Records and plays back a dictation
  • DigitTimeout: Set maximum timeout between digits. Deprecated in favor of TIMEOUT(digit) (1.2, 1.4+)
  • Directory: Provide directory of voicemail extensions
  • DISA: DISA (Direct Inward System Access)
  • DTMFToText: Enter alphanumeric strings with DTMF phone (3rd party addon)
  • Asterisk cmd DumpChan: Dump Info About The Calling Channel
  • DUNDiLookup: Look up a number with DUNDi (1.2, 1.4+)
  • EAGI: Executes an AGI compliant application on local or remote machine (FastAGI)
  • Echo: Echo audio read back to the user
  • EndWhile: End A While Loop
  • EnumLookup: Lookup number in ENUM (1.4, 1.6+)
  • Exec: Executes dialplan application
  • ExecIf: Executes dialplan application conditionally
  • ExecIfTime: Executes dialplan application conditionally based on current time
  • ExitWhile: End a While loop
  • ExtenSpy: Listen/whisper to a specific extension (1.4+)
  • ExternIVR: Interfaces with an external IVR application
  • Festival: Say text with the Festival voice synthesizer
  • Flash: Flashes a DAHDI Trunk
  • Flite: Say text with the Festival Lite voice synthesizer (faster response than Festival)
  • ForkCDR: Fork The CDR into 2 seperate entities
  • GetCPEID: Get ADSI CPE ID
  • GetGroupCount: group count for specified group or channel is in (1.2, 1.4+)
  • GetGroupMatchCount: Calculates group count for all groups that match pattern (1.2, 1.4+)
  • Gosub: Jump to a subroutine and return
  • GosubIf: Conditional jump to a subroutine and return
  • Goto: Goto a particular priority, extension, or context
  • GotoIf: Conditional goto
  • GotoIfTime: Conditional goto on current time
  • Hangup: Unconditional hangup
  • HasNewVoicemail: Conditionally branches to priority + 101. Deprecated in favor of VMCOUNT. (1.4, 1.6+)
  • Asterisk cmd HasVoicemail: Conditionally branches to priority + 101. Deprecated in favor of VMCOUNT. (1.4, 1.6+)
  • ICES: Streaming calls to the Internet
  • ImportVar: Set variable to value
  • JabberSend: Send a message to a buddy
  • JabberStatus: Return presence status of client or transport as values 1-7
  • Jack: Interface to JACK audio for audio manipulation (1.6+)
  • KeepAlive: Returns AST_PBX_KEEPALIVE value (1.6+)
  • Log: Send arbitrary text to a selected log level (1.4+)
  • LookupBlacklist: Look up Caller*ID name/number from blacklist database. Deprecated in favor of DB. (1.4, 1.6+)
  • LookupCIDName: Look up CallerID Name from local database. Deprecated in favor of DB. (1.4, 1.6+)
  • 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+)
  • MacroExit: Exit the macro as if it had fully completed (1.4+)
  • MailboxExists: Checks if voicemail mailbox exists
  • MeetMe: Simple MeetMe conference bridge
  • MeetMeAdmin: MeetMe conference Administration
  • Asterisk cmd MeetMeChannelAdmin: MeetMe conference Administration (channel specific) (1.6+)
  • MeetMeCount: MeetMe participant count
  • Milliwatt: Generate a constant 1004Hz tone at 0dbm (mu-law)
  • 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+)
  • Asterisk cmd MixMonitor: Record and mix call legs
  • Monitor: Record a telephone conversation to a sound file
  • MP3Player: Play an MP3 sound file or stream
  • MSet: Set channel variable(s) or function value(s) (1.6+)
  • MusicOnHold: Play Music On Hold indefinitely
  • MYSQL: Perform various mySQL database activities
  • NBScat: Play an NBS local stream
  • NoCDR: Make sure asterisk doesn't save CDR for a certain call
  • NoOp: No operation. For debugging, see Verbose or Log.
  • Asterisk cmd ODBCFinish: Clear the resultset of a successful multirow query (1.6+)
  • Page: Page multiple endpoints at once
  • Parl: Park yourself
  • ParkAndAnnounce: Park and Announce
  • ParkedCall: Answer a parked call
  • PauseQueueMember: Pauses an agent
  • Perl: res_perl is the mod_perl of Apache, only for Asterisk
  • Pickup: Directed call pickup (1.2+)
  • PickUP: Pickup a Zap Channel before answered (Bristuff)
  • Asterisk cmd PickupChan: Pickup a ringing channel (1.6+)
  • Playback: Play a file
  • Playtones: Play a tone list while executing other commands
  • PPPD: PPP daemon connector
  • PrivacyManager: Require phone number to be entered, if no CallerID sent
  • Asterisk cmd Proceeding: Indicate proceeding (1.6+)
  • Progress: Play early audio to the caller before answering the line
  • Queue: Queue a call for a call queue
  • Random: Conditionally branches, based upon a probability (1.4, 1.6+)
  • Read: Read a variable
  • Asterisk cmd ReadExten: Read an extension into a variable (1.6+)
  • Asterisk cmd ReadFile: Read the contents of a text file into a channel variable
  • RealTime: Populate variables with details from database using RealTime
  • Record: Record a telephone conversation to a sound file
  • RemoveQueueMember: Dynamically removes queue members
  • ResetCDR: Reset CDR data
  • ResponseTimeout: Set maximum timeout awaiting response. Deprecated in favor of TIMEOUT(response) (1.2, 1.4+)
  • RetryDial: Place a call, retrying on failure allowing optional exit extension.
  • Return: Return from a Gosub or GosubIf (1.2+)
  • Ringing: Indicate ringing tone
  • Rpt: Support Amatuer Radio and Commercial Two Way Repeater Linking
  • SayAlpha: Say Alpha
  • SayDigits: Say Digits
  • SayNumber: Say Number
  • SayPhonetic: Say Phonetic
  • SayUnixTime: Say the date and/or time
  • SendDTMF: Sends arbitrary DTMF digits
  • SendImage: Send an image file
  • SendText: Send client a text message
  • SendURL: Send client a URL to display
  • Set: Set channel variable(s) or function value(s)
  • SetAccount: Sets account code (1.4+)
  • SetAMAflags: Set the channel AMA Flags for billing
  • SetCallerID: Set CallerID. Deprecated in favor of CALLERID. (1.4, 1.6+)
  • SetCallerPres: Channel independent setting of caller presenation Deprecated in favor of Asterisk func CALLERPRES (1.6)
  • SetCDRUserField: Set CDR User Field. See Billing. Deprecated in favor of CDR(userfield)(1.4, 1.6+)
  • SetGlobalVar: Set variable to value. Deprecated in favor of Asterisk func global.(1.4, 1.6+)
  • SetMusicOnHold: Set default Music On Hold class. Deprecated in favor of CHANNEL(musicclass)(1.6)
  • SIPAddHeader: Add header to outbound SIP invite
  • SIPCallPickup: Pickup a ringing phone in the pickup group.
  • SIPGetHeader: Pick any header from a SIP invite message. Deprecated in favor of Asterisk func sipheader.
  • SIPdtmfMode: Change DTMF mode during SIP call
  • SMS: Send and receive SMS (short messaging service)
  • SoftHangup: Soft Hangup Application
  • SrxEchoCan: Disable/enable Echo Cancellation
  • SrxDeflect: Deflect an incoming call
  • SrxMWI: Set / reset MessageWaitingIndication (MWI) on a Sirrix group
  • StackPop: Remove a return address without returning (1.2+)
  • Steal: Steal a Zap Channel after answered
  • StopMonitor: Stop monitoring a channel
  • StopPlaytones: Stop playing a tone list
  • System: Execute a system command
  • TestClient: Execute Interface Test Client
  • TestServer: Execute Interface Test Server
  • Transfer: Transfer caller to remote extension
  • TrySystem: Execute a system command with always 0 returned
  • TXTCIDName: Lookup caller name from TXT record (1.2, 1.4+)
  • UnpauseQueueMember: Resumes an agent
  • UserEvent: Send an arbitrary event to the manager interface
  • VMAuthenticate: Authenticate a user based on voicemail.conf
  • VoiceMail: Leave a voicemail message
  • VoiceMailMain: Enter voicemail system
  • Wait: Waits for some time
  • WaitExten: Waits for an extension to be entered
  • WaitForRing: Wait for Ring Application
  • WaitMusicOnHold: Wait, playing Music On Hold. Deprecated in favor of extended MusicOnHold. (1.6)
  • Asterisk cmd WaitUntil: Wait (sleep) until the current time is the given epoch (1.6+)
  • While: Start a while loop
  • Zapateller: Block telemarketers with SIT
  • DAHDIBarge: Barge in (monitor) Zap channel (was ZapBarge)
  • DAHDIRAS: Provide ISDN data service (was ZapRAS)
  • DAHDIScan: Scan Zap channels to monitor calls (was ZapScan)
  • DAHDISendKeypadFacility: Send digits out of band over a PRI (was ZapSendKeypadFacility)




See Also


Asterisk | Applications | Functions | Variables | Expressions | Asterisk FAQ


Comments

Comments Filter
222

333Two flavors of Include are not listed

by opus61856, Wednesday 26 of September, 2007 [13:14:56 UTC]
There is no mention of either #include or include commands.

Please add links from this page to the #include and include commands. I knew that I had seen a 'copy' type command somewhere and I found mention of it (#include) in the extensions.conf file that is shipped with Asterisk.
222

333Re: SIPCallPickup

by rushowr, Tuesday 29 of August, 2006 [19:33:19 UTC]
Er....um...try looking at the list of commands....ANSWER is a great one for your particular ponderings.
222

333SIPCallPickup

by flobi, Wednesday 18 of May, 2005 [23:20:20 UTC]
Why does the call pickup in SIP have to pre-empt the dialplan? Why can't we have a dialplan app that picks up a call instead?
222

333New application: Read(var|soundfile)

by , Wednesday 26 of November, 2003 [17:57:31 UTC]
Description:
 Read(variable[|filename]]):  Reads a '#' terminated string of digits from
the user, optionally playing a given filename first. Returns -1 on hangup or
error and 0 otherwise.