[asterisk-commits] trunk r8851 - in /trunk: channel.c include/asterisk/channel.h

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Jan 31 14:20:18 MST 2006


Author: kpfleming
Date: Sat Jan 28 23:15:24 2006
New Revision: 8851

URL: http://svn.digium.com/view/asterisk?rev=8851&view=rev
Log:
add channel-driver callbacks for variable length DTMF
teach ast_write() to call those new callbacks

Modified:
    trunk/channel.c
    trunk/include/asterisk/channel.h

Modified: trunk/channel.c
URL: http://svn.digium.com/view/asterisk/trunk/channel.c?rev=8851&r1=8850&r2=8851&view=diff
==============================================================================
--- trunk/channel.c (original)
+++ trunk/channel.c Sat Jan 28 23:15:24 2006
@@ -2295,9 +2295,16 @@
 		ast_log(LOG_WARNING, "Don't know how to handle control frames yet\n");
 		break;
 	case AST_FRAME_DTMF_BEGIN:
+		if (chan->tech->send_digit_begin)
+			res = chan->tech->send_digit_begin(chan, fr->subclass);
+		else
+			res = 0;
+		break;
 	case AST_FRAME_DTMF_END:
-		/* nothing to do with these yet */
-		res = 0;
+		if (chan->tech->send_digit_end)
+			res = chan->tech->send_digit_end(chan);
+		else
+			res = 0;
 		break;
 	case AST_FRAME_DTMF:
 		ast_clear_flag(chan, AST_FLAG_BLOCKING);

Modified: trunk/include/asterisk/channel.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/channel.h?rev=8851&r1=8850&r2=8851&view=diff
==============================================================================
--- trunk/include/asterisk/channel.h (original)
+++ trunk/include/asterisk/channel.h Sat Jan 28 23:15:24 2006
@@ -189,6 +189,12 @@
 	/*! Send a literal DTMF digit */
 	int (* const send_digit)(struct ast_channel *chan, char digit);
 
+	/*! Start sending a literal DTMF digit */
+	int (* const send_digit_begin)(struct ast_channel *chan, char digit);
+
+	/*! Stop sending the last literal DTMF digit */
+	int (* const send_digit_end)(struct ast_channel *chan);
+
 	/*! Call a given phone number (address, etc), but don't
 	   take longer than timeout seconds to do so.  */
 	int (* const call)(struct ast_channel *chan, char *addr, int timeout);



More information about the asterisk-commits mailing list