diff options
author | Russell Bryant <russell@russellbryant.com> | 2005-05-26 16:05:07 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2005-05-26 16:05:07 +0000 |
commit | dc21f68a95d8113b7f68482ab7355bc5918ffee1 (patch) | |
tree | c6ec095878ed3ad06c54ceb26aea2859e8f0338e /apps/app_chanspy.c | |
parent | 2cd9d4c67669c0cebb526039d3e982d81dfe69b9 (diff) |
don't play any sounds when using the quiet option (bug #4348)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5774 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_chanspy.c')
-rwxr-xr-x | apps/app_chanspy.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c index e0374d7ac..292a1518a 100755 --- a/apps/app_chanspy.c +++ b/apps/app_chanspy.c @@ -712,13 +712,15 @@ static int chanspy_exec(struct ast_channel *chan, void *data) } for(;;) { - res = ast_streamfile(chan, "beep", chan->language); - if (!res) - res = ast_waitstream(chan, ""); - if (res < 0) { - ast_clear_flag(chan, AST_FLAG_SPYING); - break; - } + if (!silent) { + res = ast_streamfile(chan, "beep", chan->language); + if (!res) + res = ast_waitstream(chan, ""); + if (res < 0) { + ast_clear_flag(chan, AST_FLAG_SPYING); + break; + } + } count = 0; res = ast_waitfordigit(chan, waitms); |