Compartilhar via


GetUriParameter

Applies to: Lync 2013 | Lync Server 2013

GetUriParameter

The GetUriParameter function returns the named parameter value found in a supplied SIP URI.

Syntax

string GetUriParameter(
  string uri,
  string parameterName
);

Parameters

  • Uri
    A SIP URI whose parameterName portion is returned. The function accepts only a valid SIP URI string in the following form:

    "Display Name" <sip:user@host:port;param=value>

    where "Display Name", :port and ;param=value are optional.

    For example, GetUriParameter("sip:someone@example.com:6767;uriparam1=value1", "uriparam1") returns "value1".

  • parameterName
    The parameter name for which the associated value will be returned. In the above example, the parameter name is the string uriparam1.

Return values

Returns the value of the parameter specified by parameterName within the supplied URI. Returns null if the requested data is not found or if the URI passed in is not a valid SIP URI in the form specified above. Live Communications Server 2003 applications that pass non-SIP URI strings to this function need to be modified to work properly with Office Communications Server 2007 R2.

Remarks

If the parameter is valueless (it is not of the form "name=value"), this function returns null.