diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c index fcf015cdd37e385f179e7ce77d99f36ce24e7f6a..ca19294df46a5a6fc06b3e72db569ac8775faac9 100644 --- a/apps/app_chanspy.c +++ b/apps/app_chanspy.c @@ -361,10 +361,14 @@ static int channel_spy(struct ast_channel *chan, struct chanspy_ds *spyee_chansp ast_audiohook_init(&csth.whisper_audiohook, AST_AUDIOHOOK_TYPE_WHISPER, "ChanSpy"); ast_audiohook_init(&csth.bridge_whisper_audiohook, AST_AUDIOHOOK_TYPE_WHISPER, "Chanspy"); - start_spying(spyee, spyer_name, &csth.whisper_audiohook); /* Unlocks spyee */ + if (start_spying(spyee, spyer_name, &csth.whisper_audiohook)) { + ast_log(LOG_WARNING, "Unable to attach whisper audiohook to spyee %s. Whisper mode disabled!\n", spyee->name); + } if ((spyee_bridge = ast_bridged_channel(spyee))) { ast_channel_lock(spyee_bridge); - start_spying(ast_bridged_channel(spyee), spyer_name, &csth.bridge_whisper_audiohook); + if (start_spying(ast_bridged_channel(spyee), spyer_name, &csth.bridge_whisper_audiohook)) { + ast_log(LOG_WARNING, "Unable to attach barge audiohook on spyee %s. Barge mode disabled!\n", spyee->name); + } ast_channel_unlock(spyee_bridge); } ast_channel_unlock(spyee);