1 /*****************************************************************************\
5 **---------------------------------------------------------------------------**
6 ** Copyright: Andreas Eversberg **
10 \*****************************************************************************/
14 struct isdn_cause isdn_cause[128] = {
15 /********************************* - **/ /*38*/
18 { /*1*/ "Unallocated number",
19 "Nummer nicht vergeben" },
20 { /*2*/ "No route to transit network",
21 "Keine Verbindung zum Netz" },
22 { /*3*/ "No route to destination",
23 "Zielnummer nicht erreichbar" },
24 { /*4*/ "<Listen to announcement...>",
25 "<Ansage hoeren...>" },
26 { /*5*/ "Misdialed trunk prefix.",
27 "Falscher Carrier-Code" },
28 { /*6*/ "Channel unacceptable",
29 "Kanal nicht akzeptiert" },
34 { /*9*/ "Preemption - circuit reserved",
35 "Vorkauf - Gasse reserviert" },
48 { /*16*/ "Normal call clearing",
49 "Normaler Verbindungsabbau" },
51 "Teilnehmer besetzt" },
52 { /*18*/ "No user responding",
53 "Teilnehmer antwortet nicht" },
54 { /*19*/ "No answer from user",
55 "Teilnehmer nimmt nicht ab" },
56 { /*20*/ "Subscriber absent",
57 "Teilnehmer nicht anwesend" },
58 { /*21*/ "Call rejected",
59 "Gespraech abgewiesen" },
60 { /*22*/ "Number changed",
61 "Rufnummer hat sich geaendert" },
68 { /*26*/ "Non-selected user clearing",
69 "Gespraech woanders angenommen" },
70 { /*27*/ "Destination out of order",
71 "Gegenstelle ausser Betrieb" },
72 { /*28*/ "Invalid number (incomplete)",
73 "Fehlerhafte Nummer (n. komplett)" },
74 { /*29*/ "Facility rejected",
75 "Funktion nicht verfuegbar" },
78 { /*31*/ "Normal, unspecified",
79 "Normal, unspezifisch" },
84 { /*34*/ "No circuit/channel available",
85 "Keine Gasse/Kanal verfuegbar" },
98 { /*41*/ "Temporary failure",
99 "Vorruebergehende Fehlfunktion" },
100 { /*42*/ "Switchting equipment congestion",
101 "Vermittlungstelle ueberlastet" },
102 { /*43*/ "Access informationen discarded",
103 "Zugriffsinformationen geloescht" },
104 { /*44*/ "No requested circuit/channel",
105 "Keine angeforderte Gasse/Kanal" },
108 { /*46*/ "Precedence call blocked",
109 "Vorverkaufanruf gesperrt" },
110 { /*47*/ "Resource unavailable, unspecified",
114 { /*49*/ "Quality of service not available",
115 "Qualitaetsmerkmal nicht verfuegbar" },
116 { /*50*/ "Requested facility not subscribed",
117 "Funktion nicht freigeschaltet" },
122 { /*53*/ "Outgoing calls barred within CUG",
123 "CUG erlaubt keine gehenden Rufe" },
126 { /*55*/ "Incoming calls barred within CUG",
127 "CUG erlaubt keine kommenden Rufe" },
130 { /*57*/ "Bearer capability not authorized",
131 "Verbindungseigenschaft verboten" },
132 { /*58*/ "Bearer capability not present",
133 "Verb.eigenschaft n. verfuegbar" },
142 { /*63*/ "Service or option not available",
143 "Dienst oder Merkmal nicht verf." },
146 { /*65*/ "Bearer capability not implement.",
147 "Verb.eigenschaft nicht unterstue." },
148 { /*66*/ "Channel type not implemented",
149 "Kanalart nicht unterstuetzt" },
154 { /*69*/ "Requested facility not implement.",
155 "Funktion nicht unterstuetzt" },
156 { /*70*/ "restricted digital informat. only",
157 "Nur eingeschraenkte digitale inf." },
174 { /*79*/ "Service or option not implemented",
175 "Dienst oder Merkmal n. unterstue." },
178 { /*81*/ "Invalid call reference value",
179 "Falsche call reference" },
180 { /*82*/ "Identified channel does not exist",
181 "Erkannter Kanal existiert nicht" },
182 { /*83*/ "No suspended call with this id",
183 "Kein geparktes Gespr. f. diese ID" },
184 { /*84*/ "Call identity in use",
186 { /*85*/ "No call suspended",
187 "Kein geparktes Gespraech" },
188 { /*86*/ "Suspended call has been cleared",
189 "Geparktes Gespraech wurde beendet" },
190 { /*87*/ "User not member of CUG",
191 "Teilnehmer nicht in der CUG" },
192 { /*88*/ "Incompatibel destination",
193 "Gegenstelle nicht kompatibel" },
196 { /*90*/ "Non-existent CUG",
197 "CUG existiert nicht" },
198 { /*91*/ "Invalid transit network selection",
199 "Falscher Carrier-Code" },
206 { /*95*/ "Invalid message, unspecified",
207 "Fehlerhafte Daten, unbekannt" },
208 { /*96*/ "Information element missing",
209 "Information wird vermisst" },
210 { /*97*/ "Message type non-existent",
211 "Message exisitiert nicht" },
212 { /*98*/ "Message not compatible with state",
213 "Message nicht komatibel" },
214 { /*99*/ "Information element not impl.",
215 "Information nicht implementiert" },
216 { /*100*/ "Invalid info element contents",
217 "Fehlerhafterhafte Information" },
218 { /*101*/ "Message not compatible with state",
219 "Message not kompatibel" },
220 { /*102*/ "Recovery on timer expiry",
221 "Fehler durch Zeitueberschreitung" },
222 { /*103*/ "Parameter non-existent",
238 { /*111*/ "Protocol error, unspecified",
239 "Protokollfehler, unbekannt" },
270 { /*127*/ "Interworking, unspecified",
271 "Zusammenspiel, unbekannt" },
274 struct isdn_cause isdn_cause_class[8] = {
275 /********************************* - **/ /*38*/
276 { /*0*/ "(Normal class)",
277 "(Normale Fehlerklasse)" },
278 { /*16*/ "(Normal class)",
279 "(Normale Fehlerklasse)" },
280 { /*32*/ "(Resource unavailable class)",
281 "(Ressourcen nicht verfuegbar)" },
282 { /*48*/ "(Service or option unavailable)",
283 "(Dienst oder Merkmal n. verfueg.)" },
284 { /*64*/ "(Service or option n.implemented)",
285 "(Dienst oder Merkmal n. vorhand.)" },
286 { /*80*/ "(Invalid message class)",
287 "(Fehlerhafte Message)" },
288 { /*96*/ "(Protocol error class)",
289 "(Klasse der Protokollfehler)" },
290 { /*112*/ "(Interworking class)",
291 "(Klasse des Zusammenspiels)" },
294 struct isdn_location isdn_location[16] = {
297 { /*1*/ "Private (Local)",
299 { /*2*/ "Public (Local)",
300 "Vermittlung (Lokal)" },
302 "Knotenvermittlung" },
303 { /*4*/ "Public (Remote)",
304 "Vermittlung (Gegenstelle)" },
305 { /*5*/ "Private (Remote)",
306 "Anlage (Gegenstelle)" },
309 { /*7*/ "International",
315 { /*10*/ "Beyond Interworking",
316 "Nicht verfuegbar" },
329 char *get_isdn_cause(int cause, int location, int type)
331 static char result[128];
334 if (cause<0 || cause>127)
339 case DISPLAY_CAUSE_NUMBER:
340 SPRINT(result, "Cause %d", cause);
343 case DISPLAY_CAUSE_ENGLISH:
344 if (isdn_cause[cause].english[0])
345 SPRINT(result, "%d - %s", cause, isdn_cause[cause].english);
346 else SPRINT(result, "%d - %s", cause, isdn_cause_class[cause>>4].english);
349 case DISPLAY_CAUSE_GERMAN:
350 if (isdn_cause[cause].german[0])
351 SPRINT(result, "%d - %s", cause, isdn_cause[cause].german);
352 else SPRINT(result, "%d - %s", cause, isdn_cause_class[cause>>4].german);
355 case DISPLAY_LOCATION_ENGLISH:
356 if (isdn_location[location].english[0])
357 SPRINT(result, "%d - %s", cause, isdn_location[location].english);
358 else SPRINT(result, "%d - Location code %d", cause, location);
361 case DISPLAY_LOCATION_GERMAN:
362 if (isdn_location[location].german[0])
363 SPRINT(result, "%d - %s", cause, isdn_location[location].german);
364 else SPRINT(result, "%d - Lokationscode %d", cause, location);
375 * collect cause for multipoint
376 * used by Process, Endpoint and Join instance when multiplexing
378 void collect_cause(int *multicause, int *multilocation, int newcause, int newlocation)
380 if (newcause == CAUSE_REJECTED) /* call rejected */
382 *multicause = newcause;
383 *multilocation = newlocation;
385 if (newcause==CAUSE_NORMAL && *multicause!=CAUSE_REJECTED) /* reject via hangup */
387 *multicause = newcause;
388 *multilocation = newlocation;
390 if (newcause==CAUSE_BUSY && *multicause!=CAUSE_REJECTED && *multicause!=CAUSE_NORMAL) /* busy */
392 *multicause = newcause;
393 *multilocation = newlocation;
395 if (newcause==CAUSE_OUTOFORDER && *multicause!=CAUSE_BUSY && *multicause!=CAUSE_REJECTED && *multicause!=CAUSE_NORMAL) /* no L1 */
397 *multicause = newcause;
398 *multilocation = newlocation;
400 if (newcause!=CAUSE_NOUSER && *multicause!=CAUSE_OUTOFORDER && *multicause!=CAUSE_BUSY && *multicause!=CAUSE_REJECTED && *multicause!=CAUSE_NORMAL) /* anything but not 18 */
402 *multicause = newcause;
403 *multilocation = newlocation;
405 if (newcause==CAUSE_NOUSER && *multicause==CAUSE_NOUSER) /* cause 18, use the location */
407 *multilocation = newlocation;
409 if (*multicause==0) /* no cause yet, use newcause (should be 18) */
411 *multicause = newcause;
412 *multilocation = newlocation;