aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_chanspy.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-05-26 16:05:07 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-05-26 16:05:07 +0000
commite9f4f7e70205db1c750db16861718462bf31d37d (patch)
treec6ec095878ed3ad06c54ceb26aea2859e8f0338e /apps/app_chanspy.c
parent2c1f5ac39f63a78dbcf66a0e2b8aaaf734cb5dce (diff)
don't play any sounds when using the quiet option (bug #4348)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5774 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_chanspy.c')
-rwxr-xr-xapps/app_chanspy.c16
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);