1 /*****************************************************************************\
5 **---------------------------------------------------------------------------**
6 ** Copyright: Andreas Eversberg **
8 ** interface header file **
10 \*****************************************************************************/
11 enum { /* interface type */
16 /* channel selection -1 is reserved for "no ie" */
18 #define CHANNEL_ANY -3
19 #define CHANNEL_FREE -100
22 enum { HUNT_LINEAR = 0,
32 enum { IS_DEFAULT = 0,
37 struct select_channel {
38 struct select_channel *next;
42 struct interface_port {
43 struct interface_port *next;
44 struct interface *interface; /* link to interface */
45 struct mISDNport *mISDNport; /* link to port */
46 int portnum; /* port number */
47 char portname[64]; /* alternately: port name */
48 int ptp; /* force load stack in PTP mode */
49 int ptmp; /* force load stack in PTP mode */
50 int nt; /* load stack in NT-mode */
51 int tespecial; /* special TE-mode behavior */
52 int l1hold; /* hold layer 1 (1=on, 0=off) */
53 int l2hold; /* hold layer 2 (1=force, -1=disable, 0=default) */
55 int gsm_bs; /* interface is an GSM BS interface */
58 int gsm_ms; /* interface is an GSM MS interface */
59 char gsm_ms_name[32]; /* name of ms */
60 char gsm_ms_socket[128]; /* layer1 socket name */
61 char gsm_ms_service; /* see GSM_SERVICE_* */
63 unsigned int ss5; /* set, if SS5 signalling enabled, also holds feature bits */
64 int remote; /* interface is a remote app interface */
65 char remote_app[32]; /* name of remote application */
66 int channel_force; /* forces channel by protocol */
67 int nodtmf; /* disables DTMF */
68 struct select_channel *out_channel; /* list of channels to select */
69 struct select_channel *in_channel; /* the same for incoming channels */
70 int block; /* set if interface is blocked */
78 int dialmax; /* maximum number of digits to dial */
80 int nonotify; /* blocks outgoing notify messages */
83 struct interface_msn {
84 struct interface_msn *next;
85 char msn[64]; /* msn */
88 struct interface_screen {
89 struct interface_screen *next;
90 char match[64]; /* what caller id to match */
91 int match_type; /* number type */
92 int match_present; /* presentation type */
93 char result[64]; /* what caller id to change to */
94 int result_type; /* number type */
95 int result_present; /* presentation type */
99 struct interface *next;
100 char name[64]; /* name of interface */
101 int external; /* interface used for external calls */
102 int extension; /* calls are handled as extension */
103 int is_tones; /* generate tones */
104 int is_earlyb; /* bridge tones during call setup */
105 int hunt; /* select algorithm */
106 int hunt_next; /* ifport index to start hunt */
107 struct interface_port *ifport; /* link to interface port list */
108 struct interface_msn *ifmsn; /* link to interface msn list */
109 struct interface_screen *ifscreen_in; /* link to screening list */
110 struct interface_screen *ifscreen_out; /* link to screening list */
111 int tx_gain, rx_gain; /* filter gain */
112 char pipeline[256]; /* filter pipeline */
113 unsigned char bf_key[56]; /* filter blowfish */
114 int bf_len; /* filter length of blowfish */
117 struct interface_param {
119 /* return value (pointer of function)(args ...) */
120 int (*func)(struct interface *, char *, int, char *, char*);
126 extern struct interface *interface_first;
127 extern struct interface *interface_newlist;
129 extern char interface_error[256];
130 struct interface *read_interfaces(void);
131 void free_interfaces(struct interface *interface_start);
132 void relink_interfaces(void);
133 void load_port(struct interface_port *ifport);
134 void doc_interface(void);
135 void do_screen(int out, char *id, int idsize, int *type, int *present, struct interface *interface);