1 /*****************************************************************************\
3 ** Linux Call Router **
5 **---------------------------------------------------------------------------**
6 ** Copyright: Andreas Eversberg **
8 ** Asterisk socket client header **
10 \*****************************************************************************/
12 /* structure for all calls */
14 struct chan_call *next; /* link to next call instance */
15 int state; /* current call state CHAN_LCR_STATE */
16 unsigned long ref; /* callref for this channel */
17 struct ast_channel *ast; /* current asterisk channel */
18 unsigned long bchannel_handle;
19 /* reference to bchannel, if set */
20 unsigned short bridge_id; /* 0 = off, equal ids are bridged */
24 CHAN_LCR_STATE_IN_PREPARE = 0,
25 CHAN_LCR_STATE_IN_SETUP,
26 CHAN_LCR_STATE_IN_DIALING,
27 CHAN_LCR_STATE_IN_PROCEEDING,
28 CHAN_LCR_STATE_IN_ALERTING,
29 CHAN_LCR_STATE_OUT_PREPARE,
30 CHAN_LCR_STATE_OUT_SETUP,
31 CHAN_LCR_STATE_OUT_DIALING,
32 CHAN_LCR_STATE_OUT_PROCEEDING,
33 CHAN_LCR_STATE_OUT_ALERTING,
34 CHAN_LCR_STATE_CONNECT,
35 CHAN_LCR_STATE_IN_DISCONNECT,
36 CHAN_LCR_STATE_OUT_DISCONNECT,
37 CHAN_LCR_STATE_RELEASE,
40 #define CHAN_LCR_STATE static const struct chan_lcr_state { \
43 } chan_lcr_state[] = { \
45 "New call from ISDN is waiting for setup." }, \
47 "Call from ISDN is currently set up." }, \
49 "Call from ISDN is currently waiting for digits to be dialed." }, \
51 "Call from ISDN is complete and proceeds to ring." }, \
53 "Call from ISDN is ringing." }, \
55 "New call to ISDN is wating for setup." }, \
57 "Call to ISDN is currently set up." }, \
59 "Call to ISDN is currently waiting for digits to be dialed." }, \
61 "Call to ISDN is complete and proceeds to ring." }, \
63 "Call to ISDN is ringing." }, \
65 "Call has been answered." }, \
67 "Call has been hung up on ISDN side." }, \
69 "Call has been hung up on Asterisk side." }, \
71 "Call is waiting for complete release." }, \