Use the SipUriParser class to parse and construct Session Initiation Protocol (SIP) uniform resource identifiers (URIs) in the Unified Communications Managed API version 1.0 SDK. For more information about SIP URIs, see the SIP: Session Initiation Protocol RFC.

SIP URI Components

The following example SIP URI shows the general form.

Copy Code

The following table describes SIP URI components.

Component Example Description



Identifies the scheme. Note that SIPS URIs follow the same form as SIP URIs.



The identifier of a particular resource at the host being addressed.



A password associated with the user. Using this is not recommended because passing authentication information in clear text is a security risk.


The host providing the SIP resource. Required.



The port number where the request is sent.

URI parameters


Parameters affecting a request constructed from the URI. URI parameters are added after the hostport component and are separated by semicolons.



Additional information added after the parameters.

SIP URI Parameters

The following table describes members of the parameters collection of a SIP URI.

Parameter Description


Determines the transport protocol to be used for sending SIP messages. For a SIPS URI, the transport parameter must indicate a reliable transport protocol.


Indicates the server address to be contacted for this user, overriding any address derived from the host field.


Determines the time-to-live value of the UDP multicast packet. Valid only if maddr is a multicast address, and the transport protocol is UDP (User Datagram Protocol).


Use the user parameter to distinguish telephone numbers from user names that happen to look like telephone numbers. If the user string contains a telephone number formatted as a telephone-subscriber, add the user parameter phone value to identify the value as a user name.


The method of the SIP request constructed from the URI may be specified with the method parameter.


Indicates that the element responsible for this resource implements the routing mechanisms specified in RFC 3261.


Identifies endpoints within the application server.


Several applications of SIP require a user agent (UA) to construct and distribute a URI that can be used by anyone on the Internet to route a call to that specific UA instance. A URI that routes to a specific UA instance is called a Globally Routable UA URI (GRUU).


Identifies a specific endpoint.

SIP URI Header Fields

Header fields in the SIP request can be specified with the ? mechanism within a URI. The header names and values are encoded in ampersand separated name/value pairs. The special name body indicates that the associated value is the message-body of the SIP request.

Parsing SIP URIs

The SipUriParser class provides properties and methods to access data contained in SIP URIs.

Parsing Components

Use SipUriParser properties to parse component values. See the following example code.

Copy Code
SipUriParser p = new SipUriParser("");
string uriHost = p.Host;
string uriHostAndPort = p.HostAndPort;
int uriPort = p.Port;
string uriUser = p.User;
string uriUserAtHost = p.UserAtHost;

Parsing Parameters

Use the FindParameter method to access parameter values. See the following example code.

Copy Code
SipUriParser p = new SipUriParser(";maddr=");

SipUriParameter param = p.FindParameter("maddr");

Parsing Headers

Use the FindHeader method to access header values. See the following example code.

Copy Code
SipUriParser p = new SipUriParser(";maddr=");

SignalingHeader header = p.FindHeader("replaces");

See Also