Asterisk func isnull
Synopsis: NULL Test: Returns 1 if NULL or 0 otherwise Description: ISNULL(<data>) Notes *CLI> show function ISNULL Return value Returns 1 if NULL or 0 otherwise. Example exten => s,1,Set(foo=${ISNULL(${var1})}) See also Asterisk variables Asterisk functions…
Read More »Asterisk func iftime
Synopsis Temporal Conditional: Returns the data following ‘?’ if true else the data following ‘:’ Description IFTIME(<timespec>?[<true>][:<false>]) Times before Asterisk 1.6.2 are only accurate down to the 2-minute interval. So 12:01 is treated the same as 12:00. Starting…
Read More »Asterisk func if
Synopsis Conditional: Returns the data following ‘?’ if true else the data following ‘:’ Description IF(<expr>?[<true>][:<false>]) Notes *CLI> show function IF Resides in func_logic.so module Return value Returns the resulting string. Example exten => s,1,Set(foo=${IF($[ ${x} = 7]?tval:fval)})…
Read More »Asterisk func iaxpeer
Synopsis: Gets IAX peer information Description: IAXPEER(<peername|CURRENTCHANNEL>[:item]) If peername specified, valid items are: ip: (default) The IP address. status: The peer’s status (if qualify=yes) mailbox: The configured mailbox. context : The configured context. expire: The epoch time of…
Read More »Asterisk func group_match_count
Synopsis: Counts the number of channels in the groups matching the specified pattern Description: GROUP_MATCH_COUNT(groupmatch[@category]) Calculates the group count for all groups that match the specified pattern. Uses standard regular expression matching (see regex(7)). New in Asterisk 1.8:…
Read More »Asterisk func group_count
Synopsis Counts the number of channels in the specified group Description GROUP_COUNT([groupname][@category]) Calculates the group count for the specified group, or uses the channel’s current group if not specifed (and non-empty). Notes *CLI> show function GROUP_COUNT Return…
Read More »Asterisk func group
Synopsis Gets, sets or clears the channel group. Each channel can only be member of exactly one group per category; categories can be employed for more fine grained group management, and thus can help to assign more than…
Read More »Asterisk func filter
Synopsis: Filter the string to include only the allowed characters Description: FILTER(<allowed-chars>,<string>) – Asterisk 1.6 and later FILTER(<allowed-chars>|<string>) – Asterisk 1.4 Notes *CLI> show function FILTER Return value Returns the resulting string. Examples exten => s,1,Set(foo=${FILTER(0-9,${cdrnum})})…
Read More »Asterisk func fieldqty
Synopsis Count the fields, with an arbitrary delimiter Description FIELDQTY(<varname>,<delim>) at least on asterisk 1.4.21.2 the parameters must be separated by “|” and not “,” Notes *CLI> show function FIELDQTY Return value Returns the resulting count. Examples…
Read More »Asterisk func exists
Synopsis: Existence Test: Returns 1 if exists, 0 otherwise Description: EXISTS(<data>) This checks the existance of a string. Consider the following: Var1=test Var2= EXISTS(${Var1}) = 1 EXISTS(${Var2}) = 0 If you’re dynamically creating variables and need to check…
Read More »Asterisk func eval
Evaluate stored variables. Description EVAL(<variable>) Using EVAL basically causes a string to be evaluated twice. When a variable or expression is in the dialplan, it will be evaluated at runtime. However, if the result of the evaluation is…
Read More »Asterisk func enumlookup
Synopsis ENUMLOOKUP allows for general or specific querying of NAPTR records or counts of NAPTR types for ENUM or ENUM-like DNS pointers. New in Asterisk 1.2, deprecates the application EnumLookup in Asterisk 1.4 Description in Asterisk 1.2: ENUMLOOKUP(number[,Method-type[,options|record#[,zone-suffix]]])…
Read More »Asterisk func dundilookup
Synopsis: Do a DUNDi lookup of a phone number. Description: DUNDILOOKUP(number[|context[|options]]) This will do a DUNDi lookup of the given phone number. If no context is given, the default will be e164. The result of this function will…
Read More »Asterisk func db_exists
DB_EXISTS() AstDB function to check if a key exists Synopsis: Check to see if a key exists in the Asterisk database Description: DB_EXISTS(<family>/<key>) This function checks whether a key exists in the Asterisk database. Checking for existence of…
Read More »Asterisk func curl
Retrieves the contents of a URL Description CURL(url[|post-data]) url – URL to retrieve post-data – Optional data to send as a POST (GET is default action) Return value Returns the resulting string/page. Configuration Make sure curl is on…
Read More »