Поделиться через


GetParameterValue

Applies to: Lync 2013 | Lync Server 2013

GetParameterValue

The GetParameterValue function returns the value of a named parameter within a SIP header string.

Syntax

string GetParameterValue(
  string headerString,
  string parameterName
);

Parameters

  • headerString
    A header value that contains the parameter whose value is returned, as a string. For example, GetParameterValue("To: \"Display Name\" <sip:someone@example.com>;param1=value1", "param1") returns "value1", where "param1" is the parameter name. (Note that the double quotes around the display name must be escaped if a literal is passed directly, rather than the output of another function, such as GetHeaderValues.)

  • parameterName
    The name of the parameter whose value is returned. In the example above, the parameter name is param1.

Return values

Returns a string containing the value of the named parameter. Returns null if requested data is not found.

Remarks

Header strings can be obtained by calling GetHeaderValues. A parameter that does not have a corresponding value (such as "lr") will not be returned. Valueless parameters should be handled by a managed code application.