1 /*****************************************************************************\
5 **---------------------------------------------------------------------------**
6 ** Copyright: Andreas Eversberg **
8 ** Administration tool header file **
10 \*****************************************************************************/
12 #define SOCKET_NAME "/var/run/PBX4Linux.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,
27 ADMIN_RESPONSE_S_INTERFACE,
28 ADMIN_RESPONSE_S_PORT,
29 ADMIN_RESPONSE_S_EPOINT,
30 ADMIN_RESPONSE_S_CALL,
33 ADMIN_CALL_PROCEEDING,
36 ADMIN_CALL_DISCONNECT,
42 struct admin_response_cmd {
43 int error; /* error code 0 = ok*/
44 char message[256]; /* info / response text */
47 struct admin_response_state {
48 char version_string[64];
57 struct admin_response_interface {
59 char interface_name[32];
64 int use; /* number of ports that use this interface */
65 int l1link; /* down(0) or up(1) */
66 int l2link; /* down(0) or up(1) */
68 int busy[256]; /* if port is idle(0) busy(1) */
69 unsigned long port[256]; /* current port */
72 struct admin_response_call {
73 unsigned long serial; /* call serial number */
74 unsigned long partyline;
77 struct admin_response_epoint {
79 unsigned long call; /* link to call */
80 // int call_notify; /* if relation notified on hold */
81 // int call_hold; /* if relation on hold */
89 int park; /* if parked */
91 unsigned char park_callid[8];
92 int crypt; /* crypt state */
95 struct admin_response_port {
96 unsigned long serial; /* port serial number */
97 char name[64]; /* name of port */
98 unsigned long epoint; /* link to epoint */
100 int isdn; /* if port is isdn */
101 int isdn_chan; /* bchannel number */
102 int isdn_hold; /* on hold */
103 int isdn_ces; /* ces to use (>=0)*/
107 char interface[64]; /* name of port */
108 char callerid[64]; /* use caller id */
109 char dialing[64]; /* number to dial */
110 int present; /* presentation */
111 int cause; /* cause to send */
121 struct admin_message {
122 int type; /* type of message */
123 unsigned long ref; /* reference to individual endpoints */
124 union parameter param; /* parameter union */
127 struct admin_message {
128 int message; /* type of admin message */
130 struct admin_response_cmd x;
131 struct admin_response_state s;
132 struct admin_response_interface i;
133 struct admin_response_port p;
134 struct admin_response_epoint e;
135 struct admin_response_call c;
136 struct admin_call call;
137 struct admin_message message;
144 ADMIN_STATE_IN_SETUP,
145 ADMIN_STATE_OUT_SETUP,
146 ADMIN_STATE_IN_OVERLAP,
147 ADMIN_STATE_OUT_OVERLAP,
148 ADMIN_STATE_IN_PROCEEDING,
149 ADMIN_STATE_OUT_PROCEEDING,
150 ADMIN_STATE_IN_ALERTING,
151 ADMIN_STATE_OUT_ALERTING,
153 ADMIN_STATE_IN_DISCONNECT,
154 ADMIN_STATE_OUT_DISCONNECT,