Use of EC on transit connections
This commit is contained in:
parent
10df6415d3
commit
32619ad1aa
17
chan_capi.c
17
chan_capi.c
|
@ -2036,9 +2036,13 @@ static int capi_bridge(int start, struct capi_pvt *i0, struct capi_pvt *i1, int
|
|||
|
||||
if (!(flags & AST_BRIDGE_DTMF_CHANNEL_1))
|
||||
capi_detect_dtmf(i1, 0);
|
||||
|
||||
capi_echo_canceller(i0, EC_FUNCTION_DISABLE);
|
||||
capi_echo_canceller(i1, EC_FUNCTION_DISABLE);
|
||||
|
||||
if ((capi_controllers[i0->controller]->ecOnTransit & EC_ECHOCANCEL_TRANSIT_A) == 0) {
|
||||
capi_echo_canceller(i0, EC_FUNCTION_DISABLE);
|
||||
}
|
||||
if ((capi_controllers[i1->controller]->ecOnTransit & EC_ECHOCANCEL_TRANSIT_B) == 0) {
|
||||
capi_echo_canceller(i1, EC_FUNCTION_DISABLE);
|
||||
}
|
||||
cc_verbose(4, 1, VERBOSE_PREFIX_3 "%s/%s: activating bridge.\n",
|
||||
i0->vname, i1->vname);
|
||||
ret = line_interconnect(i0, i1, 1);
|
||||
|
@ -7326,6 +7330,7 @@ int mkif(struct cc_capi_conf *conf)
|
|||
|
||||
capi_controllers[unit]->used = 1;
|
||||
capi_controllers[unit]->ecPath = conf->echocancelpath;
|
||||
capi_controllers[unit]->ecOnTransit = conf->econtransitconn;
|
||||
|
||||
tmp->controller = unit;
|
||||
tmp->doEC = conf->echocancel;
|
||||
|
@ -8266,6 +8271,12 @@ static int conf_interface(struct cc_capi_conf *conf, struct ast_variable *v)
|
|||
if (conf->echocancelpath == 0)
|
||||
conf->echocancelpath = EC_ECHOCANCEL_PATH_BITS;
|
||||
}
|
||||
if (!strcasecmp(v->name, "econtransitconn")) {
|
||||
conf->econtransitconn = atoi(v->value);
|
||||
conf->econtransitconn &= EC_ECHOCANCEL_TRANSIT_BITS;
|
||||
if (conf->econtransitconn == 0)
|
||||
conf->econtransitconn = EC_ECHOCANCEL_TRANSIT_AB;
|
||||
}
|
||||
|
||||
if (!strcasecmp(v->name, "echotail")) {
|
||||
conf->ectail = atoi(v->value);
|
||||
|
|
12
chan_capi.h
12
chan_capi.h
|
@ -227,6 +227,16 @@ typedef struct fax3proto3 B3_PROTO_FAXG3;
|
|||
#define EC_ECHOCANCEL_PATH_IP 2 /* Activate EC for IP */
|
||||
#define EC_ECHOCANCEL_PATH_BITS (EC_ECHOCANCEL_PATH_IFC | EC_ECHOCANCEL_PATH_IP)
|
||||
|
||||
/*
|
||||
Control EC on transit connectionss
|
||||
*/
|
||||
#define EC_ECHOCANCEL_TRANSIT_OFF 0 /* EC deactivated on transit connection, default */
|
||||
#define EC_ECHOCANCEL_TRANSIT_A 1 /* EC activated on side A of transsit connection */
|
||||
#define EC_ECHOCANCEL_TRANSIT_B 2 /* EC activated on side B of transsit connection */
|
||||
#define EC_ECHOCANCEL_TRANSIT_AB (EC_ECHOCANCEL_TRANSIT_A | EC_ECHOCANCEL_TRANSIT_B)
|
||||
#define EC_ECHOCANCEL_TRANSIT_BITS (EC_ECHOCANCEL_TRANSIT_A | EC_ECHOCANCEL_TRANSIT_B)
|
||||
|
||||
|
||||
#define CC_HOLDTYPE_LOCAL 0
|
||||
#define CC_HOLDTYPE_HOLD 1
|
||||
#define CC_HOLDTYPE_NOTIFY 2
|
||||
|
@ -608,6 +618,7 @@ struct cc_capi_conf {
|
|||
char mohinterpret[MAX_MUSICCLASS];
|
||||
#endif
|
||||
int echocancelpath;
|
||||
int econtransitconn;
|
||||
};
|
||||
|
||||
struct cc_capi_controller {
|
||||
|
@ -642,6 +653,7 @@ struct cc_capi_controller {
|
|||
|
||||
int divaExtendedFeaturesAvailable;
|
||||
int ecPath;
|
||||
int ecOnTransit;
|
||||
int fax_t30_extended;
|
||||
#ifdef DIVA_STREAMING
|
||||
int divaStreaming;
|
||||
|
|
Loading…
Reference in New Issue