Commit 1e9a13db authored by caela akari's avatar caela akari
Browse files

various fixed and unbreaks

parent 9b107335
......@@ -1623,6 +1623,12 @@ static int my_dsp_set_digitmode(void *pvt, enum analog_dsp_digitmode mode)
}
}
ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_MF | p->dtmfrelax);
} else if (mode == ANALOG_DIGITMODE_NONE) {
/* k: TODO: instead of throwing away the dsp, just disable digit detect */
if (p->dsp) {
ast_dsp_free(p->dsp);
p->dsp = NULL;
}
}
return 0;
}
......
......@@ -1208,8 +1208,9 @@ int analog_call(struct analog_pvt *p, struct ast_channel *ast, const char *rdest
case ANALOG_SIG_FEATB:
case ANALOG_SIG_SF_FEATB:
case ANALOG_SIG_SF:
analog_dsp_set_digitmode(p, ANALOG_DIGITMODE_NONE); /* k: disable tone detection, since dahdi patched to echo our tones back */
if (c[0] != '\0') {
snprintf(p->dop.dialstr, sizeof(p->dop.dialstr), "Mw*%s#", c);
snprintf(p->dop.dialstr, sizeof(p->dop.dialstr), "M*%s#", c);
}
else {
ast_copy_string(p->dop.dialstr, "", sizeof(p->dop.dialstr));
......
......@@ -114,6 +114,7 @@ enum analog_sub {
enum analog_dsp_digitmode {
ANALOG_DIGITMODE_DTMF = 1,
ANALOG_DIGITMODE_MF,
ANALOG_DIGITMODE_NONE,
};
enum analog_cid_start {
......
......@@ -195,9 +195,15 @@ enum gsamp_thresh {
#define DTMF_RELATIVE_PEAK_COL 6.3 /* 8dB */
#define DTMF_TO_TOTAL_ENERGY 42.0
#define BELL_MF_THRESHOLD 0.001e7
#define BELL_MF_TWIST 60.0 /* 6dB */
#define BELL_MF_RELATIVE_PEAK 3.0 /* 11dB */
#define BELL_MF_THRESHOLD 1.6e9
#define BELL_MF_TWIST 4.0 /* 6dB */
#define BELL_MF_RELATIVE_PEAK 12.6 /* 11dB */
// k: project mf defs
// these SERIOUSLY fuck up mf trunk reliability
// do not use
//#define BELL_MF_THRESHOLD 0.001e7
//#define BELL_MF_TWIST 60.0 /* 6dB */
//#define BELL_MF_RELATIVE_PEAK 3.0 /* 11dB */
#if defined(BUSYDETECT_TONEONLY) && defined(BUSYDETECT_COMPARE_TONE_AND_SILENCE)
#error You cant use BUSYDETECT_TONEONLY together with BUSYDETECT_COMPARE_TONE_AND_SILENCE
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment