G-L
From AstriPedia
- Index G-L of Asterisk Applications
Contents |
GetCPEID
Synopsis
Get ADSI CPE ID
Description
GetCPEID: Obtains and displays ADSI CPE ID and other information in order to properly setup zapata.conf for on-hook operations.
GetGroupCount
Synopsis
Get the channel count of a group
Description
Usage: GetGroupCount([groupname][@category])
Calculates the group count for the specified group, or uses the current channel's group if not specifed (and non-empty). Stores result in GROUPCOUNT. Note: This application has been deprecated, please use the function GROUP_COUNT.
GetGroupMatchCount
Synopsis
Get the channel count of all groups that match a pattern
Description
Usage: GetGroupMatchCount(groupmatch[@category])
Calculates the group count for all groups that match the specified pattern. Uses standard regular expression matching (see regex(7)). Stores result in GROUPCOUNT. Always returns 0. Note: This application has been deprecated, please use the function GROUP_MATCH_COUNT.
Gosub
Synopsis
Jump to label, saving return address
Description
Gosub([context|]exten|]priority) Jumps to the label specified, saving the return address.
GosubIf
Synopsis
Jump to label, saving return address
Description
GosubIf(condition?labeliftrue[:labeliffalse]) If the condition is true, then jump to labeliftrue. If false, jumps to labeliffalse, if specified. In either case, a jump saves the return point in the dialplan, to be returned to with a Return.
GotoIfTime
Synopsis
Conditional Goto based on the current time
Description
GotoIfTime(<times>|<weekdays>|<mdays>|<months>?[context|]exten|]priority):
This application will set the context, extension, and priority in the channel structure if the current time matches the given time specification. Otherwise, nothing is done. Further information on the time specification can be found in examples illustrating how to do time-based context includes in the dialplan. If the target jump location is bogus, Asterisk will respond as outlined in Goto.
Goto
Synopsis
Jump to a particular priority, extension, or context
Description
Goto([context|]extension|]priority):
This application will set the current context, extension, and priority in the channel structure. After it completes, the pbx engine will continue dialplan execution at the specified location. If no specific extension, or extension and context, are specified, then this application will just set the specified priority of the current extension.
At least a priority is required as an argument, or the goto will return a -1, and the channel and call will be terminated. If the location that is put into the channel information is bogus, and asterisk cannot find that location in the dialplan, then the execution engine will try to find and execute the code in the 'i' (invalid) extension in the current context.
If that does not exist, it will try to execute the 'h' extension. If either or neither the 'h' or 'i' extensions have been defined, the channel is hung up, and the execution of instructions on the channel is terminated.
What this means is that, for example, you specify a context that does not exist, then it will not be possible to find the 'h' or 'i' extensions, and the call will terminate!
GotoIf
Synopsis
Conditional goto
Description
GotoIf(condition?[labeliftrue]:[labeliffalse]):
This application will set the current context, extension, and priority in the channel structure based on the evaluation of the given condition. After this application completes, the pbx engine will continue dialplan execution at the specified location in the dialplan. The channel will continue at 'labeliftrue' if the condition is true, or 'labeliffalse' if the condition is false. The labels are specified with the same syntax as used within the Goto application. If the label chosen by the condition is omitted, no jump is performed, and the execution passes to the next instruction. If the target location is bogus, and does not exist, the execution engine will try to find and execute the code in the 'i' (invalid) extension in the current context. If that does not exist, it will try to execute the 'h' extension. If either or neither the 'h' or 'i' extensions have been defined, the channel is hung up, and the execution of instructions on the channel is terminated. Remember that this command can set the current context, and if the context specified does not exist, then it will not be able to find any 'h' or 'i' extensions there, and the channel and call will both be terminated!
Hangup
Synopsis
Hang up the calling channel
Description
Hangup(): This application will hang up the calling channel.
HasNewVoicemail
Synopsis
Conditionally branches to priority + 101 with the right options set
Description
HasNewVoicemail(vmbox[/folder][@context][|varname[|options]])
Assumes folder 'INBOX' if folder is not specified. Optionally sets <varname> to the number of messages in that folder. The option string may contain zero of the following character: 'j' -- jump to priority n+101, if there is new voicemail in folder 'folder' or INBOX This application sets the following channel variable upon completion: HASVMSTATUS The result of the new voicemail check returned as a text string as follows <# of messages in the folder, 0 for NONE>
IAX2Provision
Synopsis
Provision a calling IAX2 with a given template
Description
IAX2Provision([template]): Provisions the calling IAX2 (assuming the calling entity is in fact an IAX2) with the given template or default if one is not specified. Returns -1 on error or 0 on success.
ICES
Synopsis
Encode and stream using 'ices'
Description
ICES(config.xml) Streams to an icecast server using ices (available separately). A configuration file must be supplied for ices (see examples/asterisk-ices.conf).
ImportVar
Synopsis
Import a variable from a channel into a new variable
Description
ImportVar(newvar=channelname|variable): This application imports a variable from the specified channel (as opposed to the current one) and stores it as a variable in the current channel (the channel that is calling this application). Variables created by this application have the same inheritance properties as those created with the Set application. See the documentation for Set for more information.
LookupBlacklist
Synopsis
Look up Caller*ID name/number from blacklist database
Description
LookupBlacklist(options): Looks up the Caller*ID number on the active channel in the Asterisk database (family 'blacklist'). The option string may contain the following character: 'j' -- jump to n+101 priority if the number/name is found in the blacklist This application sets the following channel variable upon completion: LOOKUPBLSTATUS The status of the Blacklist lookup as a text string, one of FOUND | NOTFOUND
Example: exten => 1234,1,LookupBlacklist()
LookupCIDName
Synopsis
Look up CallerID Name from local database
Description
LookupCIDName: Looks up the Caller*ID number on the active channel in the Asterisk database (family 'cidname') and sets the Caller*ID name. Does nothing if no Caller*ID was received on the channel. This is useful if you do not subscribe to Caller*ID name delivery, or if you want to change the names on some incoming calls.
