aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_misdn.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/chan_misdn.c')
-rw-r--r--channels/chan_misdn.c32
1 files changed, 5 insertions, 27 deletions
diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c
index 4ec3236ef..9d60ac384 100644
--- a/channels/chan_misdn.c
+++ b/channels/chan_misdn.c
@@ -301,13 +301,6 @@ struct chan_list {
struct ast_dsp *dsp;
/*!
- * \brief Allocated audio frame sample translator
- * \note ast_translator_build_path() creates the translator path.
- * \note Must use ast_translator_free_path() to clean up.
- */
- struct ast_trans_pvt *trans;
-
- /*!
* \brief Associated Asterisk channel structure.
*/
struct ast_channel * ast;
@@ -2117,8 +2110,6 @@ static int read_config(struct chan_list *ch, int orig)
else
ast_dsp_set_features(ch->dsp, DSP_FEATURE_DTMF_DETECT );
}
- if (!ch->trans)
- ch->trans = ast_translator_build_path(AST_FORMAT_SLINEAR, AST_FORMAT_ALAW);
}
/* AOCD initialization */
@@ -2374,11 +2365,6 @@ static int misdn_digit_end(struct ast_channel *ast, char digit, unsigned int dur
}
break;
default:
- /* Do not send Digits in CONNECTED State, when
- * the other side is too mISDN. */
- if (p->other_ch )
- return 0;
-
if ( bc->send_dtmf )
send_digit_to_chan(p,digit);
break;
@@ -2705,21 +2691,17 @@ static int misdn_hangup(struct ast_channel *ast)
static struct ast_frame *process_ast_dsp(struct chan_list *tmp, struct ast_frame *frame)
{
- struct ast_frame *f,*f2;
+ struct ast_frame *f;
- if (tmp->trans) {
- f2 = ast_translate(tmp->trans, frame, 0);
- f = ast_dsp_process(tmp->ast, tmp->dsp, f2);
+ if (tmp->dsp) {
+ f = ast_dsp_process(tmp->ast, tmp->dsp, frame);
} else {
- chan_misdn_log(0, tmp->bc->port, "No T-Path found\n");
+ chan_misdn_log(0, tmp->bc->port, "No DSP-Path found\n");
return NULL;
}
if (!f || (f->frametype != AST_FRAME_DTMF)) {
- if (f) {
- ast_frfree(f);
- }
- return frame;
+ return f;
}
ast_log(LOG_DEBUG, "Detected inband DTMF digit: %c\n", f->subclass);
@@ -3635,8 +3617,6 @@ static void cl_dequeue_chan(struct chan_list **list, struct chan_list *chan)
if (chan->dsp)
ast_dsp_free(chan->dsp);
- if (chan->trans)
- ast_translator_free_path(chan->trans);
ast_mutex_lock(&cl_te_lock);
if (!*list) {
@@ -5684,8 +5664,6 @@ static int misdn_set_opt_exec(struct ast_channel *chan, void *data)
ch->dsp = ast_dsp_new();
if (ch->dsp)
ast_dsp_set_features(ch->dsp, DSP_FEATURE_DTMF_DETECT| DSP_FEATURE_FAX_DETECT);
- if (!ch->trans)
- ch->trans = ast_translator_build_path(AST_FORMAT_SLINEAR, AST_FORMAT_ALAW);
}
if (ch->ast_dsp) {