SRVRESULT()
Synopsis
Retrieve results from an SRVQUERY.
Description
This function will retrieve results from a previous use of the SRVQUERY function.
Syntax
SRVRESULT(id,resultnum[,field])
Arguments
id
- The identifier returned by the SRVQUERY function.resultnum
- The number of the result that you want to retrieve.
Results start at1
. If this argument is specified asgetnum
, then it will return the total number of results that are available.field
- The field of the result to retrieve.
The fields that can be retrieved are:host
port
priority
weight
See Also
Import Version
This documentation was imported from Asterisk Version GIT-18-f459872
2 Comments
Chris Young
You also need to give a third parameter to retrieve the value of the srvresult field you need.
SRVRESULT(id,resultnum,field)
where field can be: host, port, priority or weight.
George Joseph
Yeah, it looks like someone forgot to add that to the documentation. Would you mind opening an issue at https://issues.asterisk.org against component "Functions/func_srv" for this? The wiki page will update automatically when the code change gets committed.