- Make capicommand(echocancel) setting non-permanent.

Setting is restored after hangup.
This commit is contained in:
MelwareDE 2006-11-25 16:13:40 +00:00
parent 4914a97d30
commit f33a143924
3 changed files with 5 additions and 1 deletions

3
README
View File

@ -145,7 +145,8 @@ Enable/Disable echosquelch:
Enable/Disable echocancel:
Enable or disable echo-cancel provided by CAPI driver/hardware.
You may need to disable echo-cancel when e.g. data/fax transmission handled
by non-CAPI application.
by non-CAPI application. After hangup, this setting is restored to value
set in capi.conf.
Example:
exten => s,1,capicommand(echocancel|yes)
or

View File

@ -1112,6 +1112,7 @@ static void interface_cleanup(struct capi_pvt *i)
i->MessageNumber = 0;
i->NCCI = 0;
i->onholdPLCI = 0;
i->doEC = i->doEC_global;
memset(i->cid, 0, sizeof(i->cid));
memset(i->dnid, 0, sizeof(i->dnid));
@ -5001,6 +5002,7 @@ int mkif(struct cc_capi_conf *conf)
tmp->controller = unit;
capi_used_controllers |= (1 << unit);
tmp->doEC = conf->echocancel;
tmp->doEC_global = conf->echocancel;
tmp->ecOption = conf->ecoption;
if (conf->ecnlp) tmp->ecOption |= 0x01; /* bit 0 of ec-option is NLP */
tmp->ecTail = conf->ectail;

View File

@ -314,6 +314,7 @@ struct capi_pvt {
int doDTMF;
/* CAPI echo cancellation */
int doEC;
int doEC_global;
int ecOption;
int ecTail;
int ecSelector;