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 * printing cause values
28 * ---------------------
30 * $Id: pcause_q850.c,v 1.3 2009/04/16 05:56:33 lukem Exp $
34 * last edit-date: [Mon Dec 13 21:56:18 1999]
36 *---------------------------------------------------------------------------*/
39 #include "pcause_q850.h"
42 print_cause_q850(unsigned char code
)
44 static char error_message
[120];
49 case CAUSE_Q850_SHUTDN
:
50 e
= "normal D-channel shutdown";
53 case CAUSE_Q850_NUNALLC
:
54 e
= "Unallocated (unassigned) number";
57 case CAUSE_Q850_NRTTN
:
58 e
= "No route to specified transit network";
61 case CAUSE_Q850_NRTDST
:
62 e
= "No route to destination";
65 case CAUSE_Q850_SSINFTN
:
66 e
= "Send special information tone";
69 case CAUSE_Q850_MDIALTP
:
70 e
= "Misdialled trunk prefix";
73 case CAUSE_Q850_CHUNACC
:
74 e
= "Channel unacceptable";
77 case CAUSE_Q850_CALLAWD
:
78 e
= "Call awarded and being delivered in an established channel";
81 case CAUSE_Q850_PREEMPT
:
85 case CAUSE_Q850_PREECRR
:
86 e
= "Preemption - circuit reserved for reuse";
89 case CAUSE_Q850_NCCLR
:
90 e
= "Normal call clearing";
93 case CAUSE_Q850_USRBSY
:
97 case CAUSE_Q850_NOUSRRSP
:
98 e
= "No user responding";
101 case CAUSE_Q850_NOANSWR
:
102 e
= "No answer from user (user alerted)";
105 case CAUSE_Q850_SUBSABS
:
106 e
= "Subscriber absent";
109 case CAUSE_Q850_CALLREJ
:
113 case CAUSE_Q850_NUCHNG
:
114 e
= "Number changed";
117 case CAUSE_Q850_NONSELUC
:
118 e
= "Non-selected user clearing";
121 case CAUSE_Q850_DSTOOORDR
:
122 e
= "Destination out of order";
125 case CAUSE_Q850_INVNUFMT
:
126 e
= "Invalid number format";
129 case CAUSE_Q850_FACREJ
:
130 e
= "Facility rejected";
133 case CAUSE_Q850_STENQRSP
:
134 e
= "Response to STATUS ENQUIRY";
137 case CAUSE_Q850_NORMUNSP
:
138 e
= "Normal, unspecified";
141 case CAUSE_Q850_NOCAVAIL
:
142 e
= "No circuit / channel available";
145 case CAUSE_Q850_NETOOORDR
:
146 e
= "Network out of order";
149 case CAUSE_Q850_PFMCDOOSERV
:
150 e
= "Permanent frame mode connection out of service";
153 case CAUSE_Q850_PFMCOPER
:
154 e
= "Permanent frame mode connection operational";
157 case CAUSE_Q850_TMPFAIL
:
158 e
= "Temporary failure";
161 case CAUSE_Q850_SWEQCONG
:
162 e
= "Switching equipment congestion";
165 case CAUSE_Q850_ACCINFDIS
:
166 e
= "Access information discarded";
169 case CAUSE_Q850_REQCNOTAV
:
170 e
= "Requested circuit/channel not available";
173 case CAUSE_Q850_PRECALBLK
:
174 e
= "Precedence call blocked";
177 case CAUSE_Q850_RESUNAVAIL
:
178 e
= "Resources unavailable, unspecified";
181 case CAUSE_Q850_QOSUNAVAIL
:
182 e
= "Quality of service unavailable";
185 case CAUSE_Q850_REQSERVNS
:
186 e
= "Requested facility not subscribed";
189 case CAUSE_Q850_OCBARRCUG
:
190 e
= "Outgoing calls barred within CUG";
193 case CAUSE_Q850_ICBARRCUG
:
194 e
= "Incoming calls barred within CUG";
197 case CAUSE_Q850_BCAPNAUTH
:
198 e
= "Bearer capability not authorized";
201 case CAUSE_Q850_BCAPNAVAIL
:
202 e
= "Bearer capability not presently available";
205 case CAUSE_Q850_INCSTOACISC
:
206 e
= "Inconsistenciy in designated outg. access info and subscriber class";
209 case CAUSE_Q850_SOONOTAVAIL
:
210 e
= "Service or option not available, unspecified";
213 case CAUSE_Q850_BCAPNOTIMPL
:
214 e
= "Bearer capability not implemented";
217 case CAUSE_Q850_CHTYPNIMPL
:
218 e
= "Channel type not implemented";
221 case CAUSE_Q850_REQFACNIMPL
:
222 e
= "Requested facility not implemented";
225 case CAUSE_Q850_ORDINBCAVL
:
226 e
= "Only restricted digital information bearer capability is available";
229 case CAUSE_Q850_SOONOTIMPL
:
230 e
= "Service or option not implemented, unspecified";
233 case CAUSE_Q850_INVCLRFVAL
:
234 e
= "Invalid call reference value";
237 case CAUSE_Q850_IDCHDNOEX
:
238 e
= "Identified channel does not exist";
241 case CAUSE_Q850_SUSCAEXIN
:
242 e
= "A suspended call exists, but this call identity does not";
245 case CAUSE_Q850_CLIDINUSE
:
246 e
= "Call identity in use";
249 case CAUSE_Q850_NOCLSUSP
:
250 e
= "No call suspended";
253 case CAUSE_Q850_CLIDCLRD
:
254 e
= "Call having the requested call identity has been cleared";
257 case CAUSE_Q850_UNOTMEMCUG
:
258 e
= "User not member of CUG";
261 case CAUSE_Q850_INCDEST
:
262 e
= "Incompatible destination";
265 case CAUSE_Q850_NONEXCUG
:
266 e
= "Non-existent CUG";
269 case CAUSE_Q850_INVNTWSEL
:
270 e
= "Invalid transit network selection";
273 case CAUSE_Q850_INVMSG
:
274 e
= "Invalid message, unspecified";
277 case CAUSE_Q850_MIEMISS
:
278 e
= "Mandatory information element is missing";
281 case CAUSE_Q850_MSGTNI
:
282 e
= "Message type non-existent or not implemented";
285 case CAUSE_Q850_MSGNCMPT
:
286 e
= "Msg incompatible with call state/message type non-existent/not implemented";
289 case CAUSE_Q850_IENENI
:
290 e
= "Information element/parameter non-existent or not implemented";
293 case CAUSE_Q850_INVIEC
:
294 e
= "Invalid information element contents";
297 case CAUSE_Q850_MSGNCWCS
:
298 e
= "Message not compatible with call state";
301 case CAUSE_Q850_RECOTIMEXP
:
302 e
= "Recovery on timer expiry";
305 case CAUSE_Q850_PARMNENIPO
:
306 e
= "Parameter non-existent or not implemented, passed on";
309 case CAUSE_Q850_MSGUNRDPRM
:
310 e
= "Message with unrecognized parameter, discarded";
313 case CAUSE_Q850_PROTERR
:
314 e
= "Protocol error, unspecified";
317 case CAUSE_Q850_INTWRKU
:
318 e
= "Interworking, unspecified";
322 e
= "ERROR, unknown cause value!";
326 sprintf(error_message
, "%d: %s (Q.850)", code
, e
);
327 return(error_message
);