14Srgrimes/* 24Srgrimes * Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved. 34Srgrimes * 44Srgrimes * Redistribution and use in source and binary forms, with or without 54Srgrimes * modification, are permitted provided that the following conditions 64Srgrimes * are met: 74Srgrimes * 1. Redistributions of source code must retain the above copyright 84Srgrimes * notice, this list of conditions and the following disclaimer. 94Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 104Srgrimes * notice, this list of conditions and the following disclaimer in the 114Srgrimes * documentation and/or other materials provided with the distribution. 124Srgrimes * 134Srgrimes * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 144Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 154Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 164Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 174Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 184Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 194Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 204Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 214Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 224Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 234Srgrimes * SUCH DAMAGE. 244Srgrimes * 254Srgrimes *--------------------------------------------------------------------------- 264Srgrimes * 274Srgrimes * i4b_cause.h - causes and cause handling for i4b 284Srgrimes * ----------------------------------------------- 294Srgrimes * 304Srgrimes * $Id: i4b_cause.h,v 1.3 2005/12/10 23:51:50 elad Exp $ 314Srgrimes * 324Srgrimes * $FreeBSD$ 334Srgrimes * 344Srgrimes * last edit-date: [Sun Feb 6 19:46:41 2000] 354Srgrimes * 36621Srgrimes *---------------------------------------------------------------------------*/ 374131Sjkh 384Srgrimes#ifndef _NETISDN_I4B_CAUSE_H_ 394Srgrimes#define _NETISDN_I4B_CAUSE_H_ 404Srgrimes 414Srgrimes/*---------------------------------------------------------------------------* 424Srgrimes * ISDN4BSD internal causes specification 434Srgrimes *---------------------------------------------------------------------------*/ 444Srgrimes 454Srgrimes#define CAUSE_VAL 0x000000ff /* cause value */ 464Srgrimes#define CAUSE_TYPE 0x0000ff00 /* cause type */ 474Srgrimes#define CAUSET_Q850 0 /* value coded according to Q.850 */ 484Srgrimes#define CAUSET_I4B 1 /* i4b protocol independent causes*/ 494Srgrimes 504Srgrimes#define GET_CAUSE_VAL(cause) ((cause) & 0xff) 514Srgrimes#define SET_CAUSE_VAL(dest, val) ((dest) = ((dest & 0xffffff00) | \ 524Srgrimes (val & 0x000000ff))) 534Srgrimes 544Srgrimes#define GET_CAUSE_TYPE(cause) (((cause) >> 8) & 0xff) 554Srgrimes#define SET_CAUSE_TYPE(dest, type) ((dest) = ((dest & 0xffff00ff) | \ 564Srgrimes ((type << 8) & 0x0000ff00))) 574Srgrimes 584Srgrimes#define SET_CAUSE_TV(dest, type, val) ((dest) = ((val & 0x000000ff) | \ 594Srgrimes ((type << 8) & 0x0000ff00))) 604Srgrimes 614Srgrimes/* CAUSET_I4B - protocol independent cause values */ 624Srgrimes 634Srgrimes#define CAUSE_I4B_NORMAL 0 /* normal call clearing */ 644Srgrimes#define CAUSE_I4B_BUSY 1 /* user busy */ 654Srgrimes#define CAUSE_I4B_NOCHAN 2 /* circuit/channel not available*/ 664Srgrimes#define CAUSE_I4B_INCOMP 3 /* incompatible source/dest */ 674Srgrimes#define CAUSE_I4B_REJECT 4 /* call rejected */ 684Srgrimes#define CAUSE_I4B_OOO 5 /* destination out of order */ 694Srgrimes#define CAUSE_I4B_TMPFAIL 6 /* temporary failure */ 704Srgrimes#define CAUSE_I4B_L1ERROR 7 /* L1 error / persistent deact */ 714Srgrimes#define CAUSE_I4B_LLDIAL 8 /* no dialout on leased line */ 724Srgrimes#define CAUSE_I4B_MAX 9 734Srgrimes /* NOTE: update isdnd/pcause.c when adding causes !!!!! */ 744Srgrimes /* NOTE: update layer3/i4b_q931.c when adding causes !!!!! */ 754Srgrimes 764Srgrimes/* CAUSET_Q850 - causes defined in Q.850 */ 774Srgrimes 782071Sats#define CAUSE_Q850_SHUTDN 0x00 /* normal D-channel shutdown */ 792071Sats#define CAUSE_Q850_NUNALLC 0x01 /* Unallocated (unassigned) number */ 802071Sats#define CAUSE_Q850_NRTTN 0x02 /* No route to specified transit network */ 814Srgrimes#define CAUSE_Q850_NRTDST 0x03 /* No route to destination */ 824Srgrimes#define CAUSE_Q850_SSINFTN 0x04 /* Send special information tone */ 834Srgrimes#define CAUSE_Q850_MDIALTP 0x05 /* Misdialled trunk prefix */ 844Srgrimes#define CAUSE_Q850_CHUNACC 0x06 /* Channel unacceptable */ 854Srgrimes#define CAUSE_Q850_CALLAWD 0x07 /* Call awarded and being delivered in an established channel */ 864Srgrimes#define CAUSE_Q850_PREEMPT 0x08 /* Preemption */ 874Srgrimes#define CAUSE_Q850_PREECRR 0x09 /* Preemption - circuit reserved for reuse */ 884Srgrimes#define CAUSE_Q850_NCCLR 0x10 /* Normal call clearing */ 894Srgrimes#define CAUSE_Q850_USRBSY 0x11 /* User busy */ 904Srgrimes#define CAUSE_Q850_NOUSRRSP 0x12 /* No user responding */ 914Srgrimes#define CAUSE_Q850_NOANSWR 0x13 /* No answer from user (user alerted) */ 924Srgrimes#define CAUSE_Q850_SUBSABS 0x14 /* Subscriber absent */ 934Srgrimes#define CAUSE_Q850_CALLREJ 0x15 /* Call rejected */ 944Srgrimes#define CAUSE_Q850_NUCHNG 0x16 /* Number changed */ 954Srgrimes#define CAUSE_Q850_NONSELUC 0x1A /* Non-selected user clearing */ 964Srgrimes#define CAUSE_Q850_DSTOOORDR 0x1B /* Destination out of order */ 974Srgrimes#define CAUSE_Q850_INVNUFMT 0x1C /* Invalid number format */ 984Srgrimes#define CAUSE_Q850_FACREJ 0x1D /* Facility rejected */ 994Srgrimes#define CAUSE_Q850_STENQRSP 0x1E /* Response to STATUS ENQUIRY */ 1004Srgrimes#define CAUSE_Q850_NORMUNSP 0x1F /* Normal, unspecified */ 1014Srgrimes#define CAUSE_Q850_NOCAVAIL 0x22 /* No circuit / channel available */ 1024Srgrimes#define CAUSE_Q850_NETOOORDR 0x26 /* Network out of order */ 1034Srgrimes#define CAUSE_Q850_PFMCDOOSERV 0x27 /* Permanent frame mode connection out of service */ 1044Srgrimes#define CAUSE_Q850_PFMCOPER 0x28 /* Permanent frame mode connection operational */ 1054Srgrimes#define CAUSE_Q850_TMPFAIL 0x29 /* Temporary failure */ 1064Srgrimes#define CAUSE_Q850_SWEQCONG 0x2A /* Switching equipment congestion */ 1074Srgrimes#define CAUSE_Q850_ACCINFDIS 0x2B /* Access information discarded */ 1084Srgrimes#define CAUSE_Q850_REQCNOTAV 0x2C /* Requested circuit/channel not available */ 1094Srgrimes#define CAUSE_Q850_PRECALBLK 0x2E /* Precedence call blocked */ 1104Srgrimes#define CAUSE_Q850_RESUNAVAIL 0x2F /* Resources unavailable, unspecified */ 1114Srgrimes#define CAUSE_Q850_QOSUNAVAIL 0x31 /* Quality of service unavailable */ 1124Srgrimes#define CAUSE_Q850_REQSERVNS 0x32 /* Requested facility not subscribed */ 1134Srgrimes#define CAUSE_Q850_OCBARRCUG 0x35 /* Outgoing calls barred within CUG */ 1144Srgrimes#define CAUSE_Q850_ICBARRCUG 0x36 /* Incoming calls barred within CUG */ 1154Srgrimes#define CAUSE_Q850_BCAPNAUTH 0x39 /* Bearer capability not authorized */ 1164Srgrimes#define CAUSE_Q850_BCAPNAVAIL 0x3A /* Bearer capability not presently available */ 1174Srgrimes#define CAUSE_Q850_INCSTOACISC 0x3E /* Inconsistenciy in designated outgoing access information and subscriber class */ 1184Srgrimes#define CAUSE_Q850_SOONOTAVAIL 0x3F /* Service or option not available, unspecified */ 1194Srgrimes#define CAUSE_Q850_BCAPNOTIMPL 0x41 /* Bearer capability not implemented */ 1204Srgrimes#define CAUSE_Q850_CHTYPNIMPL 0x42 /* Channel type not implemented */ 1214Srgrimes#define CAUSE_Q850_REQFACNIMPL 0x45 /* Requested facility not implemented */ 1224Srgrimes#define CAUSE_Q850_ORDINBCAVL 0x46 /* Only restricted digital information bearer capability is available */ 1234Srgrimes#define CAUSE_Q850_SOONOTIMPL 0x4F /* Service or option not implemented, unspecified */ 1244Srgrimes#define CAUSE_Q850_INVCLRFVAL 0x51 /* Invalid call reference value */ 1254Srgrimes#define CAUSE_Q850_IDCHDNOEX 0x52 /* Identified channel does not exist */ 1264Srgrimes#define CAUSE_Q850_SUSCAEXIN 0x53 /* A suspended call exists, but this call identity does not */ 1274Srgrimes#define CAUSE_Q850_CLIDINUSE 0x54 /* Call identity in use */ 1284Srgrimes#define CAUSE_Q850_NOCLSUSP 0x55 /* No call suspended */ 1294Srgrimes#define CAUSE_Q850_CLIDCLRD 0x56 /* Call having the requested call identity has been cleared */ 1304131Sjkh#define CAUSE_Q850_UNOTMEMCUG 0x57 /* User not member of CUG */ 1314Srgrimes#define CAUSE_Q850_INCDEST 0x58 /* Incompatible destination */ 1324Srgrimes#define CAUSE_Q850_NONEXCUG 0x5A /* Non-existent CUG */ 1334Srgrimes#define CAUSE_Q850_INVNTWSEL 0x5B /* Invalid transit network selection */ 1344Srgrimes#define CAUSE_Q850_INVMSG 0x5F /* Invalid message, unspecified */ 1354Srgrimes#define CAUSE_Q850_MIEMISS 0x60 /* Mandatory information element is missing */ 1364Srgrimes#define CAUSE_Q850_MSGTNI 0x61 /* Message type non-existent or not implemented */ 1374Srgrimes#define CAUSE_Q850_MSGNCMPT 0x62 /* Message not compatible with call state or message type non-existent or not implemented */ 1384Srgrimes#define CAUSE_Q850_IENENI 0x63 /* Information element/parameter non-existent or not implemented */ 1394Srgrimes#define CAUSE_Q850_INVIEC 0x64 /* Invalid information element contents */ 140#define CAUSE_Q850_MSGNCWCS 0x65 /* Message not compatible with call state */ 141#define CAUSE_Q850_RECOTIMEXP 0x66 /* Recovery on timer expiry */ 142#define CAUSE_Q850_PARMNENIPO 0x67 /* Parameter non-existent or not implemented, passed on */ 143#define CAUSE_Q850_MSGUNRDPRM 0x6E /* Message with unrecognized parameter, discarded */ 144#define CAUSE_Q850_PROTERR 0x6F /* Protocol error, unspecified */ 145#define CAUSE_Q850_INTWRKU 0x7F /* Interworking, unspecified */ 146 147#define CAUSE_Q850_MAX 128 148 149#endif /* !_NETISDN_I4B_CAUSE_H_ */ 150