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 */
25 CHAN_LCR_STATE_IN_PREPARE = 0,
26 CHAN_LCR_STATE_IN_SETUP,
27 CHAN_LCR_STATE_IN_DIALING,
28 CHAN_LCR_STATE_IN_PROCEEDING,
29 CHAN_LCR_STATE_IN_ALERTING,
30 CHAN_LCR_STATE_OUT_PREPARE,
31 CHAN_LCR_STATE_OUT_SETUP,
32 CHAN_LCR_STATE_OUT_DIALING,
33 CHAN_LCR_STATE_OUT_PROCEEDING,
34 CHAN_LCR_STATE_OUT_ALERTING,
35 CHAN_LCR_STATE_CONNECT,
36 CHAN_LCR_STATE_IN_DISCONNECT,
37 CHAN_LCR_STATE_OUT_DISCONNECT,
38 CHAN_LCR_STATE_RELEASE,
41 #define CHAN_LCR_STATE static const struct chan_lcr_state { \
44 } chan_lcr_state[] = { \
46 "New call from ISDN is waiting for setup." }, \
48 "Call from ISDN is currently set up." }, \
50 "Call from ISDN is currently waiting for digits to be dialed." }, \
52 "Call from ISDN is complete and proceeds to ring." }, \
54 "Call from ISDN is ringing." }, \
56 "New call to ISDN is wating for setup." }, \
58 "Call to ISDN is currently set up." }, \
60 "Call to ISDN is currently waiting for digits to be dialed." }, \
62 "Call to ISDN is complete and proceeds to ring." }, \
64 "Call to ISDN is ringing." }, \
66 "Call has been answered." }, \
68 "Call has been hung up on ISDN side." }, \
70 "Call has been hung up on Asterisk side." }, \
72 "Call is waiting for complete release." }, \