fixes
[lcr.git] / admin.h
diff --git a/admin.h b/admin.h
index 40a0cb8..a34820d 100644 (file)
--- a/admin.h
+++ b/admin.h
@@ -1,6 +1,6 @@
 /*****************************************************************************\
 **                                                                           **
-** PBX4Linux                                                                 **
+** Linux Call Router                                                         **
 **                                                                           **
 **---------------------------------------------------------------------------**
 ** Copyright: Andreas Eversberg                                              **
@@ -26,10 +26,11 @@ enum { /* messages */
        ADMIN_RESPONSE_CMD_BLOCK,
        ADMIN_REQUEST_STATE,
        ADMIN_RESPONSE_STATE,
+       ADMIN_RESPONSE_S_REMOTE,
        ADMIN_RESPONSE_S_INTERFACE,
        ADMIN_RESPONSE_S_PORT,
        ADMIN_RESPONSE_S_EPOINT,
-       ADMIN_RESPONSE_S_CALL,
+       ADMIN_RESPONSE_S_JOIN,
        ADMIN_CALL_SETUP,
        ADMIN_CALL_SETUP_ACK,
        ADMIN_CALL_PROCEEDING,
@@ -55,7 +56,8 @@ struct admin_response_state {
        struct tm       tm;
        char            logfile[128];
        int             interfaces;
-       int             calls;
+       int             remotes;
+       int             joins;
        int             epoints;
        int             ports;
 };
@@ -72,20 +74,25 @@ struct admin_response_interface {
        int             l1link; /* down(0) or up(1) */
        int             l2link; /* down(0) or up(1) */
        int             channels;
-       int             busy[256]; /* if port is idle(0) busy(1) */
+       char            busy[256]; /* if port is idle(0) busy(1) */
        unsigned long   port[256]; /* current port */
 };
 
-struct admin_response_call {
-       unsigned long   serial; /* call serial number */
+struct admin_response_remote {
+       char            name[32]; /* name of remote application */
+};
+
+struct admin_response_join {
+       unsigned long   serial; /* join serial number */
+       char            remote[32]; /* remote application name */
        unsigned long   partyline;
 };
 
 struct admin_response_epoint {
        unsigned long   serial;
-       unsigned long   call; /* link to call */
-//     int             call_notify; /* if relation notified on hold */
-//     int             call_hold; /* if relation on hold */
+       unsigned long   join; /* link to join */
+//     int             join_notify; /* if relation notified on hold */
+//     int             join_hold; /* if relation on hold */
        int             rx_state;
        int             tx_state;
        int             state;
@@ -127,8 +134,7 @@ struct admin_call {
 
 struct admin_trace_req {
        int             detail;
-       char            category[4];
-       char            name[64];
+       char            category;
        int             port;
        char            interface[64];
        char            caller[34];
@@ -136,14 +142,14 @@ struct admin_trace_req {
 };
 
 struct admin_trace_rsp {
-       char            text[512];
+       char            text[1024];
 };
 
-//struct admin_msg {
-//     int             type; /* type of message */
-//     unsigned long   ref; /* reference to individual endpoints */
-//     union parameter param; /* parameter union */
-//};
+struct admin_msg {
+       int             type; /* type of message */
+       unsigned long   ref; /* reference to individual endpoints */
+       union parameter param; /* parameter union */
+};
 
 struct admin_message {
        int message; /* type of admin message */
@@ -153,9 +159,10 @@ struct admin_message {
                struct admin_response_interface i;
                struct admin_response_port      p;
                struct admin_response_epoint    e;
-               struct admin_response_call      c;
+               struct admin_response_join      j;
+               struct admin_response_remote    r;
                struct admin_call               call;
-//             struct admin_msg                msg;
+               struct admin_msg                msg;
                struct admin_trace_req          trace_req;
                struct admin_trace_rsp          trace_rsp;
        } u;