SIP URIs
Applies to: Skype for Business 2015
A Session Initiation Protocol (SIP) uniform resource identifier (URI) identifies a communications resource, and contains enough information to initiate and continue a communication session with the resource identified in the URI.
The SIP URI parser (the SipUriParser class) can be used to parse and construct SIP URIs in UCMA 5.0. The SIP URI parser consists of the SipUriParser class and its methods and properties. For more information, see RealTimeAddress and SipUriParser classes.
A SIP URI includes components such as the user and host, as well as optional headers and an optional parameters collection. For more information, see section 19 of RFC 3261 SIP: Session Initiation Protocol.
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 the 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 when the REFER request is received. The SIP URI headers are actually converted into SIP signaling headers of the new request. For the convenience of authors, UCMA 5.0 has a SIP parser that escapes and unescapes the SIP URI header characters so that applications can simply use the SIP URI headers and convert them into SIP signaling headers.
A SIP URI has the following general form: sip:user:password@host:port;uri-parameters?headers
The table that follows describes the components of a SIP URI.
Component |
Example |
Description |
---|---|---|
scheme |
sip |
Identifies the scheme. Note that SIPS URIs follow the same form as SIP URIs. |
user |
mary |
The identifier of a particular resource at the host being addressed. |
password |
Xyz123 |
A password associated with the user. Including a password is not recommended, because passing authentication information in clear text is a security risk. |
host |
contoso.com |
The host providing the SIP resource. Required. |
port |
5151 |
The port number where the request is sent. |
URI parameters |
user=phone |
Parameters affecting a request constructed from the URI. URI parameters are added after the hostport components and are separated by semicolons. URI parameters take the form parameter-name "=" parameter-value. |
headers |
priority=urgent |
Additional information added after the URI parameters. |
The following table describes members of the parameters collection of a SIP URI.
Parameter |
Description |
---|---|
transport |
Determines the transport protocol to be used for sending SIP messages. For a SIPS URI, the transport parameter must indicate a reliable transport protocol. |
maddr |
Indicates the server address to be contacted for this user, overriding any address derived from the host field. |
ttl |
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). |
user |
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. |
method |
The method of the SIP request constructed from the URI may be specified with the method parameter. |
lr |
Indicates that the element responsible for this resource implements the routing mechanisms specified in RFC 3261. |
gruu |
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). |
opaque |
Identifies a specific endpoint. |
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.