/*****************************************************************************
 * Copyright (c) 1988-95 Digi International Inc., All Rights Reserved
 * 
 * This  software  contains  proprietary  and  confidential   information   of
 * Digi International  Inc.   By  accepting  transfer  of this copy, Recipient
 * agrees to retain this software in  confidence,  to  prevent  disclosure  to
 * others,  and  to make no  use of this software other than that for which it
 * was delivered.  This is an unpublished copyright work  Digi   International
 * Inc.    Except   as   permitted   by  federal  law,  17 USC 117, copying is
 * strictly prohibited.
 * 
 * Digi  International  Inc.  CONFIDENTIAL  -   (Digi    International    Inc.
 * Confidential  when   combined   with   the   aggregated  modules  for  this
 * product) OBJECT CODE ONLY SOURCE MATERIALS
 * 
 * (C) COPYRIGHT Digi International Inc. 1995
 * 
 * All Rights Reserved
 * 
 * US   Government   Users   Restricted   Rights   -   Use,   duplication   or
 * disclosure  restricted by GSA ADP Schedule Contract with Digi International
 * Inc.
 * 
 *****************************************************************************/

/*
 * $Id: il3_cause.h,v 1.10.10.1 2001/08/27 16:31:18 edouardb Exp $
 *
 * Copyright (c) 1993-1994 Spider Systems Limited
 *
 * This Source Code is furnished under Licence, and may not be
 * copied or distributed without express written agreement.
 *
 * All rights reserved.  Made in Scotland.
 *
 * Authors: Harry Bryson
 *
 * il3_cause.h of il3 module
 *
 * SpiderISDN
 * Release 3.0.0 94/12/20
 * 
 * SpiderISDN Release 3 - Official Release.
 *
 */
 
/*
 *  il3cause.h
 *
 *	- IL3 module Q.931/ETSI cause values
 */

#define C_UNASSIGNED_NUMBER     0x01
#define C_NO_ROUTE_TO_S_T_N     0x02    /* No Route to Specified Transit Network */
#define C_NO_ROUTE_TO_DEST      0x03
#define	C_CHANNEL_UNACCEPTABLE	0x06
#define	C_CALL_IN_EST_CHANNEL	0x07
#define	C_NORMAL_CALL_CLEARING	0x10
#define C_USER_BUSY		0x11
#define C_NO_USER_RESPONDING	0x12
#define C_NO_ANSWER_FROM_USER   0x13
#define C_CALL_REJECTED		0x15
#define C_NUMBER_CHANGED        0x16
#define C_NON_SEL_USER_CLEARING 0x1A
#define C_DESTINATION_OOO	0x1B
#define C_INVALID_NUMBER_FORMAT	0x1C
#define C_FACILITY_REJECTED	0x1D
#define C_RESPONSE_TO_SE	0x1E
#define C_NORMAL_UNSPECIFIED	0x1F

#define C_NO_CC_AVAILABLE	0x22
#define C_NETWORK_OOO		0x26
#define C_TEMPORARY_FAILURE	0x29
#define C_SWITCH_EQUIP_CONGEST	0x2A
#define C_ACCESS_INFO_DISCARDED 0x2B
#define C_REQ_CC_NOT_AVAILABLE	0x2C
#define C_RESC_UNAVAILABLE      0x2F
#define C_QOS_UNAVAILABLE       0x31
#define C_REQ_FACILITY_NOT_SUSC 0x32    /* Requested Facility Not Suscribed */
#define C_BEARER_CAP_NOT_AUTH   0x39    /* Bearer Capability not Authorized */
#define C_BEARER_CAP_NOT_AVAIL  0x3A    /* Bearer Capability not Presently Available */
#define C_S_OR_OPT_NOT_AVAIL    0x3F    /* Service Or Option Not Available */

#define C_BEARER_CAP_NOT_IMPLE	0x41
#define C_CHAN_TYPE_NOT_IMPLE   0x42
#define C_REQ_FACI_NOT_IMPLE    0x45    /* Requested Facility Not Implemented */
#define C_ONLY_RDIBC_AVAIL      0x46    /* Only Restricted Digital Info Bearer capability is Available */
#define C_S_OR_OPT_NOT_IMPLE    0x4F    /* Service Or Option Not Implemented */

#define C_INVALID_CR		0x51
#define C_CHAN_DOES_NOT_EXIST   0x52
#define C_CALL_ID_NOT_EXIST     0x53    /* A suspended Call exists, but this call identity does not */
#define C_CALL_ID_IN_USE        0x54
#define C_NO_CALL_SUSPENDED     0x55
#define C_CALL_CLEARED          0x56    /* call having the requested call identity has been cleared */
#define	C_INCOMPAT_DESTINATION	0x58
#define C_INVALID_T_NET_SELECT  0x5B    /* Invalid Transit Network Selection */
#define C_INVALID_MSG           0x5F    

#define C_MANDATORY_IE_MISSING	0x60
#define C_MT_NON_EXISTANT	0x61
#define C_MESSAGE_NOT_COMPAT	0x62
#define C_IE_NON_EXISTANT	0x63
#define C_INVALID_IE_CONTENTS	0x64
#define C_MESSAGE_NOT_CS	0x65
#define C_RECOVERY_ON_TIMER	0x66
#define C_PARAM_NOT_RECOGNIZED	0x67
#define C_PROTOCOL_ERROR	0x6F

/*
 * 1TR6 specials. ORed with 0x80 to indicate
 * nationality-specific cause values.
 */
#define	C_1TR6_REQ_FAC_NOT_IMP	(0x10|0x80)
#define	C_1TR6_USER_BUSY	(0x3B|0x80)
#define C_1TR6_OOO		(0x39|0x80)
#define C_1TR6_CALL_REJECTED	(0x3E|0x80)
#define	C_1TR6_KEIN_KANAL	(0x40|0x80)
/*
 * VN3 specials.
 */
#define C_BEARER_NOT_AVAIL		0x71
#define C_END_TO_END_IT_IMPOSS	0x72
#define C_ENTERING_CONV_MODE	0x7E
#define C_INTERWORK_UNSPECIFIED	0x7F
/*
 * Local (IL3) reasons for an incoming call failing.
 */
#define	C_IL3_CPN_MM	0x01	/* Called party number mismatch */
#define	C_IL3_CPS_MM	0x02	/* Called party subaddress mismatch */
#define	C_IL3_LIS_NO	0x03	/* No listener (?!) */
#define	C_IL3_LIS_BUSY	0x04	/* Busy */
/*
 * Cause code masks
 */
#define	CAUSE_CODE_CLASS_MASK	0x70
#define	CAUSE_CODE_VALUE_MASK	0x0F
/*
 * Class bit patterns
 */
#define	CAUSE_CLASS_NORMAL_0			0x00
#define	CAUSE_CLASS_NORMAL_1			0x10
#define	CAUSE_CLASS_RESOURCE_UNAVAILABLE	0x20
#define	CAUSE_CLASS_OPTION_NOT_AVAILABLE	0x30
#define	CAUSE_CLASS_OPTION_NOT_IMPLEMENTED	0x40
#define	CAUSE_CLASS_INVALID_MESSAGE		0x50
#define	CAUSE_CLASS_PROTOCOL_ERROR		0x60
#define	CAUSE_CLASS_INTERWORKING		0x70
