special extensions

2
Special extensions There are some extensions with important meanings: s - What to do when an extension context is entered (unless overridden by the lo w level channel interface) This is used in macros, and some special cases. "s" is not a generic catch-all w ildcard extension. i - What to do if an invalid extension is entered h - The hangup extension, executed at hangup t - What to do if nothing is entered in the requisite amount of time. T - This is the extension that is executed when the 'absolute' timeout is reache d. See "core show function TIMEOUT" for more information on setting timeouts. e - This extension will substitute as a catchall for any of the 'i', 't', or 'T'  extensions, if any of them do not exist and catching the error in a single routine is desire d. The function EXCEPTION may be used to query the type of exception or the locatio n where it occurred. And finally, the extension context "default" is used when either a) an extension context is deleted while an extension is in use, or b) a specific starting extension handler has not been defined (unless overrid den by the low level channel interface). i: the invalid entry extension If Asterisk can't find an extension in the current context that matches the digits dialed during the Background() or WaitExten() applications, it will send the call to th e i extension. You can then handle the call however you see fit. t: the reponse timeout extension When the caller waits too long before entering a response to the Backgro und() or WaitExten() applications, and there are no more priorities in the current extension, the call is sent to t he t extension. s: the start extension When an analog call comes into Asterisk, the call is sent to the s exten sion. The s extension is also used in macros. Please note that the s extension is not a catch-all extension. It's simply the location that analog calls and macros begin. In our example above, it simply makes a convenient extension to use that can't b e easily dialed from the Background() and WaitExten() applications. h: the hangup extension When a call is hung up, Asterisk executes the h extension in the current

Upload: nguyen-thanh-nam

Post on 02-Jun-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Special Extensions

 

Special extensions

There are some extensions with important meanings:s - What to do when an extension context is entered (unless overridden by the low level channel interface)This is used in macros, and some special cases. "s" is not a generic catch-all wildcard extension.

i - What to do if an invalid extension is entered

h - The hangup extension, executed at hangup

t - What to do if nothing is entered in the requisite amount of time.

T - This is the extension that is executed when the 'absolute' timeout is reached.See "core show function TIMEOUT" for more information on setting timeouts.

e - This extension will substitute as a catchall for any of the 'i', 't', or 'T' extensions,if any of them do not exist and catching the error in a single routine is desired.The function EXCEPTION may be used to query the type of exception or the location where it occurred.

And finally, the extension context "default" is used when eithera) an extension context is deleted while an extension is in use,

or b) a specific starting extension handler has not been defined (unless overridden by the low level channel interface).

i: the invalid entry extensionIf Asterisk can't find an extension in the current context that matches

the digits dialedduring the Background() or WaitExten() applications, it will send the call to the i extension.You can then handle the call however you see fit.

t: the reponse timeout extensionWhen the caller waits too long before entering a response to the Backgro

und() or WaitExten() applications,and there are no more priorities in the current extension, the call is sent to the t extension.

s: the start extensionWhen an analog call comes into Asterisk, the call is sent to the s exten

sion.The s extension is also used in macros.Please note that the s extension is not a catch-all extension.It's simply the location that analog calls and macros begin.In our example above, it simply makes a convenient extension to use that can't be easily dialed from the Background() and WaitExten() applications.

h: the hangup extensionWhen a call is hung up, Asterisk executes the h extension in the current

Page 2: Special Extensions

 

 context.This is typically used for some sort of clean-up after a call has been completed.

o: the operator extensionIf a caller presses the zero key on their phone keypad while recording a

 voice mail message,and the o extension exists, the caller will be redirected to the o extension.This is typically used so that the caller can press zero to reach an operator.

a: the assistant extensionThis extension is similar to the o extension, only it gets triggered

when the caller presses the asterisk (*) key while recording a voice mail message.This is typically used to reach an assistant.