Add essential option to enable and prefer half rate calls to mobile
[lcr.git] / cause.h
1 /*****************************************************************************\
2 **                                                                           **
3 ** PBX4Linux                                                                 **
4 **                                                                           **
5 **---------------------------------------------------------------------------**
6 ** Copyright: Andreas Eversberg                                              **
7 **                                                                           **
8 ** cause header file                                                         **
9 **                                                                           **
10 \*****************************************************************************/ 
11
12 /* location (equivalent to the q.850 coding) */
13 #define LOCATION_USER           0
14 #define LOCATION_PRIVATE_LOCAL  1
15 #define LOCATION_PUBLIC_LOCAL   2
16 #define LOCATION_TRANSIT        3
17 #define LOCATION_PUBLIC_REMOTE  4
18 #define LOCATION_PRIVATE_REMOTE 5
19 #define LOCATION_INTERNATIONAL  7
20 #define LOCATION_BEYOND         10
21
22 /* some causes (equivalent to the q.850 coding) */
23 #define CAUSE_UNALLOCATED       1
24 #define CAUSE_NORMAL            16
25 #define CAUSE_BUSY              17
26 #define CAUSE_NOUSER            18
27 #define CAUSE_NOANSWER          19
28 #define CAUSE_REJECTED          21
29 #define CAUSE_NONSELECTED       26
30 #define CAUSE_OUTOFORDER        27
31 #define CAUSE_INVALID           28
32 #define CAUSE_FACILITYREJECTED  29
33 #define CAUSE_UNSPECIFIED       31
34 #define CAUSE_NOCHANNEL         34
35 #define CAUSE_TEMPOFAIL         41
36 #define CAUSE_RESSOURCEUNAVAIL  47
37 #define CAUSE_SERVICEUNAVAIL    63
38 #define CAUSE_UNIMPLEMENTED     79
39
40 struct isdn_cause {
41         const char *english;
42         const char *german;
43 };
44
45 struct isdn_location {
46         const char *english;
47         const char *german;
48 };
49
50 extern struct isdn_cause isdn_cause[128];
51 extern struct isdn_location isdn_location[16];
52 char *get_isdn_cause(int cause, int location, int type);
53 void collect_cause(int *multicause, int *multilocation, int newcause, int newlocation);