[asterisk-commits] trunk - r7948 /trunk/app.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Jan 10 15:35:45 CST 2006


Author: mattf
Date: Tue Jan 10 15:35:45 2006
New Revision: 7948

URL: http://svn.digium.com/view/asterisk?rev=7948&view=rev
Log:
Allow a digitstream to contain a flash character ('f' or 'F') when sending dtmf string to a channel. (#4935)

Modified:
    trunk/app.c

Modified: trunk/app.c
URL: http://svn.digium.com/view/asterisk/trunk/app.c?rev=7948&r1=7947&r2=7948&view=diff
==============================================================================
--- trunk/app.c (original)
+++ trunk/app.c Tue Jan 10 15:35:45 2006
@@ -304,10 +304,16 @@
 				f.frametype = AST_FRAME_DTMF;
 				f.subclass = *ptr;
 				f.src = "ast_dtmf_stream";
-				if (strchr("0123456789*#abcdABCD",*ptr)==NULL) {
-					ast_log(LOG_WARNING, "Illegal DTMF character '%c' in string. (0-9*#aAbBcCdD allowed)\n",*ptr);
+				if (strchr("0123456789*#abcdfABCDF",*ptr)==NULL) {
+					ast_log(LOG_WARNING, "Illegal DTMF character '%c' in string. (0-9*#aAbBcCdDfF allowed)\n",*ptr);
 				} else {
-					res = ast_write(chan, &f);
+					if (*ptr == 'f' || *ptr == 'F') {
+						/* ignore return values if not supported by channel */
+						ast_indicate(chan, AST_CONTROL_FLASH);
+						res = 0;
+					} else {
+						res = ast_write(chan, &f);
+					}
 					if (res) 
 						break;
 					/* pause between digits */



More information about the asterisk-commits mailing list