Use the SIP URI Parser to parse and construct Session Initiation Protocol (SIP) uniform resource identifiers (URIs) in the Unified Communications Managed API version 1.0 SDK. The SIP URI Parser consists of the SipUriParser class and its methods and properties.

A SIP URI includes components such as the user and host, as well as optional headers and an optional parameters collection. For more information about SIP URIs, see section 19 of the SIP: Session Initiation Protocol RFC. See the following example SIP URI that shows the general form.

Copy Code

SIP has a mechanism by which a REFER request received by a User Agent (UA) on a given session triggers the sending of another SIP method, by default an INVITE, to a target SIP URI specified in a SIP signaling header: the Refer-to: header.

The SIP URI often contains headers that are carried over from the SIP URI to the SIP Request that is sent as a result of the reception of the REFER. The SIP URI headers are actually converted into SIP signaling headers of the new request. For the convenience of authors, the parsers in the Unified Communications Managed API version 1.0 SDK escape and unescape the SIP URI header characters so that applications can simply use the SIP URI headers and convert them into SIP signaling headers.

For more information, see Parsing a SIP URI.

Construct a SIP URI

Use the SipUriParser constructor to build a SIP URI. See the following example.

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

Return a SIP URI as a String

Use the ToString method of the SipUriParser class to get the URI as a string.

Parse a SIP URI

Use the methods and properties of the SipUriParser class to parse a SIP URI. For a code example, see Parsing a SIP URI.

See Also