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 \before 1.6, or \versions from 1.4.
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:
o Green - Added/functional version o Orange - Deprecated version
o Red - Removed/no longer in present version General commands
? Authenticate: Authenticate a user. (1.0) ? VMAuthenticate: Authenticate a user based on voicemail.conf. (1.2) ? 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 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 DUNDILOOKUP. (1.2, 1.4) ? GetGroupCount: Group count for specified group or channel is in. Deprecated in favor of GROUP_COUNT (1.2, 1.4) ? GetGroupMatchCount: Calculates group count for all groups that match pattern. Deprecated in favor of 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) ? Asterisk cmd 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 GROUP (1.2, 1.4) 第1页 共14页
? 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) ? 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
? 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) ? 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) ? AppendCDRUserField: Append data to 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) ? 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) 第2页 共14页
? 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 ${DB(cidname/${CALLERID(num)})}. (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
? ADSIProg: Load Asterisk ADSI Scripts into phone. (1.0) ? GetCPEID: Get ADSI CPE ID. (1.0) 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) ? Asterisk cmd ODBCFinish: Clear the resultset of a successful multirow query (1.6) ? RealTime: Populate variables with details from database using RealTime. Deprecated in favor of REALTIME. (1.4, 1.6) ? RealTimeUpdate: Update a field in a database using RealTime. Deprecated in favor of 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 ENUMLOOKUP. (1.2, 1.4) ? ExternalIVR: Executes an ExternalIVR generator. (1.2) ? JabberSend: Send a text message via Jabber. (1.4) 第3页 共14页
? JabberStatus: Return presence status of client or transport as values 1-7 (1.4) ? Jack: Interface to JACK audio for audio manipulation. (1.6) ? Read: Read DTMF tones into a variable. (1.0) ? Asterisk cmd 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 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) ? 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) ? Asterisk cmd 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 GotoIf($[${RAND(1,100)} >
相关推荐: