Export (0) Print
Expand All

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.

FunctionDescription
AddHeaderAdds a header to the current SIP message.
Base64DecodeDecodes a base64 string.
BeginForkInitializes a forking operation for the current message.
CheckUserOptionIndicates whether the user is enabled for a specified option.
ConcatenateConcatenates a sequence of supplied string values, in parameter order.
ContainsStringSearches for an occurrence of one specified string within another.
DispatchDispatches an event to a supplied event handler within the application.
DispatchNotificationIndicates whether a message was successfully queued.
DomainSupportedIndicates whether a specified domain is supported by the registrar on the Office Communications Server server executing this script.
EndForkSends the current set of forked messages using the forking proxy initialized with BeginFork.
EndsWithStringIndicates whether a specified source string ends with a specified search string.
EqualStringDetermines whether two supplied strings are equal.
ForkCreates a forked copy of the current message with its request URI field set to the supplied URI string.
GetDisplayNameReturns the display name associated with a supplied SIP address.
GetEndpointInstanceFromGRUUReturns a string representation of the instance ID from the GRUU.
GetHeaderValuesReturns a collection of strings containing the values associated with the supplied header name in the current SIP message.
GetHostNameReturns the hostname portion of a supplied SIP URI.
GetParameterValueReturns the value of a named parameter within a SIP header string.
GetPortReturns the port specified in a SIP URI.
GetSchemeReturns the scheme associated with the SIP URI.
GetUriReturns the URI portion of a SIP address, such as the address found in the From or To header field of a SIP message.
GetUriParameterReturns the named parameter value found in a supplied SIP URI.
GetUserAtHostExtracts user@hostname from a URL.
GetUserNameReturns the user name portion of a SIP URI.
HashStringComputes a hash value from a string.
IndexOfStringReturns 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.
LengthStringReturns the number of characters in a string.
LogWrites an entry or entries to the specified server log.
ProxyRequestProxies the current SIP request to the supplied URI.
ProxyResponseProxies the current SIP response to the next destination in its route.
QueryCategoryFetches an item published in a specified enhanced presence container.
QueryCategoryBySubscriberFetches 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.
QueryDomainIndicates whether a specified domain belongs to a specified domain type.
QueryEndpointsQueries the server registrar for the network endpoints associated with a specified user and hostname combination.
QueryHomeServerReturns the fully qualified domain name of the home server for a specified SIP user.
QueryUserPolicyReturns an XML fragment containing the policy assigned to the specified user based on server configuration.
RespondGenerates a SIP response to the current request message with the supplied status code and reason phrase.
SetParameterValueAdds 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).
StartsWithStringIndicates whether a specified source string begins with a specified search string.
SubdomainOfTests whether one domain is a subdomain of another specified domain.
SubstringExtracts a specified string from a larger string.
SupportsMethodDetermines whether a specific SIP method is supported by the application.
  
  What did you think of this topic?
  © 2007 Microsoft Corporation. All rights reserved.

 

Community Additions

Show:
© 2015 Microsoft