Skip to end of metadata
Go to start of metadata

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 at 1. If this argument is specified as getnum, 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

  • No labels

2 Comments

  1. 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.

    1. 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.