login | register
Fri 29 of Aug, 2008 [01:25 UTC]

voip-info.org

History

Asterisk - documentation of application commands

Created by: oej,Last modification on Thu 14 of Aug, 2008 [05:30 UTC] by ldo


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.

General commands

  • Authenticate: Authenticate a user
  • VMAuthenticate: Authenticate a user based on voicemail.conf
  • Asterisk cmd Bridge: Connect two arbitrary callers (new in Asterisk v1.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
  • Asterisk cmd Log: New in Asterisk 1.6: Append text to the Asterisk log file(s)
  • 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




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
  • Macro: Macro Implementation
  • MacroExclusive: Only one channel at a time may call this macro, all others have to wait (1.4)
  • Asterisk cmd 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
  • DigitTimeout: Set maximum timeout between digits
  • 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
  • ResponseTimeout: Set maximum timeout awaiting response
  • 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


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.

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



ZAP commands

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

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 CVS)


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)
  • AddQueueMember: Dynamically adds queue members
  • ADSIProg: Load Asterisk ADSI Scripts into phone
  • AgentCallbackLogin: Call agent callback login. Deprecated.
  • 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
  • Answer: Answer a channel if ringing
  • AMD: Answering machine detection
  • AppendCDRUserField: Append data to the CDR user field. Deprecated in favor of CDR(userfield)
  • Authenticate: Authenticate a user
  • BackGround: Play a file while awaiting extension
  • BackgroundDetect: Background a file with talk detect
  • Asterisk cmd Bridge: Connect two arbitrary callers (new in Asterisk v1.6)
  • Busy: Indicate busy condition and wait for hangup
  • CallingPres: Change the presentation for the callerid in a ZAP channel
  • 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
  • Congestion: Indicate congestion and wait for hangup
  • 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.
  • DBRewrite: Execute perl compatible regular expression and substitution out of a MySQL Database.
  • 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)
  • Directory: Provide directory of voicemail extensions
  • DISA: DISA (Direct Inward System Access)
  • DTMFToText: Enter alphanumeric strings with DTMF phone
  • DUNDiLookup: Look up a number with DUNDi
  • EAGI: Executes an AGI compliant application on local or remote machine (FastAGI)
  • Echo: Echo audio read back to the user
  • EnumLookup: Lookup number in ENUM
  • ExtenSpy: Listen/whisper to a specific extension (new in 1.4)
  • Festival: Say text with the Festival voice synthesizer
  • Flash: Flashes a Zap 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
  • GetGroupMatchCount: Calculates group count for all groups that match pattern
  • 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.
  • Asterisk cmd HasVoicemail: Conditionally branches to priority + 101. Deprecated in favor of VMCOUNT.
  • ICES: Streaming calls to the Internet
  • ImportVar: Set variable to value
  • JabberStatus: Return presence status of client or transport as values 1-7
  • JabberSend: Send a message to a buddy
  • LookupBlacklist: Look up Caller*ID name/number from blacklist database. Deprecated in favor of DB.
  • LookupCIDName: Look up CallerID Name from local database. Deprecated in favor of DB.
  • Macro: Macro Implementation
  • MacroExclusive: Only one channel at a time may call this macro, all others have to wait (1.4)
  • Asterisk cmd 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
  • MeetMeCount: MeetMe participant count
  • Milliwatt: Generate a constant 1000Hz tone at 0dbm (mu-law)
  • Asterisk cmd MiniVM: Mini-Voicemail (new in v1.6)
  • MixMonitor: Record and mix call legs
  • Monitor: Record a telephone conversation to a sound file
  • MP3Player: Play an MP3 sound file or stream
  • MusicOnHold: Play Music On Hold indefinitely
  • MYSQL: Perform various mySQL database activities
  • Asterisk cmg 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 Asterisk cmd Log.
  • Page: Page multiple endpoints at once
  • 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
  • Asterisk cmd Pickup: Directed call pickup (in Asterisk 1.2.x)
  • PickUP: Pickup a Zap Channel before answered
  • 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
  • Progress: Play early audio to the caller before answering the line
  • Queue: Queue a call for a call queue
  • Read: Read a 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)
  • RetryDial: Place a call, retrying on failure allowing optional exit extension.
  • Return: Return from a Gosub or GosubIf (new in v1.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
  • SetAMAflags: Set the channel AMA Flags for billing
  • SetCallerID: Set CallerID. Deprecated in favor of CALLERID.
  • SetCallerPres: Channel independent setting of caller presenation
  • SetCDRUserField: Set CDR User Field. See Billing. Deprecated in favor of CDR(userfield)
  • SetGlobalVar: Set variable to value. Deprecated in favor of Asterisk func global.
  • 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
  • Steal: Steal a Zap Channel after answered
  • StackPop: Remove a return address without returning (new in v1.2)
  • StopMonitor: Stop monitoring a channel
  • StopPlaytones: Stop playing a tone list
  • System: Execute a system command
  • Transfer: Transfer caller to remote extension
  • TestClient: Execute Interface Test Client
  • TestServer: Execute Interface Test Server
  • TrySystem: Execute a system command with always 0 returned
  • TXTCIDName: Lookup caller name from TXT record
  • 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 some time
  • WaitForRing: Wait for Ring Application
  • WaitMusicOnHold: Wait, playing Music On Hold
  • Zapateller: Block telemarketers with SIT
  • ZapBarge: Barge in (monitor) Zap channel
  • ZapSendKeypadFacility: Send digits out of band over a PRI
  • ZapRAS: Provide ISDN data service
  • ZapScan: Scan Zap channels to monitor calls





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.