Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
understanding-SIP.pdf
Скачиваний:
118
Добавлен:
01.03.2016
Размер:
4 Мб
Скачать
☆

142

SIP: Understanding the Session Initiation Protocol

header field contains a URI, but it may not contain the transport, maddr, or ttl URI parameters. A From header field may contain a tag used to identify a particular call. A From header field may contain a display name, in which case the URI is enclosed in < >. If there is both a URI parameter and a tag, then the URI including any parameters must be enclosed in < >. Examples are shown in Table 6.8. A From tag was optional in RFC 2543 but is mandatory to include in RFC 3261.

6.1.15 History Info

The History-Info header field [10] is an extension header field used to capture and convey routing history associated with a SIP request. Information about a request routing can be added whenever a request is retargeted, the Request-URI is rewritten, and so fourth. A Reason header field (Section 6.2.20) is included as a parameter in this header field. Since a request can be forwarded and retargeted multiple times, multiple History-Info header fields can be present (or multiple comma separated History-Info entries). An index parameter is used to keep track of the order of the actions. A common application for History-Info is for voicemail, described in Section 9.4. Below is an example showing three historyinfo entries, and the escaping of the semicolon (%3B) and equals (%3D) in the Reason header field:

History-Info: <sip:UserA@example.com?Reason=SIP%3Bcause%3D302> ;index=1.1,

<sip:UserB@example.com?Privacy=history&Reason=SIP%3Bcause%3D486> ;index=1.2, <sip:45432@vm.example.com>;index=1.3

Table 6.8

Examples of From Header Field

Header Field

Meaning

 

 

From: <sip:armstrong@hetrodyne.com> ;tag=3342436

A single SIP URI with a tag.

From: Thomas Edison

A secure SIP URI with a

<sips:edison@electric.com>;tag=532

display name.

 

Using the compact form of the

f: “James Bardeen”

header field, a display name

<sip:555.1313@telephone.com ;transport=tcp>;tag=3a320f03

in quotes along with a SIP URI

 

 

with a parameter inside < >.

 

A tel URI without a display

From: tel:911

name or tag, so no <> is

required. Generated by a RFC

 

 

2543 UA.

 

 

SIP Header Fields

143

6.1.16 Organization

The Organization header field is used to indicate the organization to which the originator of the message belongs. It can also be inserted by proxies as a message is passed from one organization to another. Like all SIP header fields, it can be used by proxies for making routing decisions and by UAs for making call screening decisions.

An example is:

Organization: MCI

6.1.17 Path

The Path header field [11] is an optional header field in REGISTER requests. It can be thought of as a Record-Route mechanism for REGISTER requests, which establishes a route set that is valid for the duration of the registration. The Path header field may be inserted by a proxy, which forwards a REGISTER request to a registrar server. The registrar copies the Path header field into the 200 OK response to the REGISTER, which then provides the route set information to the UA that is registering. In a mobile network, the Path header field can be used to discover and inform the UA of the proxies that can be used to populate preloaded Route header fields. The ob URI parameter in a Path header field can be used to indicate to a UA that an edge proxy supports the SIP outbound extension, described in Section 10.11.3.

An example is:

Path: <sip:proxy2.another.provider.com;lr;ob>

6.1.18 Priv-Answer-Mode

The Priv-Answer-Mode header field is similar to the Answer-Mode header field in that it requests special handling by the recipient of the INVITE. The values Manual and Auto and the require parameter are defined. The difference between Priv-Answer-Mode and Answer-Mode relates to the policy on the UA. For example, an intercom call between an executive and an administrator might use the Answer-Mode header field, and a do-not-disturb setting on the executive’s phone could override this feature. However, a building-wide emergency announcement might use the Priv-Answer-Mode header field, which would override the executive’s do-not-disturb setting. Example:

Priv-Answer-Mode: Auto

144

SIP: Understanding the Session Initiation Protocol

6.1.19 Record-Route

The Record-Route header field is used to force routing through a proxy for all subsequent requests in a session (dialog) between two UAs. Normally, the presence of a Contact header field allows UAs to send messages directly bypassing the proxy chain used in the initial request (which probably involved database lookups to locate the called party). A proxy inserting its address into a Record-Route header field overrides this and forces future requests to include a Route header field containing the address of the proxy that forces this proxy to be included.

A proxy wishing to implement this inserts the header field containing its own URI, or adds its URI to an already present Record-Route header field. The URI is constructed so that the URI resolves back to the proxy server. The UAS copies the Record-Route header field into the 200 OK response to the request. The header field is forwarded unchanged by proxies back to the UAC. The UAC then stores the Record-Route proxy list plus a Contact header field if present in the 200 OK for use in a Route header field in all subsequent requests. Because RecordRoute is bidirectional, messages in the reverse direction will also traverse the same set of proxies. Chapter 16 contains an example of the use of the Record-Route and Route header fields. The lr parameter is new to RFC 3261 and indicates that the proxy server supports “loose routing.” Older RFC 2543 compliant proxy servers create Record-Route URIs that instead of the lr parameter often contain the maddr parameter with an address or host that resolves to that proxy server.

Examples are:

Record-Route: <sip:proxy1.carrier.com;lr>, <sip:firewall33.corporation.com;lr>

Record-Route:<sip:139.23.1.44;lr>

6.1.20 Recv-Info

The Recv-Info header field [12] is used to indicate which INFO packages a UA is willing to receive. Defined INFO event packages allow negotiation between UAs of supported applications using INFO. For example:

Recv-Info: foo

6.1.21 Refer-Sub

The Refer-Sub header field [13] is used to request a particular state for an implicit REFER subscription, or to indicate the state of an existing implicit REFER subscription. When a Refer-Sub: false header field is included in a REFER, the recipient of the REFER is requested not to create an implicit subscription and not

SIP Header Fields

145

to send NOTIFYs about the outcome of the referred operation. If the recipient does this, they return the Refer-Sub: false header field in the 2xx response to the REFER. A value of true or the absence of the Refer-Sub header field in the 2xx response to the REFER means that the implicit subscription has been created. The norefsub option tag indicates that a UA supports this mechanism.

6.1.22 Retry-After

The Retry-After header field is used to indicate when a resource or service may be available again. In 503 Service Unavailable responses, it indicates when

the server will be available. In 404 Not Found, 600 Busy Everywhere, and 603

Decline responses, it indicates when the called UA may be available again.

The header field can also be included by proxy and redirect servers in responses if a recent registration was removed with a Retry-After header field indicating when the user may sign on again. The contents of the header field can be either an integer number of seconds or a SIP date. A duration parameter can be used to indicate how long the resource will be available after the time specified. Examples of this header field are shown in Table 6.9.

6.1.23 Subject

The optional Subject header field is used to indicate the subject of the media session. It can be used by UAs for simple call screening. The contents of the header field can also be displayed during alerting to aid the user in deciding whether to accept the call. The compact form of this header field is s. Some examples are:

Subject: More good info about SIP

s: Are you awake, yet??

Table 6.9

Examples of a Retry-After Header Field

Header Field

Meaning

Retry-After: 3600

Retry-After: Sat, 21 May 2000 08:00:00 GMT

Retry-After: 3600

Retry-After: Mon, 29 Feb 2000 13:30:00 GMT;duration=1800

Request can be retried again in 1 hour. Request can be retried after the date listed. Request can be tried after 1 hour.

Request can be retried after the specified date for 30 minutes.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]