[asterisk-commits] branch kpfleming/vldtmf r9029 - in /team/kpfleming/vldtmf: ./ channels/ inclu...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Jan 31 17:21:26 MST 2006


Author: kpfleming
Date: Tue Jan 31 18:21:24 2006
New Revision: 9029

URL: http://svn.digium.com/view/asterisk?rev=9029&view=rev
Log:
don't need a second new frame type, can use the existing one

Modified:
    team/kpfleming/vldtmf/channel.c
    team/kpfleming/vldtmf/channels/chan_zap.c
    team/kpfleming/vldtmf/include/asterisk/channel.h
    team/kpfleming/vldtmf/include/asterisk/frame.h
    team/kpfleming/vldtmf/include/asterisk/rtp.h
    team/kpfleming/vldtmf/rtp.c

Modified: team/kpfleming/vldtmf/channel.c
URL: http://svn.digium.com/view/asterisk/team/kpfleming/vldtmf/channel.c?rev=9029&r1=9028&r2=9029&view=diff
==============================================================================
--- team/kpfleming/vldtmf/channel.c (original)
+++ team/kpfleming/vldtmf/channel.c Tue Jan 31 18:21:24 2006
@@ -1890,30 +1890,6 @@
 				ast_log(LOG_DTMF, "DTMF begin '%c' received on %s\n", f->subclass, chan->name);
 			}
 			break;
-		case AST_FRAME_DTMF_END: {
-			struct ast_frame *dtmf;
-
-			if (!(dtmf = ast_frdup(&ast_null_frame))) {
-				ast_log(LOG_WARNING, "Unable to allocate frame!\n");
-				f = &ast_null_frame;
-				break;
-			}
-
-			dtmf->frametype = AST_FRAME_DTMF;
-			dtmf->subclass = f->subclass;
-			
-			if (ast_test_flag(chan, AST_FLAG_DEFER_DTMF)) {
-				AST_LIST_INSERT_TAIL(&chan->dtmfq, dtmf, next);
-				AST_LIST_INSERT_TAIL(&chan->dtmfq, ast_frdup(f), next);
-				f = &ast_null_frame;
-				break;
-			}
-
-			ast_log(LOG_DTMF, "DTMF end '%c' received on %s\n", f->subclass, chan->name);
-			AST_LIST_INSERT_HEAD(&chan->readq, f, next);
-			f = dtmf;
-		}
-			/* fallthrough */
 		case AST_FRAME_DTMF:
 			if (ast_test_flag(chan, AST_FLAG_DEFER_DTMF)) {
 				AST_LIST_INSERT_TAIL(&chan->dtmfq, ast_frdup(f), next);
@@ -2254,12 +2230,6 @@
 	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:
-		if (chan->tech->send_digit_end)
-			res = chan->tech->send_digit_end(chan);
 		else
 			res = 0;
 		break;

Modified: team/kpfleming/vldtmf/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/kpfleming/vldtmf/channels/chan_zap.c?rev=9029&r1=9028&r2=9029&view=diff
==============================================================================
--- team/kpfleming/vldtmf/channels/chan_zap.c (original)
+++ team/kpfleming/vldtmf/channels/chan_zap.c Tue Jan 31 18:21:24 2006
@@ -3612,11 +3612,7 @@
 			/* absorb event */
 		} else {
 #endif
-			/* Send a DTMF event for 'legacy' channels and all applications,
-			   and a DTMF_BEGIN event for channels that handle variable duration
-			   DTMF events
-			*/
-			p->subs[index].f.frametype = AST_FRAME_DTMF_BEGIN;
+			p->subs[index].f.frametype = AST_FRAME_DTMF;
 			p->subs[index].f.subclass = res & 0xff;
 #ifdef ZAPATA_PRI
 		}

Modified: team/kpfleming/vldtmf/include/asterisk/channel.h
URL: http://svn.digium.com/view/asterisk/team/kpfleming/vldtmf/include/asterisk/channel.h?rev=9029&r1=9028&r2=9029&view=diff
==============================================================================
--- team/kpfleming/vldtmf/include/asterisk/channel.h (original)
+++ team/kpfleming/vldtmf/include/asterisk/channel.h Tue Jan 31 18:21:24 2006
@@ -194,14 +194,11 @@
 	/*! Devicestate call back */
 	int (* const devicestate)(void *data);
 
-	/*! Send a literal DTMF digit */
+	/*! Send a literal DTMF digit, or stop sending if already started */
 	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.  */

Modified: team/kpfleming/vldtmf/include/asterisk/frame.h
URL: http://svn.digium.com/view/asterisk/team/kpfleming/vldtmf/include/asterisk/frame.h?rev=9029&r1=9028&r2=9029&view=diff
==============================================================================
--- team/kpfleming/vldtmf/include/asterisk/frame.h (original)
+++ team/kpfleming/vldtmf/include/asterisk/frame.h Tue Jan 31 18:21:24 2006
@@ -156,8 +156,6 @@
 #endif /* T38_SUPPORT */
 /*! DTMF begin event, subclass is the digit */
 #define AST_FRAME_DTMF_BEGIN	12
-/*! DTMF end event, subclass is the digit */
-#define AST_FRAME_DTMF_END	13
 
 #if defined(T38_SUPPORT)
 /* MODEM subclasses */

Modified: team/kpfleming/vldtmf/include/asterisk/rtp.h
URL: http://svn.digium.com/view/asterisk/team/kpfleming/vldtmf/include/asterisk/rtp.h?rev=9029&r1=9028&r2=9029&view=diff
==============================================================================
--- team/kpfleming/vldtmf/include/asterisk/rtp.h (original)
+++ team/kpfleming/vldtmf/include/asterisk/rtp.h Tue Jan 31 18:21:24 2006
@@ -123,8 +123,6 @@
 
 int ast_rtp_send_digit_begin(struct ast_rtp *rtp, char digit);
 
-int ast_rtp_send_digit_end(struct ast_rtp *rtp);
-
 int ast_rtp_sendcng(struct ast_rtp *rtp, int level);
 
 int ast_rtp_settos(struct ast_rtp *rtp, int tos);

Modified: team/kpfleming/vldtmf/rtp.c
URL: http://svn.digium.com/view/asterisk/team/kpfleming/vldtmf/rtp.c?rev=9029&r1=9028&r2=9029&view=diff
==============================================================================
--- team/kpfleming/vldtmf/rtp.c (original)
+++ team/kpfleming/vldtmf/rtp.c Tue Jan 31 18:21:24 2006
@@ -1247,13 +1247,6 @@
 
 	if ((digit = prep_digit(digit)) == -1)
 		return -1;
-}
-
-int ast_rtp_send_digit_end(struct ast_rtp *rtp)
-{
-	/* If we have no peer, return immediately */	
-	if (!rtp->them.sin_addr.s_addr)
-		return 0;
 }
 
 int ast_rtp_senddigit(struct ast_rtp *rtp, char digit)



More information about the asterisk-commits mailing list