2008-01-19 17:10:46 +00:00
|
|
|
/*****************************************************************************\
|
|
|
|
** **
|
|
|
|
** Linux Call Router **
|
|
|
|
** **
|
|
|
|
**---------------------------------------------------------------------------**
|
|
|
|
** Copyright: Andreas Eversberg **
|
|
|
|
** **
|
|
|
|
** mISDN channel handlin for remote application **
|
|
|
|
** **
|
|
|
|
\*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
struct bchannel {
|
|
|
|
struct bchannel *next;
|
2008-05-01 18:07:02 +00:00
|
|
|
struct chan_call *call; /* link to call process */
|
2008-01-19 17:10:46 +00:00
|
|
|
unsigned long handle; /* handle for stack id */
|
|
|
|
int b_sock; /* socket for b-channel */
|
|
|
|
int b_state;
|
|
|
|
int b_txdata;
|
|
|
|
int b_delay;
|
|
|
|
int b_tx_dejitter;
|
|
|
|
int b_tx_gain, b_rx_gain;
|
|
|
|
char b_pipeline[256];
|
|
|
|
unsigned long b_conf;
|
|
|
|
int b_echo;
|
|
|
|
int b_tone;
|
|
|
|
int b_rxoff;
|
|
|
|
// int b_txmix;
|
|
|
|
int b_dtmf;
|
|
|
|
int b_crypt_len;
|
|
|
|
int b_crypt_type;
|
|
|
|
unsigned char b_crypt_key[128];
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
extern struct bchannel *bchannel_first;
|
2008-05-19 17:39:39 +00:00
|
|
|
extern pid_t bchannel_pid;
|
2008-01-19 17:10:46 +00:00
|
|
|
|
|
|
|
int bchannel_initialize(void);
|
|
|
|
void bchannel_deinitialize(void);
|
|
|
|
int bchannel_create(struct bchannel *channel);
|
|
|
|
void bchannel_activate(struct bchannel *channel, int activate);
|
|
|
|
void bchannel_transmit(struct bchannel *channel, unsigned char *data, int len);
|
|
|
|
void bchannel_join(struct bchannel *channel, unsigned short id);
|
2008-06-06 13:18:59 +00:00
|
|
|
void bchannel_dtmf(struct bchannel *channel, int on);
|
2008-01-19 17:10:46 +00:00
|
|
|
int bchannel_handle(void);
|
|
|
|
struct bchannel *find_bchannel_handle(unsigned long handle);
|
2008-05-01 18:07:02 +00:00
|
|
|
//struct bchannel *find_bchannel_ref(unsigned long ref);
|
2008-01-19 17:10:46 +00:00
|
|
|
struct bchannel *alloc_bchannel(unsigned long handle);
|
|
|
|
void free_bchannel(struct bchannel *channel);
|
|
|
|
|