Author: VoIP Info
Asterisk func queueagentcount
Synopsis: Count number of members answering a queue Description: QUEUEAGENTCOUNT(<queuename>) By agent, this function really refers to queue members, which are the operators answering a queue (as opposed to the callers). This function has been renamed in 1.3dev…
Read More »Asterisk func rand
Synopsis: Choose a random number in a range Description: RAND([min][,max]) Choose a random number between min and max. Min defaults to 0, if not specified, while max defaults to RAND_MAX (2147483647 on many systems). Notes *CLI> core show…
Read More »Asterisk func regex
Synopsis Regular Expression: Returns 1 if data matches regular expression. Description REGEX(“<regular expression>” <data>) Is the regular expression tied to the beginning of the string? Notes *CLI> show function REGEX Return value Returns 1 if data matches regular…
Read More »Asterisk func set
Synopsis: SET assigns a value to a channel variable Description: ${SET(<varname>=[<value>])} Notes Might be useful to assign the value of a complex expression to a variable, while still using that value to evaluate still another expression. …
Read More »Asterisk func sipchaninfo
Synopsis: Gets the specified SIP parameter from the current channel Deprecation SIPCHANINFO() is deprecated in 1.6. Use CHANNEL. Description: SIPCHANINFO(item) Valid items are: peerip: The IP address of the peer. recvip: The source IP address of the peer….
Read More »Asterisk func sippeer
Synopsis: Gets SIP peer information Doesn’t work with RealTime. Description: SIPPEER(<peername>[:item]) SIPPEER(<peername>[,item]) – for Asterisk 1.6 Valid items are: ip (default): The IP address. port: The port number. (1.6) mailbox: The configured mailbox. context: The configured context. expire:…
Read More »Asterisk func sip_header
Synopsis Gets the specified SIP header Description SIP_HEADER(<name>) Notes: SIP_HEADER() gives you only access to headers of the initial INVITE request (and not, for example, any progress messages (which may contain call rating information) or the final BYE…
Read More »Asterisk func stat
Synopsis: Does a check on the specified file (NEW in Asterisk 1.4) Description: STAT(<flag>,<filename>) flag may be one of the following: d: Checks if the file is a directory e: Checks if the file exists f: Checks if…
Read More »Asterisk func timeout
Synopsis: Gets or sets timeouts on the channel. Description: TIMEOUT(timeouttype) Gets or sets various channel timeouts. The timeouts that can be manipulated are: absolute: The absolute maximum amount of time permitted for a call. A setting of 0…
Read More »Asterisk func txtcidname
Synopsis: TXTCIDNAME looks up a caller name via DNS Description: TXTCIDNAME(<number>) This function looks up the given phone number in DNS to retrieve the caller id name. The result will either be blank or be the value found…
Read More »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 »