[asterisk-commits] oej: branch oej/rana-dtmf-rtp-duration-1.6.0 r305750 - /team/oej/rana-dtmf-rt...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Feb 2 06:19:35 CST 2011


Author: oej
Date: Wed Feb  2 06:19:31 2011
New Revision: 305750

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=305750
Log:
Ouch. Mgcp. Don't think I have ever touched that channel.

Modified:
    team/oej/rana-dtmf-rtp-duration-1.6.0/channels/chan_mgcp.c

Modified: team/oej/rana-dtmf-rtp-duration-1.6.0/channels/chan_mgcp.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/rana-dtmf-rtp-duration-1.6.0/channels/chan_mgcp.c?view=diff&rev=305750&r1=305749&r2=305750
==============================================================================
--- team/oej/rana-dtmf-rtp-duration-1.6.0/channels/chan_mgcp.c (original)
+++ team/oej/rana-dtmf-rtp-duration-1.6.0/channels/chan_mgcp.c Wed Feb  2 06:19:31 2011
@@ -424,6 +424,7 @@
 static int mgcp_indicate(struct ast_channel *ast, int ind, const void *data, size_t datalen);
 static int mgcp_fixup(struct ast_channel *oldchan, struct ast_channel *newchan);
 static int mgcp_senddigit_begin(struct ast_channel *ast, char digit);
+static int mgcp_senddigit_continue(struct ast_channel *ast, char digit, unsigned int duration);
 static int mgcp_senddigit_end(struct ast_channel *ast, char digit, unsigned int duration);
 static int mgcp_devicestate(void *data);
 static void add_header_offhook(struct mgcp_subchannel *sub, struct mgcp_request *resp);
@@ -443,6 +444,7 @@
 	.indicate = mgcp_indicate,
 	.fixup = mgcp_fixup,
 	.send_digit_begin = mgcp_senddigit_begin,
+	.send_digit_continue = mgcp_senddigit_continue,
 	.send_digit_end = mgcp_senddigit_end,
 	.bridge = ast_rtp_bridge,
 };
@@ -1330,6 +1332,21 @@
 	return res;
 }
 
+static int mgcp_senddigit_continue(struct ast_channel *ast, char digit, unsigned int duration)
+{
+	struct mgcp_subchannel *sub = ast->tech_pvt;
+	struct mgcp_endpoint *p = sub->parent;
+
+	ast_mutex_lock(&sub->lock);
+
+	if (p->dtmfmode & MGCP_DTMF_RFC2833) {
+		ast_debug(1, "DTMF continue using RFC2833\n");
+                ast_rtp_senddigit_continue(sub->rtp, digit, duration);
+	}
+	ast_mutex_unlock(&sub->lock);
+
+	return 0;
+}
 static int mgcp_senddigit_end(struct ast_channel *ast, char digit, unsigned int duration)
 {
 	struct mgcp_subchannel *sub = ast->tech_pvt;




More information about the asterisk-commits mailing list