[svn-commits] branch kpfleming/vldtmf r8958 - /team/kpfleming/vldtmf/channel.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Tue Jan 31 14:21:07 MST 2006


Author: kpfleming
Date: Mon Jan 30 19:43:26 2006
New Revision: 8958

URL: http://svn.digium.com/view/asterisk?rev=8958&view=rev
Log:
don't send AST_FRAME_DTMF to channels that want DTMF begin/end instead

Modified:
    team/kpfleming/vldtmf/channel.c

Modified: team/kpfleming/vldtmf/channel.c
URL: http://svn.digium.com/view/asterisk/team/kpfleming/vldtmf/channel.c?rev=8958&r1=8957&r2=8958&view=diff
==============================================================================
--- team/kpfleming/vldtmf/channel.c (original)
+++ team/kpfleming/vldtmf/channel.c Mon Jan 30 19:43:26 2006
@@ -2252,7 +2252,7 @@
 	if (chan->fout & 0x80000000)
 		ast_frame_dump(chan->name, fr, ">>");
 	CHECK_BLOCKING(chan);
-	switch(fr->frametype) {
+	switch (fr->frametype) {
 	case AST_FRAME_CONTROL:
 		/* XXX Interpret control frames XXX */
 		ast_log(LOG_WARNING, "Don't know how to handle control frames yet\n");
@@ -2270,11 +2270,15 @@
 			res = 0;
 		break;
 	case AST_FRAME_DTMF:
-		ast_clear_flag(chan, AST_FLAG_BLOCKING);
-		ast_mutex_unlock(&chan->lock);
-		res = do_senddigit(chan,fr->subclass);
-		ast_mutex_lock(&chan->lock);
-		CHECK_BLOCKING(chan);
+		if (chan->tech->send_digit_begin)
+			res = 0;
+		else {
+			ast_clear_flag(chan, AST_FLAG_BLOCKING);
+			ast_mutex_unlock(&chan->lock);
+			res = do_senddigit(chan, fr->subclass);
+			ast_mutex_lock(&chan->lock);
+			CHECK_BLOCKING(chan);
+		}
 		break;
 	case AST_FRAME_TEXT:
 		if (chan->tech->send_text)



More information about the svn-commits mailing list