Skip to content

Instantly share code, notes, and snippets.

@jfinstrom
Created March 31, 2026 16:53
Show Gist options
  • Select an option

  • Save jfinstrom/07b9e3258fae448c807cf2ec78fd19d7 to your computer and use it in GitHub Desktop.

Select an option

Save jfinstrom/07b9e3258fae448c807cf2ec78fd19d7 to your computer and use it in GitHub Desktop.
FreePBX Dialplan ext class documentation

FreePBX Extension Classes Reference

Source: extensions.class.php

This document covers the extension base class and all ext_* subclasses used to generate Asterisk dialplan applications in FreePBX.


Table of Contents


Base Class — extension

The base class from which most ext_* classes inherit.

Property Type Description
$data mixed Generic data payload passed via the constructor.

Constructor: __construct($data = '')

Methods:

Method Description
output() Returns $this->data as raw dialplan output.
incrementContents($value) Hook for incrementing priority references. Returns true (no-op in base).

Usage:

$ext->add('from-internal', 's', '', new extension('NoOp(hello)'));

Call Flow & Routing

ext_goto

Generates the Asterisk Goto() application.

Parameter Type Default Description
$pri mixed (required) Priority or label to jump to.
$ext string|false false Extension to jump to. Required if $context is set.
$context string|false false Context to jump to.

Output: Goto([context,][ext,]pri)

Example:

new ext_goto('1', 's', 'ext-did');
// Output: Goto(ext-did,s,1)

ext_gotoif

Generates the Asterisk GotoIf() application for conditional branching.

Parameter Type Default Description
$condition string (required) The condition expression.
$true_priority string (required) Destination if condition is true.
$false_priority string|false false Destination if condition is false.

Output: GotoIf(condition?true_priority[:false_priority])

Example:

new ext_gotoif('$["${COUNT}" > "5"]', 'over5', 'under5');
// Output: GotoIf($["${COUNT}" > "5"]?over5:under5)

ext_gotoiftime

Generates the Asterisk GotoIfTime() application for time-based branching.

Parameter Type Default Description
$condition string (required) Time condition (e.g., 08:00-17:00,mon-fri,*,*).
$true_priority string (required) Destination if condition matches.

Note: For Asterisk ≥ 1.6, pipe (|) delimiters are automatically converted to commas (,).

Output: GotoIfTime(condition?true_priority)


ext_gosub

Generates the Asterisk Gosub() application.

Parameter Type Default Description
$pri mixed (required) Priority to call.
$ext string|false false Extension. Required if $context is set.
$context string|false false Context.
$args string '' Arguments to pass to the subroutine.

Output: Gosub([context,][ext,]pri(args))

Example:

new ext_gosub('1', 's', 'sub-record-check', 'in,${EXTEN}');
// Output: Gosub(sub-record-check,s,1(in,${EXTEN}))

ext_gosubif

Generates the Asterisk GosubIf() application for conditional subroutine calls.

Parameter Type Default Description
$condition string (required) The condition expression.
$true_priority string (required) Subroutine destination if true.
$false_priority string|false false Subroutine destination if false.
$true_args string '' Arguments for the true branch.
$false_args string '' Arguments for the false branch.

Output: GosubIf(condition?true_priority(true_args)[:false_priority(false_args)])


ext_return

Generates the Asterisk Return() application to return from a Gosub.

Parameter Type Default Description
$data string '' Optional return value.

Output: Return(data)


ext_stackpop

Generates the Asterisk StackPop() application. Removes the top entry from the gosub stack without returning.

Output: StackPop()


ext_macro

Generates a Gosub() call that emulates the deprecated Macro() application.

Parameter Type Default Description
$macro string (required) Macro name.
$args string '' Arguments.

Note: Macro() is deprecated in Asterisk. This class automatically converts to Gosub(macro-<name>,s,1(args)).

Output: Gosub(macro-<macro>,s,1(args))


ext_macroexit

Generates a return from a macro subroutine (deprecated macro compatibility).

Note: Automatically converted to Return(${GOSUB_RETVAL}) since Macro is deprecated.

Output: Return(${GOSUB_RETVAL})


ext_execif

Generates the Asterisk ExecIf() application.

Parameter Type Default Description
$expr string (required) Condition expression.
$app_true string (required) Application to run if true.
$data_true string '' Data for the true application.
$app_false string '' Application to run if false (Asterisk ≥ 1.6).
$data_false string '' Data for the false application.

Output: ExecIf(expr?app_true(data_true)[:app_false(data_false)])


ext_tryexec

Generates the Asterisk TryExec() application. Attempts to execute an application; if it doesn't exist, continues without error.

Parameter Type Default Description
$try_application string '' Application string to try.

Note: This class extends extensions (the container class) rather than extension — likely a bug in the original code.

Output: TryExec(try_application)


ext_transfer

Generates the Asterisk Transfer() application.

Parameter Type Default Description
$number string (required) Destination to transfer to.

Output: Transfer(number)


Looping

ext_while

Generates the Asterisk While() application to begin a loop.

Parameter Type Default Description
$data string '' Loop condition expression.

Output: While(data)


ext_endwhile

Generates the Asterisk EndWhile application to end a While loop.

Output: EndWhile


ext_exitwhile

Generates the Asterisk ExitWhile application to break out of a While loop.

Output: ExitWhile


ext_continuewhile

Generates the Asterisk ContinueWhile application to skip to the next loop iteration.

Output: ContinueWhile


Channel Operations

ext_dial

Generates the Asterisk Dial() application.

Parameter Type Default Description
$number string (required) Dial string (e.g., SIP/100).
$options string "tr" Dial options.

Output: Dial(number,options)

Example:

new ext_dial('SIP/100&SIP/101', '30,tTr');
// Output: Dial(SIP/100&SIP/101,30,tTr)

ext_originate

Generates the Asterisk Originate() application.

Parameter Type Default Description
$tech_data string (required) Technology/data for the channel (e.g., SIP/100).
$type string (required) Type: exten or app.
$arg1 string (required) First argument (context or app name).
$arg2 string (required) Second argument (extension or app data).
$arg3 string '' Third argument (priority).

Output: Originate(tech_data,type,arg1,arg2,arg3)


ext_bridge

Generates the Asterisk Bridge() application to bridge channels.

Parameter Type Default Description
$data string '' Bridge arguments.

Output: Bridge(data)


ext_answer

Generates the Asterisk Answer application.

Output: Answer


ext_hangup

Generates the Asterisk Hangup() application.

Parameter Type Default Description
$data string '' Optional hangup cause code.

Output: Hangup(data)


ext_busy

Generates the Asterisk Busy() application to indicate busy and wait.

Parameter Type Default Description
$time string '20' Seconds to wait before hanging up.

Output: Busy(time)


ext_congestion

Generates the Asterisk Congestion() application to indicate congestion.

Parameter Type Default Description
$time string '20' Seconds to wait before hanging up.

Output: Congestion(time)


ext_ringing

Generates the Asterisk Ringing() application to indicate ringing.

Output: Ringing()


ext_progress

Generates the Asterisk Progress application to send early media progress.

Output: Progress


ext_wait

Generates the Asterisk Wait() application.

Parameter Type Default Description
$data string '' Number of seconds to wait.

Output: Wait(data)


ext_waitexten

Generates the Asterisk WaitExten() application.

Parameter Type Default Description
$seconds string "" Seconds to wait for extension input.
$options string "" Additional options (e.g., music-on-hold class).

Output: WaitExten(seconds,options)


ext_waitforsilence

Generates the Asterisk WaitForSilence() application.

Parameter Type Default Description
$data string '' Parameters (silence threshold, iterations, timeout).

Output: WaitForSilence(data)


Variable & Data Operations

ext_setvar

Generates the Asterisk Set() application to set a channel variable.

Parameter Type Default Description
$var string (required) Variable name.
$value string '' Value to assign.

Output: Set(var=value)


ext_set

Alias for ext_setvar. Exists because SetVar() was renamed to Set() in Asterisk 1.2.


ext_setglobalvar

Generates the Asterisk Set() application with the global flag.

Parameter Type Default Description
$var string (required) Global variable name.
$value string (required) Value to assign.

Output: Set(var=value,g)


ext_sethash

Generates a Set() call that sets a hash variable. Extends ext_setvar.

Parameter Type Default Description
$hash string (required) Hash name.
$var string (required) Key within the hash.
$value string '' Value to assign.

Output: Set(HASH(hash,var)=value)


ext_clearhash

Generates the Asterisk ClearHash() application.

Parameter Type Default Description
$hash_name string (required) Hash name to clear.

Output: ClearHash(hash_name)


ext_setlanguage

Sets the channel language.

Parameter Type Default Description
$data string '' Language code (e.g., en, fr).

Output: Set(CHANNEL(language)=data)


ext_digittimeout

Sets the digit timeout for the channel.

Parameter Type Default Description
$data string '' Timeout in seconds.

Output: Set(TIMEOUT(digit)=data)


ext_responsetimeout

Sets the response timeout for the channel.

Parameter Type Default Description
$data string '' Timeout in seconds.

Output: Set(TIMEOUT(response)=data)


Caller ID

ext_setcidname

Sets the Caller ID name.

Parameter Type Default Description
$data string '' Caller ID name to set.

Output: Set(CALLERID(name)=data)


ext_setcallerpres

Sets the Caller ID presentation.

Parameter Type Default Description
$data string '' Presentation value (e.g., allowed_not_screened).

Note: Uses SetCallerPres() for Asterisk < 1.6, Set(CALLERPRES()=...) for ≥ 1.6.

Output: Set(CALLERPRES()=data) (Asterisk ≥ 1.6)


ext_setcallernamepres

Sets the Caller ID name presentation.

Parameter Type Default Description
$data string '' Presentation value.

Output: Set(CALLERID(name-pres)=data)


ext_setcallernumpres

Sets the Caller ID number presentation.

Parameter Type Default Description
$data string '' Presentation value.

Output: Set(CALLERID(num-pres)=data)


ext_lookupcidname

Looks up the Caller ID name from the AstDB cidname family and sets it if found.

Output: ExecIf($["${DB(cidname/${CALLERID(num)})}" != ""]?Set(CALLERID(name)=${DB(cidname/${CALLERID(num)})}))


ext_txtcidname

Looks up the Caller ID name via TXTCIDNAME function.

Parameter Type Default Description
$cidnum string (required) Caller ID number to look up.

Output: Set(TXTCIDNAME=${TXTCIDNAME(cidnum)})


SIP Headers

ext_sipaddheader

Adds a SIP header to the outgoing INVITE.

Parameter Type Default Description
$header string (required) Header name.
$value string (required) Header value.

Output: SIPAddHeader(header: value)


ext_sipgetheader

Gets a SIP header value and assigns it to a variable.

Parameter Type Default Description
$value string (required) Variable name to store the value.
$header string (required) Header name to retrieve.

Output: SIPGetHeader(value=header)


ext_sipremoveheader

Removes a SIP header.

Parameter Type Default Description
$data string '' Header name pattern to remove.

Output: SIPRemoveHeader(data)


ext_alertinfo

Adds an Alert-Info SIP header (commonly used for distinctive ring).

Parameter Type Default Description
$value string (required) Alert-Info value.

Output: SIPAddHeader(Alert-Info: value)


AstDB (Asterisk Database)

ext_dbget

Retrieves a value from the Asterisk database.

Parameter Type Default Description
$varname string (required) Variable to store the result.
$key string (required) Database key (family/key format).

Output: Set(varname=${DB(key)})


ext_dbput

Stores a value in the Asterisk database.

Parameter Type Default Description
$key string (required) Database key (family/key format).
$data string (required) Value to store.

Output: Set(DB(key)=data)


ext_dbdel

Deletes a key from the Asterisk database.

Parameter Type Default Description
$data string '' Database key to delete (family/key format).

Output: Noop(Deleting: data ${DB_DELETE(data)})


ext_dbdeltree

Deletes an entire family/tree from the Asterisk database.

Parameter Type Default Description
$data string '' Database family to delete.

Output: dbDeltree(data)


ext_db_put

Stores a value in the Asterisk database using family/key format.

Parameter Type Default Description
$family string (required) Database family.
$key string (required) Database key.
$value string (required) Value to store.

Output: Set(DB(family/key)=value)


Voicemail

ext_vm

Generates the Asterisk VoiceMail() application.

Parameter Type Default Description
$data string '' Mailbox and options (e.g., 100@default,u).

Output: VoiceMail(data)


ext_vmmain

Generates the Asterisk VoiceMailMain() application.

Parameter Type Default Description
$data string '' Mailbox and options.

Output: VoiceMailMain(data)


ext_vmexists

Checks if a voicemail box exists and sets VMBOXEXISTSSTATUS.

Parameter Type Default Description
$data string '' Mailbox to check (e.g., 100@default).

Output: Set(VMBOXEXISTSSTATUS=${IF(${VM_INFO(data,exists)}?SUCCESS:FAILED)})


ext_vmauthenticate

Generates the Asterisk VMAuthenticate() application.

Parameter Type Default Description
$mailbox string '' Mailbox for authentication.
$options string '' Options (e.g., s for skip).

Output: VMAuthenticate(mailbox[,options])


Queue Management

ext_queue

Generates the Asterisk Queue() application.

Parameter Type Default Description
$queuename string (required) Queue name.
$options string (required) Queue options.
$optionalurl string (required) Optional URL.
$announceoverride string (required) Announcement override file.
$timeout string (required) Timeout in seconds.
$agi string '' AGI script to run.
$macro string '' Macro to run.
$gosub string '' Gosub to run.
$rule string '' Queue rule.
$position string '' Position in queue.

Output: Queue(queuename,options,URL,announceoverride,timeout,AGI,macro,gosub,rule,position)


ext_queuelog

Generates the Asterisk QueueLog() application.

Parameter Type Default Description
$queue string (required) Queue name.
$uniqueid string (required) Unique call ID.
$agent string (required) Agent interface.
$event string (required) Event name.
$additionalinfo string '' Additional info.

Output: QueueLog(queue,uniqueid,agent,event,additionalinfo)


ext_addqueuemember

Generates the Asterisk AddQueueMember() application.

Parameter Type Default Description
$queue string (required) Queue name.
$channel string (required) Channel/interface to add.

Output: AddQueueMember(queue,channel)


ext_removequeuemember

Generates the Asterisk RemoveQueueMember() application.

Parameter Type Default Description
$queue string (required) Queue name.
$channel string (required) Channel/interface to remove.

Output: RemoveQueueMember(queue,channel)


ext_PauseQueueMember

Generates the Asterisk PauseQueueMember() application.

Parameter Type Default Description
$queue string (required) Queue name.
$agent string (required) Agent interface.
$event string '' Reason/event.
$additionalinfo string '' Additional info.

Output: PauseQueueMember(queue,agent,event,additionalinfo)


ext_UnpauseQueueMember

Generates the Asterisk UnpauseQueueMember() application.

Parameter Type Default Description
$queue string (required) Queue name.
$agent string (required) Agent interface.
$event string (required) Reason/event.
$additionalinfo string '' Additional info.

Output: UnpauseQueueMember(queue,agent,event,additionalinfo)


Conferencing

ext_confbridge

Generates the Asterisk ConfBridge() application.

Parameter Type Default Description
$confno string (required) Conference number/name.
$options string '' Bridge profile options.
$pin string '' PIN for the conference.

Output: ConfBridge(confno,options,pin)


ext_meetme

Generates either MeetMe() or ConfBridge() depending on the ASTCONFAPP configuration.

Parameter Type Default Description
$confno string (required) Conference number.
$options string '' Conference options.
$pin string '' Conference PIN.

Note: When ASTCONFAPP is app_confbridge, MeetMe-only options are automatically stripped.

Output: MeetMe(confno,options,pin) or ConfBridge(confno,options,pin)

Helper Method: in_ast_var_range($pos, $range) — Checks if a character position falls within an Asterisk variable range.


ext_meetmeadmin

Generates the Asterisk MeetMeAdmin() application.

Parameter Type Default Description
$confno string (required) Conference number.
$command string (required) Admin command (e.g., K for kick).
$user string '' User number.

Output: MeetMeAdmin(confno,command,user)


Recording & Monitoring

ext_record

Generates the Asterisk Record() application.

Parameter Type Default Description
$data string '' Filename and options.

Output: Record(data)


ext_mixmonitor

Generates the Asterisk MixMonitor() application for call recording.

Parameter Type Default Description
$file string (required) Filename to record to.
$options string "" Recording options (e.g., a for append).
$postcommand string "" Command to execute after recording.

Output: MixMonitor(file,options,postcommand)


ext_stopmonitor

Generates the Asterisk StopMonitor() application.

Parameter Type Default Description
$data string '' Optional parameters.

Output: StopMonitor(data)


ext_stopmixmonitor

Generates the Asterisk StopMixMonitor() application.

Parameter Type Default Description
$data string '' Optional parameters.

Output: StopMixMonitor(data)


ext_pausemonitor

Generates the Asterisk PauseMonitor() application.

Output: PauseMonitor()


ext_unpausemonitor

Generates the Asterisk UnPauseMonitor() application.

Output: UnPauseMonitor()


CDR (Call Detail Record)

ext_resetcdr

Generates the Asterisk ResetCDR() application.

Parameter Type Default Description
$data string '' Options.

Output: ResetCDR(data)


ext_nocdr

Disables CDR for the current channel.

Note: For Asterisk ≥ 12.0, outputs Set(CDR_PROP(disable)=true). For older versions, outputs NoCDR().

Output: Set(CDR_PROP(disable)=true) (Asterisk ≥ 12.0)


ext_forkcdr

Generates the Asterisk ForkCDR() application.

Output: ForkCDR()


Playback & Prompts

ext_playback

Generates the Asterisk Playback() application.

Parameter Type Default Description
$data string '' Sound file(s) to play.

Output: Playback(data)


ext_background

Generates the Asterisk Background() application (plays sound while accepting DTMF input).

Parameter Type Default Description
$data string '' Sound file(s) to play.

Output: Background(data)


ext_backgrounddetect

Generates the Asterisk BackgroundDetect() application for background sound detection.

Parameter Type Default Description
$filename string (required) Sound file to play.
$silence int|null null Silence threshold in ms.
$min int|null null Minimum talking duration in ms.
$max int|null null Maximum talking duration in ms.

Output: BackgroundDetect(filename[,silence][,min][,max])


ext_read

Generates the Asterisk Read() application to read DTMF input.

Parameter Type Default Description
$astvar string (required) Variable to store input.
$filename string '' Prompt file to play.
$maxdigits string '' Maximum digits to accept.
$option string '' Options (e.g., s for skip).
$attempts string '' Number of attempts.
$timeout string '' Timeout in seconds.

Output: Read(astvar,filename,maxdigits,option,attempts,timeout)


ext_saydigits

Generates the Asterisk SayDigits() application.

Parameter Type Default Description
$data string '' Digits to say.

Output: SayDigits(data)


ext_saynumber

Generates the Asterisk SayNumber() application.

Parameter Type Default Description
$data string (required) Number to say.
$gender string 'f' Gender for language-specific pronunciation.

Output: SayNumber(data,gender)


ext_sayalpha

Generates the Asterisk SayAlpha() application.

Parameter Type Default Description
$data string '' String to spell out.

Output: SayAlpha(data)


ext_sayphonetic

Generates the Asterisk SayPhonetic() application.

Parameter Type Default Description
$data string '' String to speak phonetically.

Output: SayPhonetic(data)


ext_sayunixtime

Generates the Asterisk SayUnixTime() application.

Parameter Type Default Description
$data string '' Unix timestamp and format options.

Note: Backslashes are automatically stripped for Asterisk ≥ 1.6 compatibility.

Output: SayUnixTime(data)


ext_echo

Generates the Asterisk Echo() application (echo audio for testing).

Parameter Type Default Description
$data string '' Options.

Output: Echo(data)


ext_flite

Generates the Flite() application (text-to-speech using Flite).

Parameter Type Default Description
$data string '' Text to speak.

Output: Flite('data')


ext_festival

Generates the Festival() application (text-to-speech using Festival).

Parameter Type Default Description
$data string '' Text to speak.

Output: Festival(data)


ext_playtones

Generates the Asterisk Playtones() application.

Parameter Type Default Description
$data string '' Tone definition string.

Output: Playtones(data)


ext_stopplaytones

Generates the Asterisk StopPlaytones application.

Output: StopPlaytones


Music on Hold

ext_musiconhold

Generates the Asterisk MusicOnHold() application.

Parameter Type Default Description
$data string '' Music class and options.

Output: MusicOnHold(data)


ext_setmusiconhold

Sets the music-on-hold class for the channel.

Parameter Type Default Description
$data string '' Music class name.

Output: Set(CHANNEL(musicclass)=data)


ext_startmusiconhold

Generates the Asterisk StartMusicOnHold() application.

Parameter Type Default Description
$data string '' Music class.

Output: StartMusicOnHold(data)


ext_stopmusiconhold

Generates the Asterisk StopMusicOnHold() application.

Output: StopMusicOnHold()


AGI (Asterisk Gateway Interface)

ext_agi

Generates the Asterisk AGI() application.

Parameter Type Default Description
$data string '' AGI script path and arguments.

Note: If FastAGI is enabled in FreePBX Core, the script path is automatically prepended with agi://127.0.0.1/ unless it already uses an agi:// URI.

Output: AGI(data) or AGI(agi://127.0.0.1/data)


ext_deadagi

Generates the Asterisk DeadAGI() application (AGI for dead/hungup channels).

Parameter Type Default Description
$data string '' AGI script path and arguments.

Output: DeadAGI(data)


Speech Recognition

ext_speechcreate

Generates the Asterisk SpeechCreate() application to initialize a speech engine.

Parameter Type Default Description
$engine string|null null Speech engine name.

Output: SpeechCreate([engine])


ext_speechstart

Generates the Asterisk SpeechStart() application.

Output: SpeechStart()


ext_speechloadgrammar

Generates the Asterisk SpeechLoadGrammar() application.

Parameter Type Default Description
$grammar_name string (required) Grammar identifier.
$path_to_grammar string (required) Path to the grammar file.

Output: SpeechLoadGrammar(grammar_name,path_to_grammar)


ext_speechunloadgrammar

Generates the Asterisk SpeechUnloadGrammar() application.

Parameter Type Default Description
$grammar_name string (required) Grammar to unload.

Output: SpeechUnloadGrammar(grammar_name)


ext_speechactivategrammar

Generates the Asterisk SpeechActivateGrammar() application.

Parameter Type Default Description
$grammar_name string (required) Grammar to activate.

Output: SpeechActivateGrammar(grammar_name)


ext_speechdeactivategrammar

Generates the Asterisk SpeechDeactivateGrammar() application.

Parameter Type Default Description
$grammar_name string (required) Grammar to deactivate.

Output: SpeechDeactivateGrammar(grammar_name)


ext_speechbackground

Generates the Asterisk SpeechBackground() application (speech recognition with background audio).

Parameter Type Default Description
$sound_file string (required) Sound file to play.
$timeout int|null null Recognition timeout.

Output: SpeechBackground(sound_file[,timeout])


ext_speechprocessingsound

Generates the Asterisk SpeechProcessingSound() application (plays a sound while processing speech results).

Parameter Type Default Description
$sound_file string (required) Sound file to play during processing.

Output: SpeechProcessingSound(sound_file)


ext_speechdestroy

Generates the Asterisk SpeechDestroy() application to destroy a speech engine instance.

Output: SpeechDestroy()


ext_speechdtmfmaxdigits

Sets the maximum number of DTMF digits before the speech engine stops recognition.

Parameter Type Default Description
$digits int (required) Maximum DTMF digits.

Note: Call before ext_speechbackground. Recognized DTMF is returned in ${SPEECH_TEXT(0)}.

Output: Set(SPEECH_DTMF_MAXLEN=digits)


ext_speechdtmfterminator

Sets the DTMF terminator character for speech recognition.

Parameter Type Default Description
$terminator string (required) Terminator character (default in Asterisk is #).

Note: Call before ext_speechbackground. By default # is the terminator; override this if you need to recognize # as input.

Output: Set(SPEECH_DTMF_TERMINATOR=terminator)


Fax

ext_nvfaxdetect

Generates the NVFaxDetect() application.

Parameter Type Default Description
$data string '' Detection parameters.

Note: Pipe (|) delimiters are automatically converted to commas (,).

Output: NVFaxDetect(data)


ext_receivefax

Generates the ReceiveFAX() application.

Parameter Type Default Description
$data string '' Filename and options.

Output: ReceiveFAX(data)


ext_rxfax

Generates the rxfax() application.

Parameter Type Default Description
$data string '' Filename and options.

Output: rxfax(data)


ext_sendfax

Generates the SendFAX() application.

Parameter Type Default Description
$data string '' Filename and options.

Output: SendFAX(data)


Call Completion

ext_callcompletionrequest

Generates the Asterisk CallCompletionRequest() application.

Parameter Type Default Description
$data string '' Options.

Output: CallCompletionRequest(data)


ext_callcompletioncancel

Generates the Asterisk CallCompletionCancel() application.

Parameter Type Default Description
$data string '' Options.

Output: CallCompletionCancel(data)


Messaging

ext_messagesend

Generates the Asterisk MessageSend() application.

Parameter Type Default Description
$to string (required) Destination URI.
$from string|null null From URI.

Output: MessageSend(to[,from])


Authentication & Privacy

ext_authenticate

Generates the Asterisk Authenticate() application.

Parameter Type Default Description
$pass string (required) Password or file path.
$options string '' Options (e.g., a for absolute path, d for database, r for remove).

Output: Authenticate(pass,options)


ext_privacymanager

Generates the Asterisk PrivacyManager() application.

Parameter Type Default Description
$data string '' Options (max retries, min length, context).

Output: PrivacyManager(data)


ext_lookupblacklist

Generates the Asterisk LookupBlacklist() application.

Parameter Type Default Description
$data string '' Options.

Output: LookupBlacklist(data)


ext_zapateller

Generates the Zapateller() application (SIT tone to deter telemarketers).

Parameter Type Default Description
$data string '' Options.

Output: Zapateller(data)


Call Pickup & Spy

ext_pickup

Generates the Asterisk Pickup() application.

Parameter Type Default Description
$data string '' Extension and context to pick up.

Output: Pickup(data)


ext_dpickup

Generates the Asterisk DPickup() (Directed Pickup) application.

Parameter Type Default Description
$data string '' Extension and context to pick up.

Output: DPickup(data)


ext_chanspy

Generates the Asterisk ChanSpy() application.

Parameter Type Default Description
$prefix string '' Channel name prefix to spy on.
$options string '' Spy options (e.g., qw for quiet whisper).

Output: ChanSpy(prefix[,options])


ext_chanisavail

Generates the Asterisk ChanIsAvail() application.

Parameter Type Default Description
$chan string (required) Channel(s) to check.
$options string '' Options.

Output: ChanIsAvail(chan,options)


Parking

ext_park

Generates the Asterisk Park() application.

Parameter Type Default Description
$data string '' Options: [timeout][,return_context[,return_exten[,return_priority[,options[,parking_lot_name]]]]]

Output: Park(data)


ext_parkedcall

Generates the Asterisk ParkedCall() application to retrieve a parked call.

Parameter Type Default Description
$data string '' Parking lot extension.

Output: ParkedCall(data)


ext_parkandannounce

Generates the Asterisk ParkAndAnnounce() application.

Parameter Type Default Description
$data string '' Parameters: announce:announce1[:...],timeout,dial,return_context

Output: ParkAndAnnounce(data)


DTMF

ext_senddtmf

Generates the Asterisk SendDTMF() application.

Parameter Type Default Description
$digits string (required) DTMF digits to send.

Output: SendDTMF(digits)


AMD (Answering Machine Detection)

ext_amd

Generates the Asterisk AMD() application.

Output: AMD()


DISA (Direct Inward System Access)

ext_disa

Generates the Asterisk DISA() application.

Parameter Type Default Description
$data string '' Password and context (e.g., no-password,from-internal).

Output: DISA(data)


Paging

ext_page

Generates the Asterisk Page() application.

Parameter Type Default Description
$data string '' Channels and options.

Output: Page(data)


MySQL

ext_mysql_connect

Generates the MYSQL(Connect ...) dialplan command.

Parameter Type Default Description
$connid string (required) Variable for connection ID.
$dbhost string (required) Database hostname.
$dbuser string (required) Database username.
$dbpass string (required) Database password.
$dbname string (required) Database name.
$charset string '' Character set (Asterisk ≥ 1.8).

Output: MYSQL(Connect connid dbhost dbuser dbpass dbname [charset])


ext_mysql_query

Generates the MYSQL(Query ...) dialplan command.

Parameter Type Default Description
$resultid string (required) Variable for result ID.
$connid string (required) Connection ID variable name.
$query string (required) SQL query (may contain Asterisk variables).

Output: MYSQL(Query resultid ${connid} query)


ext_mysql_fetch

Generates the MYSQL(Fetch ...) dialplan command.

Parameter Type Default Description
$fetchid string (required) Variable for fetch status.
$resultid string (required) Result ID variable name.
$vars string (required) Variables to populate with row data.

Output: MYSQL(Fetch fetchid ${resultid} vars)


ext_mysql_clear

Generates the MYSQL(Clear ...) dialplan command.

Parameter Type Default Description
$resultid string (required) Result ID variable name to clear.

Output: MYSQL(Clear ${resultid})


ext_mysql_disconnect

Generates the MYSQL(Disconnect ...) dialplan command.

Parameter Type Default Description
$connid string (required) Connection ID variable name.

Output: MYSQL(Disconnect ${connid})


Dictation

ext_dictate

Generates the Asterisk Dictate() application.

Parameter Type Default Description
$data string '' Base directory for dictation files.

Output: Dictate(data)


Debugging & Logging

ext_noop

Generates the Asterisk Noop() application (no-op, useful for debugging/comments in dialplan).

Parameter Type Default Description
$data string '' Message string.

Output: Noop(data)


ext_noop_trace

Conditional Noop() that only generates output when NOOPTRACE is enabled and meets the trace level threshold.

Parameter Type Default Description
$string string (required) Trace message.
$level int 3 Trace level (output only if NOOPTRACE ≥ level).

Output: Noop([TRACE](level) string) — or false if tracing is disabled/below threshold.

Note: Returning false from output() suppresses the dialplan line entirely.


ext_dumpchan

Generates the Asterisk DumpChan application (dumps channel information to the console).

Output: DumpChan


ext_log

Generates the Asterisk Log() application.

Parameter Type Default Description
$level string (required) Log level (ERROR, WARNING, NOTICE, DEBUG, VERBOSE).
$msg string (required) Log message.

Output: Log(level,msg)


Miscellaneous

ext_stasis

Generates the Asterisk Stasis() application for ARI (Asterisk REST Interface) integration.

Parameter Type Default Description
$app_name string (required) Stasis application name.
$args string '' Arguments to pass to the application.

Output: Stasis(app_name,args)


ext_system

Generates the Asterisk System() application to execute system commands.

Parameter Type Default Description
$data string '' System command to execute.

Output: System(data)


ext_userevent

Generates the Asterisk UserEvent() application.

Parameter Type Default Description
$eventname string (required) Event name.
$body string "" Event body/data.

Output: UserEvent(eventname[,body])


ext_vqa

Generates the VQA() (Voice Quality Analyzer) application.

Parameter Type Default Description
$data string '' VQA parameters.

Output: VQA(data)


ext_zapbarge

Generates a barge-in application for Zap/DAHDI channels.

Parameter Type Default Description
$data string '' Channel to barge into.

Version behavior:

  • Asterisk < 12.5: Outputs DAHDIBarge(data) or ZapBarge(data) depending on the channel driver.
  • Asterisk ≥ 12.5: Outputs Noop(Using zapbarge or DAHDibarge has been removed) and logs a deprecation warning.

Output: DAHDIBarge(data) / ZapBarge(data) / Noop(Using zapbarge or DAHDibarge has been removed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment