Overview of the SIP URI Parser
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
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.
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.
Use the SipUriParser constructor to build a SIP URI. See the following example.
SipUriParser p = new SipUriParser("sip:firstname.lastname@example.org:2020;maddr=10.0.0.20?replaces=somebodyelse%40example.com%3Btotag%3Dadf1713ab");
Use the methods and properties of the SipUriParser class to parse a SIP URI. For a code example, see Parsing a SIP URI.