[asterisk-commits] oej: branch oej/rana-dtmf-rtp-duration-1.6.0 r305748 - /team/oej/rana-dtmf-rt...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Feb 2 05:58:40 CST 2011
Author: oej
Date: Wed Feb 2 05:58:36 2011
New Revision: 305748
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=305748
Log:
Adding chan_local support
Modified:
team/oej/rana-dtmf-rtp-duration-1.6.0/channels/chan_local.c
Modified: team/oej/rana-dtmf-rtp-duration-1.6.0/channels/chan_local.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/rana-dtmf-rtp-duration-1.6.0/channels/chan_local.c?view=diff&rev=305748&r1=305747&r2=305748
==============================================================================
--- team/oej/rana-dtmf-rtp-duration-1.6.0/channels/chan_local.c (original)
+++ team/oej/rana-dtmf-rtp-duration-1.6.0/channels/chan_local.c Wed Feb 2 05:58:36 2011
@@ -64,6 +64,7 @@
static struct ast_channel *local_request(const char *type, int format, void *data, int *cause);
static int local_digit_begin(struct ast_channel *ast, char digit);
+static int local_digit_continue(struct ast_channel *ast, char digit, unsigned int duration);
static int local_digit_end(struct ast_channel *ast, char digit, unsigned int duration);
static int local_call(struct ast_channel *ast, char *dest, int timeout);
static int local_hangup(struct ast_channel *ast);
@@ -83,6 +84,7 @@
.capabilities = -1,
.requester = local_request,
.send_digit_begin = local_digit_begin,
+ .send_digit_continue = local_digit_continue,
.send_digit_end = local_digit_end,
.call = local_call,
.hangup = local_hangup,
@@ -404,6 +406,26 @@
return res;
}
+static int local_digit_continue(struct ast_channel *ast, char digit, unsigned int duration)
+{
+ struct local_pvt *p = ast->tech_pvt;
+ int res = -1;
+ struct ast_frame f = { AST_FRAME_DTMF_CONTINUE, };
+ int isoutbound;
+
+ if (!p)
+ return -1;
+
+ ast_mutex_lock(&p->lock);
+ isoutbound = IS_OUTBOUND(ast, p);
+ f.subclass = digit;
+ f.len = duration;
+ if (!(res = local_queue_frame(p, isoutbound, &f, ast, 0)))
+ ast_mutex_unlock(&p->lock);
+
+ return res;
+}
+
static int local_digit_end(struct ast_channel *ast, char digit, unsigned int duration)
{
struct local_pvt *p = ast->tech_pvt;
More information about the asterisk-commits
mailing list