[asterisk-commits] rmudgett: trunk r211392 - in /trunk/channels: chan_dahdi.c sig_pri.c sig_pri.h
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Aug 10 10:53:26 CDT 2009
Author: rmudgett
Date: Mon Aug 10 10:53:23 2009
New Revision: 211392
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=211392
Log:
Restoring some code to sig_pri. Not sure if it is really needed.
Putting some DSP code back into sig_pri that was removed by the
chan_dahdi/sig_pri reorganization.
Modified:
trunk/channels/chan_dahdi.c
trunk/channels/sig_pri.c
trunk/channels/sig_pri.h
Modified: trunk/channels/chan_dahdi.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/channels/chan_dahdi.c?view=diff&rev=211392&r1=211391&r2=211392
==============================================================================
--- trunk/channels/chan_dahdi.c (original)
+++ trunk/channels/chan_dahdi.c Mon Aug 10 10:53:23 2009
@@ -2614,6 +2614,7 @@
.handle_dchan_exception = my_handle_dchan_exception,
.play_tone = my_pri_play_tone,
.set_echocanceller = my_set_echocanceller,
+ .dsp_reset_and_flush_digits = my_dsp_reset_and_flush_digits,
.lock_private = my_lock_private,
.unlock_private = my_unlock_private,
.new_ast_channel = my_new_pri_ast_channel,
@@ -8040,9 +8041,9 @@
i->dsp = NULL;
if (i->dsp) {
i->dsp_features = features;
-#if defined(HAVE_SS7)
- /* We cannot do progress detection until receives PROGRESS message */
- if (i->outgoing && (i->sig == SIG_SS7)) {
+#if defined(HAVE_PRI) || defined(HAVE_SS7)
+ /* We cannot do progress detection until receive PROGRESS message */
+ if (i->outgoing && ((i->sig == SIG_PRI) || (i->sig == SIG_BRI) || (i->sig == SIG_BRI_PTMP) || (i->sig == SIG_SS7))) {
/* Remember requested DSP features, don't treat
talking as ANSWER */
i->dsp_features = features & ~DSP_PROGRESS_TALK;
Modified: trunk/channels/sig_pri.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/channels/sig_pri.c?view=diff&rev=211392&r1=211391&r2=211392
==============================================================================
--- trunk/channels/sig_pri.c (original)
+++ trunk/channels/sig_pri.c Mon Aug 10 10:53:23 2009
@@ -190,6 +190,22 @@
/* Then break the poll */
pthread_kill(pri->master, SIGURG);
return 0;
+}
+
+/*!
+ * \internal
+ * \brief Reset DTMF detector.
+ * \since 1.6.3
+ *
+ * \param p sig_pri channel structure.
+ *
+ * \return Nothing
+ */
+static void sig_pri_dsp_reset_and_flush_digits(struct sig_pri_chan *p)
+{
+ if (p->calls->dsp_reset_and_flush_digits) {
+ p->calls->dsp_reset_and_flush_digits(p->chan_pvt);
+ }
}
static int sig_pri_set_echocanceller(struct sig_pri_chan *p, int enable)
@@ -617,6 +633,8 @@
}
ast_verb(3, "Starting simple switch on '%s'\n", chan->name);
+
+ sig_pri_dsp_reset_and_flush_digits(p);
/* Now loop looking for an extension */
ast_copy_string(exten, p->exten, sizeof(exten));
@@ -652,6 +670,7 @@
if (ast_exists_extension(chan, chan->context, exten, 1, p->cid_num)) {
/* Start the real PBX */
ast_copy_string(chan->exten, exten, sizeof(chan->exten));
+ sig_pri_dsp_reset_and_flush_digits(p);
sig_pri_set_echocanceller(p, 1);
ast_setstate(chan, AST_STATE_RING);
res = ast_pbx_run(chan);
Modified: trunk/channels/sig_pri.h
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/channels/sig_pri.h?view=diff&rev=211392&r1=211391&r2=211392
==============================================================================
--- trunk/channels/sig_pri.h (original)
+++ trunk/channels/sig_pri.h Mon Aug 10 10:53:23 2009
@@ -63,6 +63,7 @@
int (* const set_echocanceller)(void *pvt, int enable);
int (* const train_echocanceller)(void *pvt);
+ int (* const dsp_reset_and_flush_digits)(void *pvt);
struct ast_channel * (* const new_ast_channel)(void *pvt, int state, int startpbx, enum sig_pri_law law, int transfercapability, char *exten, const struct ast_channel *chan);
More information about the asterisk-commits
mailing list