[Asterisk-cvs] asterisk/channels chan_sip.c,1.606,1.607

markster at lists.digium.com markster at lists.digium.com
Thu Dec 30 11:43:36 CST 2004


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

Modified Files:
	chan_sip.c 
Log Message:
Switch more options into flags (bug #3201)


Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.606
retrieving revision 1.607
diff -u -d -r1.606 -r1.607
--- chan_sip.c	29 Dec 2004 13:31:57 -0000	1.606
+++ chan_sip.c	30 Dec 2004 16:38:17 -0000	1.607
@@ -98,10 +98,6 @@
 
 #define CALLERID_UNKNOWN	"Unknown"
 
-/* --- Choices for DTMF support in SIP channel */
-#define SIP_DTMF_RFC2833	(1 << 0)	/* RTP DTMF */
-#define SIP_DTMF_INBAND		(1 << 1)	/* Inband audio, only for ULAW/ALAW */
-#define SIP_DTMF_INFO		(1 << 2)	/* SIP Info messages */
 
 
 #define DEFAULT_MAXMS		2000		/* Must be faster than 2 seconds by default */
@@ -154,8 +150,6 @@
[...1322 lines suppressed...]
+			ast_clear_flag(p, SIP_DTMF);
+			ast_set_flag(p, SIP_DTMF_INBAND);
+		}
 		else
 			ast_log(LOG_WARNING, "I don't know about this dtmf mode: %s\n",mode);
-        if (p->dtmfmode & SIP_DTMF_INBAND) {
-				if (!p->vad) {
-	               p->vad = ast_dsp_new();
-	               ast_dsp_set_features(p->vad, DSP_FEATURE_DTMF_DETECT);
-				}
-        } else {
+		if (ast_test_flag(p, SIP_DTMF) == SIP_DTMF_INBAND) {
+			if (!p->vad) {
+				p->vad = ast_dsp_new();
+				ast_dsp_set_features(p->vad, DSP_FEATURE_DTMF_DETECT);
+			}
+		} else {
 			if (p->vad) {
 				ast_dsp_free(p->vad);
 				p->vad = NULL;




More information about the svn-commits mailing list