static float txgain = 0.0;
+static int tonezone = -1;
+
static int echocancel;
static int echotraining;
int firstradio; /* first radio flag */
float rxgain;
float txgain;
+ int tonezone; /* tone zone for this chan, or -1 for default */
struct zt_pvt *next; /* Next channel in list */
struct zt_pvt *prev; /* Prev channel in list */
tmp->pickupgroup=cur_pickupgroup;
tmp->rxgain = rxgain;
tmp->txgain = txgain;
+ tmp->tonezone = tonezone;
tmp->onhooktime = time(NULL);
if (tmp->subs[SUB_REAL].zfd > -1) {
set_actual_gain(tmp->subs[SUB_REAL].zfd, 0, tmp->rxgain, tmp->txgain, tmp->law);
/* Hang it up to be sure it's good */
zt_set_hook(tmp->subs[SUB_REAL].zfd, ZT_ONHOOK);
}
+ ioctl(tmp->subs[SUB_REAL].zfd,ZT_SETTONEZONE,&tmp->tonezone);
#ifdef ZAPATA_PRI
/* the dchannel is down so put the channel in alarm */
if (tmp->pri && tmp->pri->up == 0)
if (sscanf(v->value, "%f", &txgain) != 1) {
ast_log(LOG_WARNING, "Invalid txgain: %s\n", v->value);
}
+ } else if (!strcasecmp(v->name, "tonezone")) {
+ if (sscanf(v->value, "%d", &tonezone) != 1) {
+ ast_log(LOG_WARNING, "Invalid tonezone: %s\n", v->value);
+ }
} else if (!strcasecmp(v->name, "callerid")) {
if (!strcasecmp(v->value, "asreceived"))
strcpy(callerid,"");
transfer = 0;
rxgain = 0.0;
txgain = 0.0;
+ tonezone = -1;
firstdigittimeout = 16000;
gendigittimeout = 8000;
amaflags = 0;
if (sscanf(v->value, "%f", &txgain) != 1) {
ast_log(LOG_WARNING, "Invalid txgain: %s\n", v->value);
}
+ } else if (!strcasecmp(v->name, "tonezone")) {
+ if (sscanf(v->value, "%d", &tonezone) != 1) {
+ ast_log(LOG_WARNING, "Invalid tonezone: %s\n", v->value);
+ }
} else if (!strcasecmp(v->name, "callerid")) {
if (!strcasecmp(v->value, "asreceived"))
strcpy(callerid,"");