This documentation is archived and is not being maintained.


This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

The QueryEndpoints function queries the server registrar for the network endpoints associated with a specified user and hostname combination.


collection<RegistrarEndpoint> QueryEndpoints(
  string userAtHost,
  boolean forceDatabaseLookup



A string containing the user and hostname in the format "" for which endpoints will be queried on the SIP registrar.


If true, this function always queries the registrar database; otherwise, if endpoint data is available in the internal cache, it uses that data instead. This parameter is optional; if it is not present, the value defaults to false.

Return Values

Returns a collection of one or more MSPL Built-in Classes objects that contain the known endpoints associated with the SIP user and hostname. If no endpoints are found on the registrar, this function returns an empty collection.


This function is valid only in the context of a foreach statement. The foreach element variable must be the MSPL Built-in Variables built-in variable. The following example illustrates the correct usage of this function.

Example Code

foreach (dbEndpoint in QueryEndpoints("")) {
  // Inside the body of the foreach statement, the
  // dbEndpoint.fieldName field can be referenced. Outside
  // of the body of this foreach loop, any reference to the
  // endpoint variable evaluates to false.