1 /*****************************************************************************\
5 **---------------------------------------------------------------------------**
6 ** Copyright: Andreas Eversberg **
10 \*****************************************************************************/
13 #include "sys/types.h"
17 struct isdn_cause isdn_cause[128] = {
18 /********************************* - **/ /*38*/
21 { /*1*/ "Unallocated number",
22 "Nummer nicht vergeben" },
23 { /*2*/ "No route to transit network",
24 "Keine Verbindung zum Netz" },
25 { /*3*/ "No route to destination",
26 "Zielnummer nicht erreichbar" },
27 { /*4*/ "<Listen to announcement...>",
28 "<Ansage hoeren...>" },
29 { /*5*/ "Misdialed trunk prefix.",
30 "Falscher Carrier-Code" },
31 { /*6*/ "Channel unacceptable",
32 "Kanal nicht akzeptiert" },
37 { /*9*/ "Preemption - circuit reserved",
38 "Vorkauf - Gasse reserviert" },
51 { /*16*/ "Normal call clearing",
52 "Normaler Verbindungsabbau" },
54 "Teilnehmer besetzt" },
55 { /*18*/ "No user responding",
56 "Teilnehmer antwortet nicht" },
57 { /*19*/ "No answer from user",
58 "Teilnehmer nimmt nicht ab" },
59 { /*20*/ "Subscriber absent",
60 "Teilnehmer nicht anwesend" },
61 { /*21*/ "Call rejected",
62 "Gespraech abgewiesen" },
63 { /*22*/ "Number changed",
64 "Rufnummer hat sich geaendert" },
71 { /*26*/ "Non-selected user clearing",
72 "Gespraech woanders angenommen" },
73 { /*27*/ "Destination out of order",
74 "Gegenstelle ausser Betrieb" },
75 { /*28*/ "Invalid number (incomplete)",
76 "Fehlerhafte Nummer (n. komplett)" },
77 { /*29*/ "Facility rejected",
78 "Funktion nicht verfuegbar" },
81 { /*31*/ "Normal, unspecified",
82 "Normal, unspezifisch" },
87 { /*34*/ "No circuit/channel available",
88 "Keine Gasse/Kanal verfuegbar" },
101 { /*41*/ "Temporary failure",
102 "Vorruebergehende Fehlfunktion" },
103 { /*42*/ "Switchting equipment congestion",
104 "Vermittlungstelle ueberlastet" },
105 { /*43*/ "Access informationen discarded",
106 "Zugriffsinformationen geloescht" },
107 { /*44*/ "No requested circuit/channel",
108 "Keine angeforderte Gasse/Kanal" },
111 { /*46*/ "Precedence call blocked",
112 "Vorverkaufanruf gesperrt" },
113 { /*47*/ "Resource unavailable, unspecified",
117 { /*49*/ "Quality of service not available",
118 "Qualitaetsmerkmal nicht verfuegbar" },
119 { /*50*/ "Requested facility not subscribed",
120 "Funktion nicht freigeschaltet" },
125 { /*53*/ "Outgoing calls barred within CUG",
126 "CUG erlaubt keine gehenden Rufe" },
129 { /*55*/ "Incoming calls barred within CUG",
130 "CUG erlaubt keine kommenden Rufe" },
133 { /*57*/ "Bearer capability not authorized",
134 "Verbindungseigenschaft verboten" },
135 { /*58*/ "Bearer capability not present",
136 "Verb.eigenschaft n. verfuegbar" },
145 { /*63*/ "Service or option not available",
146 "Dienst oder Merkmal nicht verf." },
149 { /*65*/ "Bearer capability not implement.",
150 "Verb.eigenschaft nicht unterstue." },
151 { /*66*/ "Channel type not implemented",
152 "Kanalart nicht unterstuetzt" },
157 { /*69*/ "Requested facility not implement.",
158 "Funktion nicht unterstuetzt" },
159 { /*70*/ "restricted digital informat. only",
160 "Nur eingeschraenkte digitale inf." },
177 { /*79*/ "Service or option not implemented",
178 "Dienst oder Merkmal n. unterstue." },
181 { /*81*/ "Invalid call reference value",
182 "Falsche call reference" },
183 { /*82*/ "Identified channel does not exist",
184 "Erkannter Kanal existiert nicht" },
185 { /*83*/ "No suspended call with this id",
186 "Kein geparktes Gespr. f. diese ID" },
187 { /*84*/ "Call identity in use",
189 { /*85*/ "No call suspended",
190 "Kein geparktes Gespraech" },
191 { /*86*/ "Suspended call has been cleared",
192 "Geparktes Gespraech wurde beendet" },
193 { /*87*/ "User not member of CUG",
194 "Teilnehmer nicht in der CUG" },
195 { /*88*/ "Incompatibel destination",
196 "Gegenstelle nicht kompatibel" },
199 { /*90*/ "Non-existent CUG",
200 "CUG existiert nicht" },
201 { /*91*/ "Invalid transit network selection",
202 "Falscher Carrier-Code" },
209 { /*95*/ "Invalid message, unspecified",
210 "Fehlerhafte Daten, unbekannt" },
211 { /*96*/ "Information element missing",
212 "Information wird vermisst" },
213 { /*97*/ "Message type non-existent",
214 "Message exisitiert nicht" },
215 { /*98*/ "Message not compatible with state",
216 "Message nicht komatibel" },
217 { /*99*/ "Information element not impl.",
218 "Information nicht implementiert" },
219 { /*100*/ "Invalid info element contents",
220 "Fehlerhafterhafte Information" },
221 { /*101*/ "Message not compatible with state",
222 "Message not kompatibel" },
223 { /*102*/ "Recovery on timer expiry",
224 "Fehler durch Zeitueberschreitung" },
225 { /*103*/ "Parameter non-existent",
241 { /*111*/ "Protocol error, unspecified",
242 "Protokollfehler, unbekannt" },
273 { /*127*/ "Interworking, unspecified",
274 "Zusammenspiel, unbekannt" },
277 struct isdn_cause isdn_cause_class[8] = {
278 /********************************* - **/ /*38*/
279 { /*0*/ "(Normal class)",
280 "(Normale Fehlerklasse)" },
281 { /*16*/ "(Normal class)",
282 "(Normale Fehlerklasse)" },
283 { /*32*/ "(Resource unavailable class)",
284 "(Ressourcen nicht verfuegbar)" },
285 { /*48*/ "(Service or option unavailable)",
286 "(Dienst oder Merkmal n. verfueg.)" },
287 { /*64*/ "(Service or option n.implemented)",
288 "(Dienst oder Merkmal n. vorhand.)" },
289 { /*80*/ "(Invalid message class)",
290 "(Fehlerhafte Message)" },
291 { /*96*/ "(Protocol error class)",
292 "(Klasse der Protokollfehler)" },
293 { /*112*/ "(Interworking class)",
294 "(Klasse des Zusammenspiels)" },
297 struct isdn_location isdn_location[16] = {
300 { /*1*/ "Private (Local)",
302 { /*2*/ "Public (Local)",
303 "Vermittlung (Lokal)" },
305 "Knotenvermittlung" },
306 { /*4*/ "Public (Remote)",
307 "Vermittlung (Gegenstelle)" },
308 { /*5*/ "Private (Remote)",
309 "Anlage (Gegenstelle)" },
312 { /*7*/ "International",
318 { /*10*/ "Beyond Interworking",
319 "Nicht verfuegbar" },
332 char *get_isdn_cause(int cause, int location, int type)
334 static char result[128];
337 if (cause<0 || cause>127)
342 case DISPLAY_CAUSE_NUMBER:
343 SPRINT(result, "Cause %d", cause);
346 case DISPLAY_CAUSE_ENGLISH:
347 if (isdn_cause[cause].english[0])
348 SPRINT(result, "%d - %s", cause, isdn_cause[cause].english);
349 else SPRINT(result, "%d - %s", cause, isdn_cause_class[cause>>4].english);
352 case DISPLAY_CAUSE_GERMAN:
353 if (isdn_cause[cause].german[0])
354 SPRINT(result, "%d - %s", cause, isdn_cause[cause].german);
355 else SPRINT(result, "%d - %s", cause, isdn_cause_class[cause>>4].german);
358 case DISPLAY_LOCATION_ENGLISH:
359 if (isdn_location[location].english[0])
360 SPRINT(result, "%d - %s", cause, isdn_location[location].english);
361 else SPRINT(result, "%d - Location code %d", cause, location);
364 case DISPLAY_LOCATION_GERMAN:
365 if (isdn_location[location].german[0])
366 SPRINT(result, "%d - %s", cause, isdn_location[location].german);
367 else SPRINT(result, "%d - Lokationscode %d", cause, location);