Rename very poorly named function to reflect what it actually does. This was causing quite a bit of confusion for me...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@110132 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
76248bd9e7
commit
2c4aac0399
|
@ -1513,7 +1513,7 @@ static struct ast_channel *mgcp_new(struct mgcp_subchannel *sub, int state)
|
|||
i->dsp = ast_dsp_new();
|
||||
ast_dsp_set_features(i->dsp,DSP_FEATURE_DTMF_DETECT);
|
||||
/* this is to prevent clipping of dtmf tones during dsp processing */
|
||||
ast_dsp_digitmode(i->dsp, DSP_DIGITMODE_NOQUELCH);
|
||||
ast_dsp_set_digitmode(i->dsp, DSP_DIGITMODE_NOQUELCH);
|
||||
} else {
|
||||
i->dsp = NULL;
|
||||
}
|
||||
|
|
|
@ -5319,7 +5319,7 @@ static struct ast_channel *sip_new(struct sip_pvt *i, int state, const char *tit
|
|||
i->vad = ast_dsp_new();
|
||||
ast_dsp_set_features(i->vad, DSP_FEATURE_DTMF_DETECT);
|
||||
if (global_relaxdtmf)
|
||||
ast_dsp_digitmode(i->vad, DSP_DIGITMODE_DTMF | DSP_DIGITMODE_RELAXDTMF);
|
||||
ast_dsp_set_digitmode(i->vad, DSP_DIGITMODE_DTMF | DSP_DIGITMODE_RELAXDTMF);
|
||||
}
|
||||
|
||||
/* Set file descriptors for audio, video, realtime text and UDPTL as needed */
|
||||
|
|
|
@ -2285,7 +2285,7 @@ static struct chan_usbradio_pvt *store_config(struct ast_config *cfg, char *ctg)
|
|||
o->dsp = ast_dsp_new();
|
||||
if (o->dsp) {
|
||||
ast_dsp_set_features(o->dsp, DSP_FEATURE_DTMF_DETECT);
|
||||
ast_dsp_digitmode(o->dsp, DSP_DIGITMODE_DTMF | DSP_DIGITMODE_MUTECONF | DSP_DIGITMODE_RELAXDTMF);
|
||||
ast_dsp_set_digitmode(o->dsp, DSP_DIGITMODE_DTMF | DSP_DIGITMODE_MUTECONF | DSP_DIGITMODE_RELAXDTMF);
|
||||
}
|
||||
|
||||
if (o->rxctcssfreq != 0 && o->rxdemod == RX_AUDIO_SPEAKER)
|
||||
|
|
|
@ -1634,9 +1634,9 @@ static struct vpb_pvt *mkif(int board, int channel, int mode, int gains, float t
|
|||
if (use_ast_dtmfdet) {
|
||||
tmp->vad = ast_dsp_new();
|
||||
ast_dsp_set_features(tmp->vad, DSP_FEATURE_DTMF_DETECT);
|
||||
ast_dsp_digitmode(tmp->vad, DSP_DIGITMODE_DTMF);
|
||||
ast_dsp_set_digitmode(tmp->vad, DSP_DIGITMODE_DTMF);
|
||||
if (relaxdtmf)
|
||||
ast_dsp_digitmode(tmp->vad, DSP_DIGITMODE_DTMF|DSP_DIGITMODE_RELAXDTMF);
|
||||
ast_dsp_set_digitmode(tmp->vad, DSP_DIGITMODE_DTMF|DSP_DIGITMODE_RELAXDTMF);
|
||||
} else {
|
||||
tmp->vad = NULL;
|
||||
}
|
||||
|
|
|
@ -3000,7 +3000,7 @@ static int zt_hangup(struct ast_channel *ast)
|
|||
p->origcid_name = NULL;
|
||||
}
|
||||
if (p->dsp)
|
||||
ast_dsp_digitmode(p->dsp,DSP_DIGITMODE_DTMF | p->dtmfrelax);
|
||||
ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_DTMF | p->dtmfrelax);
|
||||
if (p->exten)
|
||||
p->exten[0] = '\0';
|
||||
|
||||
|
@ -3452,15 +3452,15 @@ static int zt_setoption(struct ast_channel *chan, int option, void *data, int da
|
|||
switch (*cp) {
|
||||
case 1:
|
||||
ast_debug(1, "Set option TONE VERIFY, mode: MUTECONF(1) on %s\n",chan->name);
|
||||
ast_dsp_digitmode(p->dsp,DSP_DIGITMODE_MUTECONF | p->dtmfrelax); /* set mute mode if desired */
|
||||
ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_MUTECONF | p->dtmfrelax); /* set mute mode if desired */
|
||||
break;
|
||||
case 2:
|
||||
ast_debug(1, "Set option TONE VERIFY, mode: MUTECONF/MAX(2) on %s\n",chan->name);
|
||||
ast_dsp_digitmode(p->dsp,DSP_DIGITMODE_MUTECONF | DSP_DIGITMODE_MUTEMAX | p->dtmfrelax); /* set mute mode if desired */
|
||||
ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_MUTECONF | DSP_DIGITMODE_MUTEMAX | p->dtmfrelax); /* set mute mode if desired */
|
||||
break;
|
||||
default:
|
||||
ast_debug(1, "Set option TONE VERIFY, mode: OFF(0) on %s\n",chan->name);
|
||||
ast_dsp_digitmode(p->dsp,DSP_DIGITMODE_DTMF | p->dtmfrelax); /* set mute mode if desired */
|
||||
ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_DTMF | p->dtmfrelax); /* set mute mode if desired */
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
@ -3543,7 +3543,7 @@ static int zt_setoption(struct ast_channel *chan, int option, void *data, int da
|
|||
cp = (char *) data;
|
||||
ast_debug(1, "Set option RELAX DTMF, value: %s(%d) on %s\n",
|
||||
*cp ? "ON" : "OFF", (int) *cp, chan->name);
|
||||
ast_dsp_digitmode(p->dsp, ((*cp) ? DSP_DIGITMODE_RELAXDTMF : DSP_DIGITMODE_DTMF) | p->dtmfrelax);
|
||||
ast_dsp_set_digitmode(p->dsp, ((*cp) ? DSP_DIGITMODE_RELAXDTMF : DSP_DIGITMODE_DTMF) | p->dtmfrelax);
|
||||
break;
|
||||
case AST_OPTION_AUDIO_MODE: /* Set AUDIO mode (or not) */
|
||||
cp = (char *) data;
|
||||
|
@ -5930,7 +5930,7 @@ static struct ast_channel *zt_new(struct zt_pvt *i, int state, int startpbx, int
|
|||
}
|
||||
#endif
|
||||
ast_dsp_set_features(i->dsp, features);
|
||||
ast_dsp_digitmode(i->dsp, DSP_DIGITMODE_DTMF | i->dtmfrelax);
|
||||
ast_dsp_set_digitmode(i->dsp, DSP_DIGITMODE_DTMF | i->dtmfrelax);
|
||||
if (!ast_strlen_zero(progzone))
|
||||
ast_dsp_set_call_progress_zone(i->dsp, progzone);
|
||||
if (i->busydetect && CANBUSYDETECT(i)) {
|
||||
|
@ -6203,9 +6203,9 @@ static void *ss_thread(void *data)
|
|||
/* set digit mode appropriately */
|
||||
if (p->dsp) {
|
||||
if (NEED_MFDETECT(p))
|
||||
ast_dsp_digitmode(p->dsp,DSP_DIGITMODE_MF | p->dtmfrelax);
|
||||
ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_MF | p->dtmfrelax);
|
||||
else
|
||||
ast_dsp_digitmode(p->dsp,DSP_DIGITMODE_DTMF | p->dtmfrelax);
|
||||
ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_DTMF | p->dtmfrelax);
|
||||
}
|
||||
memset(dtmfbuf, 0, sizeof(dtmfbuf));
|
||||
/* Wait for the first digit only if immediate=no */
|
||||
|
@ -6319,14 +6319,14 @@ static void *ss_thread(void *data)
|
|||
return NULL;
|
||||
}
|
||||
zt_set_hook(p->subs[SUB_REAL].zfd, ZT_OFFHOOK);
|
||||
ast_dsp_digitmode(p->dsp,DSP_DIGITMODE_MF | p->dtmfrelax);
|
||||
ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_MF | p->dtmfrelax);
|
||||
res = my_getsigstr(chan, anibuf, "#", 10000);
|
||||
if ((res > 0) && (strlen(anibuf) > 2)) {
|
||||
if (anibuf[strlen(anibuf) - 1] == '#')
|
||||
anibuf[strlen(anibuf) - 1] = 0;
|
||||
ast_set_callerid(chan, anibuf + 2, NULL, anibuf + 2);
|
||||
}
|
||||
ast_dsp_digitmode(p->dsp,DSP_DIGITMODE_DTMF | p->dtmfrelax);
|
||||
ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_DTMF | p->dtmfrelax);
|
||||
}
|
||||
|
||||
ast_copy_string(exten, dtmfbuf, sizeof(exten));
|
||||
|
@ -6411,7 +6411,7 @@ static void *ss_thread(void *data)
|
|||
if (NEED_MFDETECT(p)) {
|
||||
if (p->dsp) {
|
||||
if (!p->hardwaredtmf)
|
||||
ast_dsp_digitmode(p->dsp,DSP_DIGITMODE_DTMF | p->dtmfrelax);
|
||||
ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_DTMF | p->dtmfrelax);
|
||||
else {
|
||||
ast_dsp_free(p->dsp);
|
||||
p->dsp = NULL;
|
||||
|
@ -8512,7 +8512,7 @@ static struct zt_pvt *mkintf(int channel, struct zt_chan_conf conf, struct zt_pr
|
|||
if (tmp->subs[SUB_REAL].zfd > -1) {
|
||||
set_actual_gain(tmp->subs[SUB_REAL].zfd, 0, tmp->rxgain, tmp->txgain, tmp->law);
|
||||
if (tmp->dsp)
|
||||
ast_dsp_digitmode(tmp->dsp, DSP_DIGITMODE_DTMF | tmp->dtmfrelax);
|
||||
ast_dsp_set_digitmode(tmp->dsp, DSP_DIGITMODE_DTMF | tmp->dtmfrelax);
|
||||
update_conf(tmp);
|
||||
if (!here) {
|
||||
if ((conf.chan.sig != SIG_BRI) && (conf.chan.sig != SIG_BRI_PTMP) && (conf.chan.sig != SIG_PRI) && (conf.chan.sig != SIG_SS7))
|
||||
|
|
|
@ -115,7 +115,7 @@ void ast_dsp_set_features(struct ast_dsp *dsp, int features);
|
|||
int ast_dsp_getdigits(struct ast_dsp *dsp, char *buf, int max);
|
||||
|
||||
/*! \brief Set digit mode */
|
||||
int ast_dsp_digitmode(struct ast_dsp *dsp, int digitmode);
|
||||
int ast_dsp_set_digitmode(struct ast_dsp *dsp, int digitmode);
|
||||
|
||||
/*! \brief Set fax mode */
|
||||
int ast_dsp_set_faxmode(struct ast_dsp *dsp, int faxmode);
|
||||
|
|
|
@ -1495,7 +1495,7 @@ void ast_dsp_reset(struct ast_dsp *dsp)
|
|||
dsp->ringtimeout= 0;
|
||||
}
|
||||
|
||||
int ast_dsp_digitmode(struct ast_dsp *dsp, int digitmode)
|
||||
int ast_dsp_set_digitmode(struct ast_dsp *dsp, int digitmode)
|
||||
{
|
||||
int new;
|
||||
int old;
|
||||
|
|
Reference in New Issue