lcr work (soon done :)
[lcr.git] / chan_lcr.h
index f1842c6..2388800 100644 (file)
 \*****************************************************************************/
 
 /* structure for all calls */
+struct bchannel;
 struct chan_call {
        struct chan_call        *next;  /* link to next call instance */
        int                     state;  /* current call state CHAN_LCR_STATE */
        unsigned long           ref;    /* callref for this channel */
-       struct ast_channel      *ast;   /* current asterisk channel */
-       unsigned long           bchannel_handle;
+       void                    *ast;   /* current asterisk channel */
+       int                     pbx_started;
+                                       /* indicates if pbx que is available */
+       struct bchannel         *bchannel;
                                        /* reference to bchannel, if set */
-       unsigned short bridge_id; /* 0 = off, equal ids are bridged */
-
-       struct ast_channel *ast;
+       int                     cause, location;
+                                       /* store cause from lcr */
+       unsigned char           dialque[64];
+                                       /* queue dialing prior setup ack */
+       struct connect_info     connectinfo;
+                                       /* store connectinfo form lcr */
+       int                     bridge_id;
+                                       /* current ID or 0 */
+       struct chan_call        *bridge_call;
+                                       /* remote instance or NULL */
+       int                     pipe[2];
+                                       /* pipe for receive data */
 };
 
 enum {
@@ -40,8 +52,8 @@ enum {
 };
 
 #define CHAN_LCR_STATE static const struct chan_lcr_state { \
-       char name, \
-       char meaning, \
+       char *name; \
+       char *meaning; \
 } chan_lcr_state[] = { \
        { "IN_PREPARE", \
          "New call from ISDN is waiting for setup." }, \
@@ -74,3 +86,7 @@ enum {
 };
 
 
+#define CERROR(call, ast, arg...) chan_lcr_log(LOG_ERROR, call, ast, ##arg)
+#define CDEBUG(call, ast, arg...) chan_lcr_log(LOG_DEBUG, call, ast, ##arg)
+void chan_lcr_log(int type, struct chan_call *call, struct ast_channel *ast, const char *fmt, ...);
+