3xx responses are usually only expected in session-initiating requests, INVITEs. However, the SIP specification does not preclude sending 3xx responses for other request types. A number of alternative URIs are supplied on the 3xx responses in Contact headers.
The 3xx class of responses includes any response code in the range of 300-399 and indicates a redirection of the call. The redirection requires further action to be taken to complete the request. The following 3xx response codes are defined in SIP.
- 300 Multiple Choices. The address in the request resolved to several choices, each with its own specific location. The user or user agent (UA) can select a preferred communication end point and redirect the request to that location.
- The response may include a message body containing a list of resource characteristics and location(s), from which the user or UA can choose the most appropriate one, if allowed by the Accept request header field. However, no MIME types have been defined for this message body.
- The choices should also be listed as Contact fields. The response may contain several Contact fields or a list of addresses in a Contact field. UAs may use the Contact header field value for automatic redirection or ask the user to confirm a choice.
- 301 Moved Permanently . The user can no longer be found at the address in the Request-URI, and the requesting client should retry at the new address given by the Contact header field. The requestor should update any local directories, address books, and user location caches with this new value, and redirect future requests to the addresses listed.
- 302 Moved Temporarily . The requesting client should retry the request at the new address(es) given by the Contact header field. The Request-URI of the new request uses the value of the Contact header field in the response.
The duration of the validity of the Contact URI can be specified through an Expires header field or an Expires parameter in the Contact header field. Both proxies and UAs may cache this URI for the duration of the expiration time. If there is no explicit expiration time, the address is valid only once for recursing, and must not be cached for future transactions.
If the URI cached from the Contact header field fails, the Request-URI from the redirected request may be tried again only once.
- 305 Use Proxy . The requested resource must be accessed through the proxy given by the Contact field. The Contact field gives the URI of the proxy. The recipient is expected to repeat this single request via the proxy. 305 responses must only be generated by the user agent servers (UASs).
380 Alternative Service . The call was not successful, but alternative services are possible. The alternative services are described in the message body of the response. There are no formats currently defined for this information.
In each case, the request should be retried to one of the supplied alternative URIs. The request can be retried by either the originating UA, or by an intermediate back-to-back user agent (B2BUA) or proxy on behalf of the originating UA (and without notifying it).
Cisco Unified Border Element (SP Edition) is a B2BUA, and, therefore, in some deployments it may be necessary for Cisco Unified Border Element (SP Edition) to retry the request instead of sending a negative response back to the initiator of the request.
The Diversion header enables the called SIP user agent to identify from whom the call was diverted and why it was diverted. The header notifies the original caller:
- That the call has been redirected to a destination that differs from the original target
- The number to which the call has been redirected
- The reason for the redirection
The diversion header is attached by networking elements that change the final destination of a request.