[Asterisk-cvs] asterisk rtp.c,1.92.2.4,1.92.2.5

russell at lists.digium.com russell at lists.digium.com
Fri Dec 10 06:34:46 CST 2004


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

Modified Files:
      Tag: v1-0
	rtp.c 
Log Message:
implement fmtp 16 in rtp (bug #2999)


Index: rtp.c
===================================================================
RCS file: /usr/cvsroot/asterisk/rtp.c,v
retrieving revision 1.92.2.4
retrieving revision 1.92.2.5
diff -u -d -r1.92.2.4 -r1.92.2.5
--- rtp.c	25 Nov 2004 18:16:16 -0000	1.92.2.4
+++ rtp.c	10 Dec 2004 11:32:12 -0000	1.92.2.5
@@ -188,8 +188,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;
@@ -218,6 +223,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);
@@ -252,6 +259,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