1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
|
/*
* Copyright (c) 1997, 1999 Hellmuth Michaelis. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
*---------------------------------------------------------------------------
*
* pcause.c - printing cause values
* --------------------------------
*
* $Id: pcause.c,v 1.5 1999/12/13 21:25:25 hm Exp $
*
* $FreeBSD$
*
* last edit-date: [Mon Dec 13 21:51:20 1999]
*
*---------------------------------------------------------------------------*/
#include "decode.h"
#include "pcause.h"
char *
print_cause_q850(unsigned char code)
{
static char error_message[120];
char *e;
switch(code)
{
case CAUSE_Q850_SHUTDN:
e = "normal D-channel shutdown";
break;
case CAUSE_Q850_NUNALLC:
e = "Unallocated (unassigned) number";
break;
case CAUSE_Q850_NRTTN:
e = "No route to specified transit network";
break;
case CAUSE_Q850_NRTDST:
e = "No route to destination";
break;
case CAUSE_Q850_SSINFTN:
e = "Send special information tone";
break;
case CAUSE_Q850_MDIALTP:
e = "Misdialled trunk prefix";
break;
case CAUSE_Q850_CHUNACC:
e = "Channel unacceptable";
break;
case CAUSE_Q850_CALLAWD:
e = "Call awarded and being delivered in an established channel";
break;
case CAUSE_Q850_PREEMPT:
e = "Preemption";
break;
case CAUSE_Q850_PREECRR:
e = "Preemption - circuit reserved for reuse";
break;
case CAUSE_Q850_NCCLR:
e = "Normal call clearing";
break;
case CAUSE_Q850_USRBSY:
e = "User busy";
break;
case CAUSE_Q850_NOUSRRSP:
e = "No user responding";
break;
case CAUSE_Q850_NOANSWR:
e = "No answer from user (user alerted)";
break;
case CAUSE_Q850_SUBSABS:
e = "Subscriber absent";
break;
case CAUSE_Q850_CALLREJ:
e = "Call rejected";
break;
case CAUSE_Q850_NUCHNG:
e = "Number changed";
break;
case CAUSE_Q850_NONSELUC:
e = "Non-selected user clearing";
break;
case CAUSE_Q850_DSTOOORDR:
e = "Destination out of order";
break;
case CAUSE_Q850_INVNUFMT:
e = "Invalid number format";
break;
case CAUSE_Q850_FACREJ:
e = "Facility rejected";
break;
case CAUSE_Q850_STENQRSP:
e = "Response to STATUS ENQUIRY";
break;
case CAUSE_Q850_NORMUNSP:
e = "Normal, unspecified";
break;
case CAUSE_Q850_NOCAVAIL:
e = "No circuit / channel available";
break;
case CAUSE_Q850_NETOOORDR:
e = "Network out of order";
break;
case CAUSE_Q850_PFMCDOOSERV:
e = "Permanent frame mode connection out of service";
break;
case CAUSE_Q850_PFMCOPER:
e = "Permanent frame mode connection operational";
break;
case CAUSE_Q850_TMPFAIL:
e = "Temporary failure";
break;
case CAUSE_Q850_SWEQCONG:
e = "Switching equipment congestion";
break;
case CAUSE_Q850_ACCINFDIS:
e = "Access information discarded";
break;
case CAUSE_Q850_REQCNOTAV:
e = "Requested circuit/channel not available";
break;
case CAUSE_Q850_PRECALBLK:
e = "Precedence call blocked";
break;
case CAUSE_Q850_RESUNAVAIL:
e = "Resources unavailable, unspecified";
break;
case CAUSE_Q850_QOSUNAVAIL:
e = "Quality of service unavailable";
break;
case CAUSE_Q850_REQSERVNS:
e = "Requested facility not subscribed";
break;
case CAUSE_Q850_OCBARRCUG:
e = "Outgoing calls barred within CUG";
break;
case CAUSE_Q850_ICBARRCUG:
e = "Incoming calls barred within CUG";
break;
case CAUSE_Q850_BCAPNAUTH:
e = "Bearer capability not authorized";
break;
case CAUSE_Q850_BCAPNAVAIL:
e = "Bearer capability not presently available";
break;
case CAUSE_Q850_INCSTOACISC:
e = "Inconsistenciy in designated outg. access info and subscriber class";
break;
case CAUSE_Q850_SOONOTAVAIL:
e = "Service or option not available, unspecified";
break;
case CAUSE_Q850_BCAPNOTIMPL:
e = "Bearer capability not implemented";
break;
case CAUSE_Q850_CHTYPNIMPL:
e = "Channel type not implemented";
break;
case CAUSE_Q850_REQFACNIMPL:
e = "Requested facility not implemented";
break;
case CAUSE_Q850_ORDINBCAVL:
e = "Only restricted digital information bearer capability is available";
break;
case CAUSE_Q850_SOONOTIMPL:
e = "Service or option not implemented, unspecified";
break;
case CAUSE_Q850_INVCLRFVAL:
e = "Invalid call reference value";
break;
case CAUSE_Q850_IDCHDNOEX:
e = "Identified channel does not exist";
break;
case CAUSE_Q850_SUSCAEXIN:
e = "A suspended call exists, but this call identity does not";
break;
case CAUSE_Q850_CLIDINUSE:
e = "Call identity in use";
break;
case CAUSE_Q850_NOCLSUSP:
e = "No call suspended";
break;
case CAUSE_Q850_CLIDCLRD:
e = "Call having the requested call identity has been cleared";
break;
case CAUSE_Q850_UNOTMEMCUG:
e = "User not member of CUG";
break;
case CAUSE_Q850_INCDEST:
e = "Incompatible destination";
break;
case CAUSE_Q850_NONEXCUG:
e = "Non-existent CUG";
break;
case CAUSE_Q850_INVNTWSEL:
e = "Invalid transit network selection";
break;
case CAUSE_Q850_INVMSG:
e = "Invalid message, unspecified";
break;
case CAUSE_Q850_MIEMISS:
e = "Mandatory information element is missing";
break;
case CAUSE_Q850_MSGTNI:
e = "Message type non-existent or not implemented";
break;
case CAUSE_Q850_MSGNCMPT:
e = "Msg incompatible with call state/message type non-existent/not implemented";
break;
case CAUSE_Q850_IENENI:
e = "Information element/parameter non-existent or not implemented";
break;
case CAUSE_Q850_INVIEC:
e = "Invalid information element contents";
break;
case CAUSE_Q850_MSGNCWCS:
e = "Message not compatible with call state";
break;
case CAUSE_Q850_RECOTIMEXP:
e = "Recovery on timer expiry";
break;
case CAUSE_Q850_PARMNENIPO:
e = "Parameter non-existent or not implemented, passed on";
break;
case CAUSE_Q850_MSGUNRDPRM:
e = "Message with unrecognized parameter, discarded";
break;
case CAUSE_Q850_PROTERR:
e = "Protocol error, unspecified";
break;
case CAUSE_Q850_INTWRKU:
e = "Interworking, unspecified";
break;
default:
e = "ERROR, unknown cause value!";
break;
}
sprintf(error_message, "%d: %s (Q.850)", code, e);
return(error_message);
}
/* EOF */
|