Move cause 200 to cause 26, as specified in Q.850.

Also cleanup the formatting and add a few more that seem like good candidates.

(closes issue #16157)
 Reported by: wimpy


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@262513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2010-05-11 21:25:05 +00:00
parent d8dea9e76a
commit 2c10997e99

View File

@@ -33,20 +33,25 @@ In SIP, we have a conversion table to convert between SIP
return codes and Q.931 both ways. This is to improve SIP/ISDN
compatibility.
These are the current codes, based on the Q.931
These are the current codes, based on the Q.850/Q.931
specification:
- AST_CAUSE_UNALLOCATED 1
- AST_CAUSE_NO_ROUTE_TRANSIT_NET 2
- AST_CAUSE_NO_ROUTE_DESTINATION 3
- AST_CAUSE_MISDIALLED_TRUNK_PREFIX 5
- AST_CAUSE_CHANNEL_UNACCEPTABLE 6
- AST_CAUSE_CALL_AWARDED_DELIVERED 7
- AST_CAUSE_PRE_EMPTED 8
- AST_CAUSE_NUMBER_PORTED_NOT_HERE 14
- AST_CAUSE_NORMAL_CLEARING 16
- AST_CAUSE_USER_BUSY 17
- AST_CAUSE_NO_USER_RESPONSE 18
- AST_CAUSE_NO_ANSWER 19
- AST_CAUSE_CALL_REJECTED 21
- AST_CAUSE_NUMBER_CHANGED 22
- AST_CAUSE_REDIRECTED_TO_NEW_DESTINATION 23
- AST_CAUSE_ANSWERED_ELSEWHERE 26
- AST_CAUSE_DESTINATION_OUT_OF_ORDER 27
- AST_CAUSE_INVALID_NUMBER_FORMAT 28
- AST_CAUSE_FACILITY_REJECTED 29
@@ -58,7 +63,6 @@ specification:
- AST_CAUSE_SWITCH_CONGESTION 42
- AST_CAUSE_ACCESS_INFO_DISCARDED 43
- AST_CAUSE_REQUESTED_CHAN_UNAVAIL 44
- AST_CAUSE_PRE_EMPTED 45
- AST_CAUSE_FACILITY_NOT_SUBSCRIBED 50
- AST_CAUSE_OUTGOING_CALL_BARRED 52
- AST_CAUSE_INCOMING_CALL_BARRED 54
@@ -81,24 +85,23 @@ specification:
- AST_CAUSE_PROTOCOL_ERROR 111
- AST_CAUSE_INTERWORKING 127
The range 128-255 is private cause codes. Our private causes are:
- AST_CAUSE_ANSWERED_ELSEWHERE 200
For more information:
- \ref app_dial.c
*/
/*! \name Causes for disconnection (from Q.931)
These are the internal cause codes used in Asterisk.
\ref AstCauses
*/
/*! \name Causes for disconnection (from Q.850/Q.931)
* These are the internal cause codes used in Asterisk.
* \ref AstCauses
*/
/*@{ */
#define AST_CAUSE_UNALLOCATED 1
#define AST_CAUSE_NO_ROUTE_TRANSIT_NET 2
#define AST_CAUSE_NO_ROUTE_DESTINATION 3
#define AST_CAUSE_MISDIALLED_TRUNK_PREFIX 5
#define AST_CAUSE_CHANNEL_UNACCEPTABLE 6
#define AST_CAUSE_CALL_AWARDED_DELIVERED 7
#define AST_CAUSE_PRE_EMPTED 8
#define AST_CAUSE_NUMBER_PORTED_NOT_HERE 14
#define AST_CAUSE_NORMAL_CLEARING 16
#define AST_CAUSE_USER_BUSY 17
#define AST_CAUSE_NO_USER_RESPONSE 18
@@ -106,6 +109,8 @@ For more information:
#define AST_CAUSE_SUBSCRIBER_ABSENT 20
#define AST_CAUSE_CALL_REJECTED 21
#define AST_CAUSE_NUMBER_CHANGED 22
#define AST_CAUSE_REDIRECTED_TO_NEW_DESTINATION 23
#define AST_CAUSE_ANSWERED_ELSEWHERE 26
#define AST_CAUSE_DESTINATION_OUT_OF_ORDER 27
#define AST_CAUSE_INVALID_NUMBER_FORMAT 28
#define AST_CAUSE_FACILITY_REJECTED 29
@@ -117,7 +122,6 @@ For more information:
#define AST_CAUSE_SWITCH_CONGESTION 42
#define AST_CAUSE_ACCESS_INFO_DISCARDED 43
#define AST_CAUSE_REQUESTED_CHAN_UNAVAIL 44
#define AST_CAUSE_PRE_EMPTED 45
#define AST_CAUSE_FACILITY_NOT_SUBSCRIBED 50
#define AST_CAUSE_OUTGOING_CALL_BARRED 52
#define AST_CAUSE_INCOMING_CALL_BARRED 54
@@ -140,9 +144,6 @@ For more information:
#define AST_CAUSE_PROTOCOL_ERROR 111
#define AST_CAUSE_INTERWORKING 127
/* Private Cause codes for Asterisk */
#define AST_CAUSE_ANSWERED_ELSEWHERE 200
/* Special Asterisk aliases */
#define AST_CAUSE_BUSY AST_CAUSE_USER_BUSY
#define AST_CAUSE_FAILURE AST_CAUSE_NETWORK_OUT_OF_ORDER
@@ -152,6 +153,6 @@ For more information:
#define AST_CAUSE_UNREGISTERED AST_CAUSE_SUBSCRIBER_ABSENT
#define AST_CAUSE_NOTDEFINED 0
#define AST_CAUSE_NOSUCHDRIVER AST_CAUSE_CHAN_NOT_IMPLEMENTED
/*@{ */
/*@} */
#endif /* _ASTERISK_CAUSES_H */