diff options
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); |