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:
cause- the new integer value of the cause of the ReasonHeader
javax.sip.InvalidArgumentExceptionif the cause value is less than zero.
protocol- the new string value of the protocol of the ReasonHeader
java.text.ParseExceptionwhich signals that an error has been reached unexpectedly while parsing the protocol value.
text- the new string value of the text of the ReasonHeader
java.text.ParseExceptionwhich signals that an error has been reached unexpectedly while parsing the text value.