2 * Copyright (c) 1997, 1999 Hellmuth Michaelis. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 *---------------------------------------------------------------------------
27 * pcause.c - printing cause values
28 * --------------------------------
30 * $Id: pcause.c,v 1.5 1999/12/13 21:25:25 hm Exp $
32 * $FreeBSD: src/usr.sbin/i4b/isdndecode/pcause.c,v 1.6.2.1 2001/08/01 17:45:05 obrien Exp $
33 * $DragonFly: src/usr.sbin/i4b/isdndecode/pcause.c,v 1.2 2003/06/17 04:29:55 dillon Exp $
35 * last edit-date: [Mon Dec 13 21:51:20 1999]
37 *---------------------------------------------------------------------------*/
43 print_cause_q850(unsigned char code)
45 static char error_message[120];
50 case CAUSE_Q850_SHUTDN:
51 e = "normal D-channel shutdown";
54 case CAUSE_Q850_NUNALLC:
55 e = "Unallocated (unassigned) number";
58 case CAUSE_Q850_NRTTN:
59 e = "No route to specified transit network";
62 case CAUSE_Q850_NRTDST:
63 e = "No route to destination";
66 case CAUSE_Q850_SSINFTN:
67 e = "Send special information tone";
70 case CAUSE_Q850_MDIALTP:
71 e = "Misdialled trunk prefix";
74 case CAUSE_Q850_CHUNACC:
75 e = "Channel unacceptable";
78 case CAUSE_Q850_CALLAWD:
79 e = "Call awarded and being delivered in an established channel";
82 case CAUSE_Q850_PREEMPT:
86 case CAUSE_Q850_PREECRR:
87 e = "Preemption - circuit reserved for reuse";
90 case CAUSE_Q850_NCCLR:
91 e = "Normal call clearing";
94 case CAUSE_Q850_USRBSY:
98 case CAUSE_Q850_NOUSRRSP:
99 e = "No user responding";
102 case CAUSE_Q850_NOANSWR:
103 e = "No answer from user (user alerted)";
106 case CAUSE_Q850_SUBSABS:
107 e = "Subscriber absent";
110 case CAUSE_Q850_CALLREJ:
114 case CAUSE_Q850_NUCHNG:
115 e = "Number changed";
118 case CAUSE_Q850_NONSELUC:
119 e = "Non-selected user clearing";
122 case CAUSE_Q850_DSTOOORDR:
123 e = "Destination out of order";
126 case CAUSE_Q850_INVNUFMT:
127 e = "Invalid number format";
130 case CAUSE_Q850_FACREJ:
131 e = "Facility rejected";
134 case CAUSE_Q850_STENQRSP:
135 e = "Response to STATUS ENQUIRY";
138 case CAUSE_Q850_NORMUNSP:
139 e = "Normal, unspecified";
142 case CAUSE_Q850_NOCAVAIL:
143 e = "No circuit / channel available";
146 case CAUSE_Q850_NETOOORDR:
147 e = "Network out of order";
150 case CAUSE_Q850_PFMCDOOSERV:
151 e = "Permanent frame mode connection out of service";
154 case CAUSE_Q850_PFMCOPER:
155 e = "Permanent frame mode connection operational";
158 case CAUSE_Q850_TMPFAIL:
159 e = "Temporary failure";
162 case CAUSE_Q850_SWEQCONG:
163 e = "Switching equipment congestion";
166 case CAUSE_Q850_ACCINFDIS:
167 e = "Access information discarded";
170 case CAUSE_Q850_REQCNOTAV:
171 e = "Requested circuit/channel not available";
174 case CAUSE_Q850_PRECALBLK:
175 e = "Precedence call blocked";
178 case CAUSE_Q850_RESUNAVAIL:
179 e = "Resources unavailable, unspecified";
182 case CAUSE_Q850_QOSUNAVAIL:
183 e = "Quality of service unavailable";
186 case CAUSE_Q850_REQSERVNS:
187 e = "Requested facility not subscribed";
190 case CAUSE_Q850_OCBARRCUG:
191 e = "Outgoing calls barred within CUG";
194 case CAUSE_Q850_ICBARRCUG:
195 e = "Incoming calls barred within CUG";
198 case CAUSE_Q850_BCAPNAUTH:
199 e = "Bearer capability not authorized";
202 case CAUSE_Q850_BCAPNAVAIL:
203 e = "Bearer capability not presently available";
206 case CAUSE_Q850_INCSTOACISC:
207 e = "Inconsistenciy in designated outg. access info and subscriber class";
210 case CAUSE_Q850_SOONOTAVAIL:
211 e = "Service or option not available, unspecified";
214 case CAUSE_Q850_BCAPNOTIMPL:
215 e = "Bearer capability not implemented";
218 case CAUSE_Q850_CHTYPNIMPL:
219 e = "Channel type not implemented";
222 case CAUSE_Q850_REQFACNIMPL:
223 e = "Requested facility not implemented";
226 case CAUSE_Q850_ORDINBCAVL:
227 e = "Only restricted digital information bearer capability is available";
230 case CAUSE_Q850_SOONOTIMPL:
231 e = "Service or option not implemented, unspecified";
234 case CAUSE_Q850_INVCLRFVAL:
235 e = "Invalid call reference value";
238 case CAUSE_Q850_IDCHDNOEX:
239 e = "Identified channel does not exist";
242 case CAUSE_Q850_SUSCAEXIN:
243 e = "A suspended call exists, but this call identity does not";
246 case CAUSE_Q850_CLIDINUSE:
247 e = "Call identity in use";
250 case CAUSE_Q850_NOCLSUSP:
251 e = "No call suspended";
254 case CAUSE_Q850_CLIDCLRD:
255 e = "Call having the requested call identity has been cleared";
258 case CAUSE_Q850_UNOTMEMCUG:
259 e = "User not member of CUG";
262 case CAUSE_Q850_INCDEST:
263 e = "Incompatible destination";
266 case CAUSE_Q850_NONEXCUG:
267 e = "Non-existent CUG";
270 case CAUSE_Q850_INVNTWSEL:
271 e = "Invalid transit network selection";
274 case CAUSE_Q850_INVMSG:
275 e = "Invalid message, unspecified";
278 case CAUSE_Q850_MIEMISS:
279 e = "Mandatory information element is missing";
282 case CAUSE_Q850_MSGTNI:
283 e = "Message type non-existent or not implemented";
286 case CAUSE_Q850_MSGNCMPT:
287 e = "Msg incompatible with call state/message type non-existent/not implemented";
290 case CAUSE_Q850_IENENI:
291 e = "Information element/parameter non-existent or not implemented";
294 case CAUSE_Q850_INVIEC:
295 e = "Invalid information element contents";
298 case CAUSE_Q850_MSGNCWCS:
299 e = "Message not compatible with call state";
302 case CAUSE_Q850_RECOTIMEXP:
303 e = "Recovery on timer expiry";
306 case CAUSE_Q850_PARMNENIPO:
307 e = "Parameter non-existent or not implemented, passed on";
310 case CAUSE_Q850_MSGUNRDPRM:
311 e = "Message with unrecognized parameter, discarded";
314 case CAUSE_Q850_PROTERR:
315 e = "Protocol error, unspecified";
318 case CAUSE_Q850_INTWRKU:
319 e = "Interworking, unspecified";
323 e = "ERROR, unknown cause value!";
327 sprintf(error_message, "%d: %s (Q.850)", code, e);
328 return(error_message);