Share via


MSPL Built-in Functions

 
Communications Server 2007 Server SDK Documentation

MSPL Built-in Functions

The Microsoft SIP Processing Language (MSPL) provides several built-in functions that are useful for common SIP application tasks, such as message forking, the creation of proxy objects, and parameter parsing.

Certain functions, such as BeginFork/Fork/EndFork, must be called in a certain order; otherwise, an error will be generated. Other functions must be called only when the message being processed is a request or a response; otherwise, a critical error will also be generated. If 10 critical errors of this type are generated during run time, the application will be disabled.

MSPL defines the built-in functions described in the following table.

Function Description
AddHeader Adds a header to the current SIP message.
Base64Decode Decodes a base64 string.
BeginFork Initializes a forking operation for the current message.
CheckUserOption Indicates whether the user is enabled for a specified option.
Concatenate Concatenates a sequence of supplied string values, in parameter order.
ContainsString Searches for an occurrence of one specified string within another.
Dispatch Dispatches an event to a supplied event handler within the application.
DispatchNotification Indicates whether a message was successfully queued.
DomainSupported Indicates whether a specified domain is supported by the registrar on the Office Communications Server server executing this script.
EndFork Sends the current set of forked messages using the forking proxy initialized with BeginFork.
EndsWithString Indicates whether a specified source string ends with a specified search string.
EqualString Determines whether two supplied strings are equal.
Fork Creates a forked copy of the current message with its request URI field set to the supplied URI string.
GetDisplayName Returns the display name associated with a supplied SIP address.
GetEndpointInstanceFromGRUU Returns a string representation of the instance ID from the GRUU.
GetHeaderValues Returns a collection of strings containing the values associated with the supplied header name in the current SIP message.
GetHostName Returns the hostname portion of a supplied SIP URI.
GetParameterValue Returns the value of a named parameter within a SIP header string.
GetPort Returns the port specified in a SIP URI.
GetScheme Returns the scheme associated with the SIP URI.
GetUri Returns the URI portion of a SIP address, such as the address found in the From or To header field of a SIP message.
GetUriParameter Returns the named parameter value found in a supplied SIP URI.
GetUserAtHost Extracts user@hostname from a URL.
GetUserName Returns the user name portion of a SIP URI.
HashString Computes a hash value from a string.
IndexOfString Returns an index of the first occurrence of a specified string.
IsGRUU Indicates whether a specified URI is formatted as a GRUU.
IsPhoneUri Indicates whether a specified URI points to a phone.
LengthString Returns the number of characters in a string.
Log Writes an entry or entries to the specified server log.
ProxyRequest Proxies the current SIP request to the supplied URI.
ProxyResponse Proxies the current SIP response to the next destination in its route.
QueryCategory Fetches an item published in a specified enhanced presence container.
QueryCategoryBySubscriber Fetches an item published in a specified enhanced presence container which is selected based on the access control lists associated with the indicated Subscriber and ExternalSourceNetwork.
QueryDomain Indicates whether a specified domain belongs to a specified domain type.
QueryEndpoints Queries the server registrar for the network endpoints associated with a specified user and hostname combination.
QueryHomeServer Returns the fully qualified domain name of the home server for a specified SIP user.
QueryUserPolicy Returns an XML fragment containing the policy assigned to the specified user based on server configuration.
Respond Generates a SIP response to the current request message with the supplied status code and reason phrase.
SetParameterValue Adds or sets a specific parameter value in a SIP header.
Split(string, string) Splits a string on a specified separator character and returns a string collection.
Split(string, bool, string) Splits a string on a specified separator character or set of characters and returns a string collection. This function is an overload of Split(string, string).
StartsWithString Indicates whether a specified source string begins with a specified search string.
SubdomainOf Tests whether one domain is a subdomain of another specified domain.
Substring Extracts a specified string from a larger string.
SupportsMethod Determines whether a specific SIP method is supported by the application.
  
  What did you think of this topic?
  © 2007 Microsoft Corporation. All rights reserved.