[Asterisk-cvs] asterisk/channels chan_sip.c,1.692,1.693

markster at lists.digium.com markster at lists.digium.com
Fri Mar 25 15:10:54 CST 2005


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv5774/channels

Modified Files:
	chan_sip.c 
Log Message:
Fix DTMF formatting (bug #3853)


Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.692
retrieving revision 1.693
diff -u -d -r1.692 -r1.693
--- chan_sip.c	24 Mar 2005 23:06:21 -0000	1.692
+++ chan_sip.c	25 Mar 2005 21:05:08 -0000	1.693
@@ -2217,10 +2217,10 @@
 			}
 		tmp->type = channeltype;
                 if (ast_test_flag(i, SIP_DTMF) ==  SIP_DTMF_INBAND) {
-                    i->vad = ast_dsp_new();
-                    ast_dsp_set_features(i->vad, DSP_FEATURE_DTMF_DETECT);
-		    if (relaxdtmf)
-			ast_dsp_digitmode(i->vad, DSP_DIGITMODE_DTMF | DSP_DIGITMODE_RELAXDTMF);
+                	i->vad = ast_dsp_new();
+                	ast_dsp_set_features(i->vad, DSP_FEATURE_DTMF_DETECT);
+			if (relaxdtmf)
+				ast_dsp_digitmode(i->vad, DSP_DIGITMODE_DTMF | DSP_DIGITMODE_RELAXDTMF);
                 }
 		tmp->fds[0] = ast_rtp_fd(i->rtp);
 		tmp->fds[1] = ast_rtcp_fd(i->rtp);
@@ -2442,11 +2442,11 @@
 				ast_set_read_format(p->owner, p->owner->readformat);
 				ast_set_write_format(p->owner, p->owner->writeformat);
 			}
-            if ((ast_test_flag(p, SIP_DTMF) == SIP_DTMF_INBAND) && p->vad) {
-                   f = ast_dsp_process(p->owner,p->vad,f);
-		   if (f && (f->frametype == AST_FRAME_DTMF)) 
-			ast_log(LOG_DEBUG, "Detected DTMF '%c'\n", f->subclass);
-            }
+			if ((ast_test_flag(p, SIP_DTMF) == SIP_DTMF_INBAND) && p->vad) {
+				f = ast_dsp_process(p->owner, p->vad, f);
+				if (f && (f->frametype == AST_FRAME_DTMF)) 
+					ast_log(LOG_DEBUG, "* Detected inband DTMF '%c'\n", f->subclass);
+			}
 		}
 	}
 	return f;




More information about the svn-commits mailing list