1 /*****************************************************************************\
3 ** Linux Call Router **
5 **---------------------------------------------------------------------------**
6 ** Copyright: Andreas Eversberg **
8 ** Asterisk socket client header **
10 \*****************************************************************************/
12 /* structure for all calls */
15 struct chan_call *next; /* link to next call instance */
16 int state; /* current call state CHAN_LCR_STATE */
17 unsigned long ref; /* callref for this channel */
18 struct ast_channel *ast; /* current asterisk channel */
19 struct bchannel *channel;
20 /* reference to bchannel, if set */
22 /* store cause from lcr */
23 unsigned char dialque[64];
24 /* queue dialing prior setup ack */
25 struct connect_info connectinfo;
26 /* store connectinfo form lcr */
30 CHAN_LCR_STATE_IN_PREPARE = 0,
31 CHAN_LCR_STATE_IN_SETUP,
32 CHAN_LCR_STATE_IN_DIALING,
33 CHAN_LCR_STATE_IN_PROCEEDING,
34 CHAN_LCR_STATE_IN_ALERTING,
35 CHAN_LCR_STATE_OUT_PREPARE,
36 CHAN_LCR_STATE_OUT_SETUP,
37 CHAN_LCR_STATE_OUT_DIALING,
38 CHAN_LCR_STATE_OUT_PROCEEDING,
39 CHAN_LCR_STATE_OUT_ALERTING,
40 CHAN_LCR_STATE_CONNECT,
41 CHAN_LCR_STATE_IN_DISCONNECT,
42 CHAN_LCR_STATE_OUT_DISCONNECT,
43 CHAN_LCR_STATE_RELEASE,
46 #define CHAN_LCR_STATE static const struct chan_lcr_state { \
49 } chan_lcr_state[] = { \
51 "New call from ISDN is waiting for setup." }, \
53 "Call from ISDN is currently set up." }, \
55 "Call from ISDN is currently waiting for digits to be dialed." }, \
57 "Call from ISDN is complete and proceeds to ring." }, \
59 "Call from ISDN is ringing." }, \
61 "New call to ISDN is wating for setup." }, \
63 "Call to ISDN is currently set up." }, \
65 "Call to ISDN is currently waiting for digits to be dialed." }, \
67 "Call to ISDN is complete and proceeds to ring." }, \
69 "Call to ISDN is ringing." }, \
71 "Call has been answered." }, \
73 "Call has been hung up on ISDN side." }, \
75 "Call has been hung up on Asterisk side." }, \
77 "Call is waiting for complete release." }, \