AddHeader(string or StandardHeader value,string) function

Microsoft Office Live Communications Server 2005 with SP1

AddHeader

The AddHeader function adds a header to the current SIP message.

boolAddHeader(string or StandardHeader valuename,
stringvalue);

Parameters

  • name
    The name of the header to add. This header can be either a standard SIP header or a custom one.
  • value
    The value of the header to add. Parameters can be present in this value, separated by semicolons.

Return Values

Returns true if the header was successfully added; false if it was not. If the header already exists, this function returns false.

Remarks

Note If you add a header with this method and call Respond, the new header will not be included in the response. All new headers that should be in the response must be added as additional parameters to Respond.

AddHeader can be used to pass contextual information from an MSPL script to a managed application, through the use of a custom header.

In a managed application, these custom headers can be retrieved by calling Message.GetHeaders(), which returns a HeaderCollection. This collection can be searched for the specific custom header added with AddHeader.

What did you think of this topic?
© 2008 Microsoft Corporation. All rights reserved.