/*
 * CallWeaver -- An open source telephony toolkit.
 *
 * Copyright (C) 1999 - 2005, Digium, Inc.
 *
 * Martin Pycko <martinp@digium.com>
 *
 * See http://www.callweaver.org for more information about
 * the CallWeaver project. Please do not directly contact
 * any of the maintainers of this project for assistance;
 * the project provides a web site, mailing lists and IRC
 * channels for your use.
 *
 * This program is free software, distributed under the terms of
 * the GNU General Public License Version 2. See the LICENSE file
 * at the top of the source tree.
 */

/*! \file
 * \brief Internal CallWeaver hangup causes
 */

#ifndef _CALLWEAVER_CAUSES_H
#define _CALLWEAVER_CAUSES_H

/* Causes for disconnection (from Q.931) */
#define CW_CAUSE_UNALLOCATED				1
#define CW_CAUSE_NO_ROUTE_TRANSIT_NET			2
#define CW_CAUSE_NO_ROUTE_DESTINATION			3
#define CW_CAUSE_CHANNEL_UNACCEPTABLE			6
#define CW_CAUSE_CALL_AWARDED_DELIVERED		7
#define CW_CAUSE_NORMAL_CLEARING			16
#define CW_CAUSE_USER_BUSY				17
#define CW_CAUSE_NO_USER_RESPONSE			18
#define CW_CAUSE_NO_ANSWER				19
#define CW_CAUSE_CALL_REJECTED				21
#define CW_CAUSE_NUMBER_CHANGED			22
#define CW_CAUSE_NONSELECTED_USER_CLEARING		26
#define CW_CAUSE_DESTINATION_OUT_OF_ORDER		27
#define CW_CAUSE_INVALID_NUMBER_FORMAT			28
#define CW_CAUSE_FACILITY_REJECTED			29
#define CW_CAUSE_RESPONSE_TO_STATUS_ENQUIRY		30
#define CW_CAUSE_NORMAL_UNSPECIFIED			31
#define CW_CAUSE_NORMAL_CIRCUIT_CONGESTION		34
#define CW_CAUSE_NETWORK_OUT_OF_ORDER			38
#define CW_CAUSE_NORMAL_TEMPORARY_FAILURE		41
#define CW_CAUSE_SWITCH_CONGESTION			42
#define CW_CAUSE_ACCESS_INFO_DISCARDED			43
#define CW_CAUSE_REQUESTED_CHAN_UNAVAIL		44
#define CW_CAUSE_PRE_EMPTED				45
#define CW_CAUSE_FACILITY_NOT_SUBSCRIBED  		50
#define CW_CAUSE_OUTGOING_CALL_BARRED     		52
#define CW_CAUSE_INCOMING_CALL_BARRED     		54
#define CW_CAUSE_BEARERCAPABILITY_NOTAUTH		57
#define CW_CAUSE_BEARERCAPABILITY_NOTAVAIL     	58
#define CW_CAUSE_BEARERCAPABILITY_NOTIMPL		65
#define CW_CAUSE_CHAN_NOT_IMPLEMENTED     		66
#define CW_CAUSE_FACILITY_NOT_IMPLEMENTED      	69
#define CW_CAUSE_INVALID_CALL_REFERENCE		81
#define CW_CAUSE_INCOMPATIBLE_DESTINATION		88
#define CW_CAUSE_INVALID_MSG_UNSPECIFIED  		95
#define CW_CAUSE_MANDATORY_IE_MISSING			96
#define CW_CAUSE_MESSAGE_TYPE_NONEXIST			97
#define CW_CAUSE_WRONG_MESSAGE				98
#define CW_CAUSE_IE_NONEXIST				99
#define CW_CAUSE_INVALID_IE_CONTENTS			100
#define CW_CAUSE_WRONG_CALL_STATE			101
#define CW_CAUSE_RECOVERY_ON_TIMER_EXPIRE		102
#define CW_CAUSE_MANDATORY_IE_LENGTH_ERROR		103
#define CW_CAUSE_PROTOCOL_ERROR			111
#define CW_CAUSE_INTERWORKING				127

/* Special CallWeaver aliases */
#define CW_CAUSE_BUSY 					CW_CAUSE_USER_BUSY
#define CW_CAUSE_FAILURE 				CW_CAUSE_NETWORK_OUT_OF_ORDER
#define CW_CAUSE_NORMAL 				CW_CAUSE_NORMAL_CLEARING
#define CW_CAUSE_NOANSWER	 			CW_CAUSE_NO_ANSWER
#define CW_CAUSE_CONGESTION	 			CW_CAUSE_NORMAL_CIRCUIT_CONGESTION
#define CW_CAUSE_UNREGISTERED				CW_CAUSE_NO_ROUTE_DESTINATION
#define CW_CAUSE_NOTDEFINED 				0
#define CW_CAUSE_NOSUCHDRIVER				CW_CAUSE_CHAN_NOT_IMPLEMENTED

#endif /* _CALLWEAVER_CAUSES_H */
