[Asterisk-cvs] asterisk rtp.c,1.99,1.100

markster at lists.digium.com markster at lists.digium.com
Thu Dec 9 09:56:41 CST 2004


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

Modified Files:
	rtp.c 
Log Message:
Update comment for fmtp 16, implement in RTP (bug #2999)


Index: rtp.c
===================================================================
RCS file: /usr/cvsroot/asterisk/rtp.c,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -d -r1.99 -r1.100
--- rtp.c	24 Nov 2004 04:12:23 -0000	1.99
+++ rtp.c	9 Dec 2004 14:54:13 -0000	1.100
@@ -192,8 +192,13 @@
 		return &null_frame;
 	}
 	ast_log(LOG_DEBUG, "Sending dtmf: %d (%c), at %s\n", rtp->resp, rtp->resp, ast_inet_ntoa(iabuf, sizeof(iabuf), rtp->them.sin_addr));
-	rtp->f.frametype = AST_FRAME_DTMF;
-	rtp->f.subclass = rtp->resp;
+	if (rtp->resp == 'X') {
+		rtp->f.frametype = AST_FRAME_CONTROL;
+		rtp->f.subclass = AST_CONTROL_FLASH;
+	} else {
+		rtp->f.frametype = AST_FRAME_DTMF;
+		rtp->f.subclass = rtp->resp;
+	}
 	rtp->f.datalen = 0;
 	rtp->f.samples = 0;
 	rtp->f.mallocd = 0;
@@ -235,6 +240,8 @@
 		resp = '#';
 	} else if (event < 16) {
 		resp = 'A' + (event - 12);
+	} else if (event < 17) {
+		resp = 'X';
 	}
 	if (rtp->resp && (rtp->resp != resp)) {
 		f = send_dtmf(rtp);
@@ -269,6 +276,8 @@
 		resp = '#';
 	} else if (event < 16) {
 		resp = 'A' + (event - 12);
+	} else if (event < 17) {
+		resp = 'X';
 	}
 	if (rtp->resp && (rtp->resp != resp)) {
 		f = send_dtmf(rtp);




More information about the svn-commits mailing list