1 /*****************************************************************************\
3 ** Linux Call Router **
5 **---------------------------------------------------------------------------**
6 ** Copyright: Andreas Eversberg **
8 ** Administration tool header file **
10 \*****************************************************************************/
12 #define SOCKET_NAME "%s/LCR.socket"
14 /* structures that define message between admin-tool and pbx */
17 ADMIN_REQUEST_CMD_INTERFACE,
18 ADMIN_RESPONSE_CMD_INTERFACE,
19 ADMIN_REQUEST_CMD_ROUTE,
20 ADMIN_RESPONSE_CMD_ROUTE,
21 ADMIN_REQUEST_CMD_DIAL,
22 ADMIN_RESPONSE_CMD_DIAL,
23 ADMIN_REQUEST_CMD_RELEASE,
24 ADMIN_RESPONSE_CMD_RELEASE,
25 ADMIN_REQUEST_CMD_BLOCK,
26 ADMIN_RESPONSE_CMD_BLOCK,
29 ADMIN_RESPONSE_S_REMOTE,
30 ADMIN_RESPONSE_S_INTERFACE,
31 ADMIN_RESPONSE_S_PORT,
32 ADMIN_RESPONSE_S_EPOINT,
33 ADMIN_RESPONSE_S_JOIN,
36 ADMIN_CALL_PROCEEDING,
39 ADMIN_CALL_DISCONNECT,
48 struct admin_response_cmd {
49 int error; /* error code 0 = ok*/
50 char message[256]; /* info / response text */
55 struct admin_response_state {
56 char version_string[64];
66 struct admin_response_interface {
67 char interface_name[32];
77 int use; /* number of ports that use this interface */
78 int l1link; /* down(0) or up(1) */
79 int l2link; /* down(0) or up(1) */
80 unsigned char l2mask[16]; /* one bit for each tei */
81 int los, ais, rdi, slip_tx, slip_rx;
83 char busy[256]; /* if port is idle(0) busy(1) */
84 unsigned int port[256]; /* current port */
86 char out_channel[256];
90 struct admin_response_remote {
91 char name[32]; /* name of remote application */
94 struct admin_response_join {
95 unsigned int serial; /* join serial number */
96 char remote[32]; /* remote application name */
97 unsigned int partyline;
100 struct admin_response_epoint {
102 unsigned int join; /* link to join */
103 // int join_notify; /* if relation notified on hold */
104 // int join_hold; /* if relation on hold */
112 int park; /* if parked */
114 unsigned char park_callid[8];
115 int crypt; /* crypt state */
118 struct admin_response_port {
119 unsigned int serial; /* port serial number */
120 char name[64]; /* name of port */
121 unsigned int epoint; /* link to epoint */
123 int isdn; /* if port is isdn */
124 int isdn_chan; /* bchannel number */
125 int isdn_hold; /* on hold */
126 int isdn_ces; /* ces to use (>=0)*/
130 char interface[64]; /* name of port */
131 char callerid[64]; /* use caller id */
132 char dialing[64]; /* number to dial */
133 int present; /* presentation */
134 int cause; /* cause to send */
144 struct admin_trace_req {
153 struct admin_trace_rsp {
158 int type; /* type of message */
159 unsigned int ref; /* reference to individual endpoints */
160 union parameter param; /* parameter union */
163 struct admin_message {
164 int message; /* type of admin message */
166 struct admin_response_cmd x;
167 struct admin_response_state s;
168 struct admin_response_interface i;
169 struct admin_response_port p;
170 struct admin_response_epoint e;
171 struct admin_response_join j;
172 struct admin_response_remote r;
173 struct admin_call call;
174 struct admin_msg msg;
175 struct admin_trace_req trace_req;
176 struct admin_trace_rsp trace_rsp;
183 ADMIN_STATE_IN_SETUP,
184 ADMIN_STATE_OUT_SETUP,
185 ADMIN_STATE_IN_OVERLAP,
186 ADMIN_STATE_OUT_OVERLAP,
187 ADMIN_STATE_IN_PROCEEDING,
188 ADMIN_STATE_OUT_PROCEEDING,
189 ADMIN_STATE_IN_ALERTING,
190 ADMIN_STATE_OUT_ALERTING,
192 ADMIN_STATE_IN_DISCONNECT,
193 ADMIN_STATE_OUT_DISCONNECT,