QueryEndpoints
The QueryEndpoints function queries the server registrar for the network endpoints associated with a specified user and hostname combination.
Syntax
Copy Code | |
---|---|
collection<RegistrarEndpoint> QueryEndpoints( string userAtHost, boolean forceDatabaseLookup ); |
Parameters
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.
Remarks
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
Copy Code | |
---|---|
foreach (dbEndpoint in QueryEndpoints("someone@example.com")) { // 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. } |