From: Mark Spencer Date: Sat, 5 Mar 2005 04:35:23 +0000 (+0000) Subject: If we're only queueing audio, don't queue when we really want to engage the masquerade X-Git-Tag: 1.2.0-beta1~1112 X-Git-Url: http://git.asterisk.org/gitweb/?p=asterisk%2Fasterisk.git;a=commitdiff_plain;h=0eb1f2ec44e8262602a29ed3e34717f6ae132f9b;ds=sidebyside If we're only queueing audio, don't queue when we really want to engage the masquerade git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5145 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_local.c b/channels/chan_local.c index 994f900..62ae7a8 100755 --- a/channels/chan_local.c +++ b/channels/chan_local.c @@ -206,8 +206,14 @@ static int local_write(struct ast_channel *ast, struct ast_frame *f) /* Just queue for delivery to the other side */ ast_mutex_lock(&p->lock); isoutbound = IS_OUTBOUND(ast, p); - res = local_queue_frame(p, isoutbound, f, ast); - check_bridge(p, isoutbound); + if (f && (f->frametype == AST_FRAME_VOICE)) + check_bridge(p, isoutbound); + if (!p->alreadymasqed) + res = local_queue_frame(p, isoutbound, f, ast); + else { + ast_log(LOG_DEBUG, "Not posting to queue since already masked on '%s'\n", ast->name); + res = 0; + } ast_mutex_unlock(&p->lock); return res; }