public interface ReplacesHeader extends Parameters, Header
Like the To header field, it contains a URI and optionally a display name,
encapsulated in a Address
. It is used by SIP
elements to determine which processing rules to apply to a request (for
example, automatic call rejection). As such, it is very important that the
From URI not contain IP addresses or the FQDN of the host on which the UA is
running, since these are not logical names.
The From header field allows for a display name. A UAC SHOULD use the display name "Anonymous", along with a syntactically correct, but otherwise meaningless URI (like sip:[email protected]), if the identity of the client is to remain hidden.
Usually, the value that populates the From header field in requests generated by a particular UA is pre-provisioned by the user or by the administrators of the user's local domain. If a particular UA is used by multiple users, it might have switchable profiles that include a URI corresponding to the identity of the profiled user. Recipients of requests can authenticate the originator of a request in order to ascertain that they are who their From header field claims they are.
Two From 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.
From: "Bob" sips:[email protected] ;tag=a48s
From: sip:[email protected];tag=887s
From: Anonymous sip:[email protected];tag=hyh8
Modifier and Type | Method and Description |
---|---|
String |
getCallId()
Returns the Call-Id of CallIdHeader.
|
String |
getFromTag() |
String |
getToTag()
Gets the tag of FromHeader.
|
void |
setCallId(String callId)
Sets the Call-Id of the CallIdHeader.
|
void |
setFromTag(String tag) |
void |
setToTag(String tag)
Sets the tag parameter of the FromHeader.
|
getParameter, getParameterNames, removeParameter, setParameter
static final String NAME
void setToTag(String tag) throws ParseException
The From Header MUST contain a new "tag" parameter, chosen by the UAC applicaton. Once the initial From "tag" is assigned it should not be manipulated by the application. That is on the client side for outbound requests the application is responsible for Tag assigmennment, after dialog establishment the stack will take care of Tag assignment.
tag
- - the new tag of the FromHeaderParseException
- which signals that an error has been reached
unexpectedly while parsing the Tag value.void setFromTag(String tag) throws ParseException
ParseException
String getToTag()
String getFromTag()
void setCallId(String callId) throws ParseException
callId
- - the string value of the Call-Id of this CallIdHeader.ParseException
- which signals that an error has been reached
unexpectedly while parsing the callId value.String getCallId()
Copyright © 2016. All Rights Reserved.