/*****************************************************************************
 * 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 2000/03/06 21:28:01 ron 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_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_CALL_REJECTED		0x15
#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_REQ_CC_NOT_AVAILABLE	0x2C

#define C_BEARER_CAP_NOT_IMPLE	0x41

#define C_INVALID_CR		0x51
#define	C_INCOMPAT_DESTINATION	0x58

#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
