summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Fredrickson <creslin@digium.com>2007-10-27 00:43:59 +0000
committerMatthew Fredrickson <creslin@digium.com>2007-10-27 00:43:59 +0000
commit6c452a64086f85b72b5e566d74677e292233910e (patch)
tree5ad6e17c1c60c0a2a8837734b9f4bfec77d61848
parenta55b6954e82025b9f0982fea34b7167baec4df6a (diff)
Make sure we turn on the DSP when we answer the call
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@87231 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--channels/chan_zap.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index 9428a4359..0b2fb8885 100644
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -5604,7 +5604,7 @@ static struct ast_channel *zt_new(struct zt_pvt *i, int state, int startpbx, int
i->dsp = NULL;
if (i->dsp) {
i->dsp_features = features & ~DSP_PROGRESS_TALK;
-#ifdef HAVE_PRI
+#if defined(HAVE_PRI) || defined(HAVE_SS7)
/* We cannot do progress detection until receives PROGRESS message */
if (i->outgoing && ((i->sig == SIG_PRI) || (i->sig == SIG_SS7))) {
/* Remember requested DSP features, don't treat
@@ -8699,6 +8699,10 @@ static void *ss7_linkset(void *data)
ast_debug(1, "Queuing frame PROGRESS on CIC %d\n", p->cic);
zap_queue_frame(p, &f, linkset);
p->progress = 1;
+ if (p->dsp && p->dsp_features) {
+ ast_dsp_set_features(p->dsp, p->dsp_features);
+ p->dsp_features = 0;
+ }
}
break;
default:
@@ -8978,6 +8982,10 @@ static void *ss7_linkset(void *data)
p = linkset->pvts[chanpos];
ast_mutex_lock(&p->lock);
p->subs[SUB_REAL].needanswer = 1;
+ if (p->dsp && p->dsp_features) {
+ ast_dsp_set_features(p->dsp, p->dsp_features);
+ p->dsp_features = 0;
+ }
zt_enable_ec(p);
ast_mutex_unlock(&p->lock);
}