public interface ToHeader extends HeaderAddress, Parameters, Header
The To header field MAY contain a SIP or SIPS URI, but it may also make use
of other URI schemes i.e the telURL, when appropriate. All SIP
implementations MUST support the SIP URI scheme. Any implementation that
supports TLS MUST support the SIPS URI scheme. Like the From header field,
it contains a URI and optionally a display name, encapsulated in a
Address
.
A UAC may learn how to populate the To header field for a particular request in a number of ways. Usually the user will suggest the To header field through a human interface, perhaps inputting the URI manually or selecting it from some sort of address book. Using the string to form the user part of a SIP URI implies that the User Agent wishes the name to be resolved in the domain to the right-hand side (RHS) of the at-sign in the SIP URI. Using the string to form the user part of a SIPS URI implies that the User Agent wishes to communicate securely, and that the name is to be resolved in the domain to the RHS of the at-sign. The RHS will frequently be the home domain of the requestor, which allows for the home domain to process the outgoing request. This is useful for features like "speed dial" that require interpretation of the user part in the home domain.
The telURL may be used when the User Agent does not wish to specify the domain that should interpret a telephone number that has been input by the user. Rather, each domain through which the request passes would be given that opportunity. As an example, a user in an airport might log in and send requests through an outbound proxy in the airport. If they enter "411" (this is the phone number for local directory assistance in the United States), that needs to be interpreted and processed by the outbound proxy in the airport, not the user's home domain. In this case, tel:411 would be the right choice.
Two To header fields are equivalent if their URIs match, and their parameters match. Extension parameters in one header field, not present in the other are ignored for the purposes of comparison. This means that the display name and presence or absence of angle brackets do not affect matching.
For Example:
To: Carol sip:[email protected]
To: Duke sip:[email protected];tag=287447
HeaderAddress
Modifier and Type | Field and Description |
---|---|
static String |
NAME
Name of the ToHeader
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Compare this ToHeader for equality with another.
|
String |
getTag()
Gets tag of ToHeader.
|
void |
setTag(String tag)
Sets the tag parameter of the ToHeader.
|
getAddress, setAddress
getParameter, getParameterNames, removeParameter, setParameter
static final String NAME
void setTag(String tag) throws ParseException
The To Header MUST contain a new "tag" parameter. When acting as a UAC
the To "tag" is maintained by the SipProvider from the dialog layer,
however whan acting as a UAS the To "tag" is assigned by the application.
That is the tag assignment for outbound responses for messages in a
dialog is only the responsibility of the application for the first
outbound response. If AUTOMATIC_DIALOG_SUPPORT is set to
tag
- - the new tag of the To HeaderParseException
- which signals that an error has been reached
unexpectedly while parsing the Tag value.String getTag()
boolean equals(Object obj)
Copyright © 2016. All Rights Reserved.