public interface ReasonHeader extends Parameters, Header
The ReasonHeader provides information on why a SIP request was issued, often useful when creating services and also used to encapsulate a final status code in a provisional response, which is needed to resolve the "Heterogeneous Error Response Forking Problem".
The Reason header field appears to be most useful for BYE and CANCEL requests, but it can appear in any request within a dialog, in any CANCEL request and in 155 (Update Requested) responses. When used in requests, clients and servers are free to ignore this header field. It has no impact on protocol processing.
Examples of the ReasonHeader usage are:
Modifier and Type | Field and Description |
---|---|
static String |
NAME
Name of ReasonHeader
|
Modifier and Type | Method and Description |
---|---|
int |
getCause()
Gets the cause value of the ReasonHeader
|
String |
getProtocol()
Gets the protocol value of the ReasonHeader
|
String |
getText()
Gets the text value of the ReasonHeader
|
void |
setCause(int cause)
Sets the cause value of the ReasonHeader.
|
void |
setProtocol(String protocol)
Sets the protocol of the ReasonHeader, for example SIP or Q.850.
|
void |
setText(String text)
Sets the text value of the ReasonHeader.
|
getParameter, getParameterNames, removeParameter, setParameter
static final String NAME
int getCause()
void setCause(int cause) throws InvalidArgumentException
cause
- - the new integer value of the cause of the ReasonHeaderInvalidArgumentException
- if the cause value is less than zero.void setProtocol(String protocol) throws ParseException
protocol
- - the new string value of the protocol of the ReasonHeaderParseException
- which signals that an error has been reached
unexpectedly while parsing the protocol value.String getProtocol()
void setText(String text) throws ParseException
text
- - the new string value of the text of the ReasonHeaderParseException
- which signals that an error has been reached
unexpectedly while parsing the text value.String getText()
Copyright © 2015. All Rights Reserved.