diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-03-05 04:35:23 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-03-05 04:35:23 +0000 |
commit | 14d18c3d7a1d33ca44833b58b5dbf260f4edc2f2 (patch) | |
tree | 84cdd3ef40c851eb84f4fa743570f690cce52b0e /channels/chan_local.c | |
parent | d850cf26b7eefedbb773054a07815998eb906812 (diff) |
If we're only queueing audio, don't queue when we really want to engage the masquerade
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5145 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_local.c')
-rwxr-xr-x | channels/chan_local.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/channels/chan_local.c b/channels/chan_local.c index 994f900f3..62ae7a8c0 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; } |