[Asterisk-cvs] asterisk dsp.c,1.30,1.31
markster at lists.digium.com
markster at lists.digium.com
Sun Nov 14 19:47:50 CST 2004
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv4894
Modified Files:
dsp.c
Log Message:
DSP enhancements (bug #2826) courtesy pcadach
Index: dsp.c
===================================================================
RCS file: /usr/cvsroot/asterisk/dsp.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- dsp.c 10 Nov 2004 20:20:18 -0000 1.30
+++ dsp.c 15 Nov 2004 00:48:36 -0000 1.31
@@ -1174,15 +1174,15 @@
if (newstate == dsp->tstate) {
dsp->tcount++;
if (dsp->tcount == COUNT_THRESH) {
- if (dsp->tstate == TONE_STATE_BUSY) {
+ if ((dsp->features & DSP_PROGRESS_BUSY) && dsp->tstate == TONE_STATE_BUSY) {
res = AST_CONTROL_BUSY;
dsp->features &= ~DSP_FEATURE_CALL_PROGRESS;
- } else if (dsp->tstate == TONE_STATE_TALKING) {
+ } else if ((dsp->features & DSP_PROGRESS_TALK) && dsp->tstate == TONE_STATE_TALKING) {
res = AST_CONTROL_ANSWER;
dsp->features &= ~DSP_FEATURE_CALL_PROGRESS;
- } else if (dsp->tstate == TONE_STATE_RINGING)
+ } else if ((dsp->features & DSP_PROGRESS_RINGING) && dsp->tstate == TONE_STATE_RINGING)
res = AST_CONTROL_RINGING;
- else if (dsp->tstate == TONE_STATE_SPECIAL3) {
+ else if ((dsp->features & DSP_PROGRESS_CONGESTION) && dsp->tstate == TONE_STATE_SPECIAL3) {
res = AST_CONTROL_CONGESTION;
dsp->features &= ~DSP_FEATURE_CALL_PROGRESS;
}
@@ -1576,15 +1576,16 @@
}
if ((dsp->features & DSP_FEATURE_CALL_PROGRESS)) {
res = __ast_dsp_call_progress(dsp, shortdata, len);
- memset(&dsp->f, 0, sizeof(dsp->f));
- dsp->f.frametype = AST_FRAME_CONTROL;
if (res) {
switch(res) {
case AST_CONTROL_ANSWER:
case AST_CONTROL_BUSY:
case AST_CONTROL_RINGING:
case AST_CONTROL_CONGESTION:
+ memset(&dsp->f, 0, sizeof(dsp->f));
+ dsp->f.frametype = AST_FRAME_CONTROL;
dsp->f.subclass = res;
+ dsp->f.src = "dsp_progress";
if (chan)
ast_queue_frame(chan, &dsp->f);
break;
More information about the svn-commits
mailing list