Skip to content

Commit

Permalink
FS-5376 --resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
anthmFS committed May 21, 2013
1 parent fb3eb97 commit e2da2e1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/mod/applications/mod_spy/mod_spy.c
Expand Up @@ -103,11 +103,14 @@ static switch_status_t spy_on_park(switch_core_session_t *session)
const char *moh = switch_channel_get_hold_music(channel);

while (switch_channel_ready(channel) && switch_channel_get_state(channel) == CS_PARK) {
switch_status_t status = SWITCH_STATUS_SUCCESS;
if (moh) {
switch_status_t status = switch_ivr_play_file(session, NULL, moh, NULL);
if (!SWITCH_READ_ACCEPTABLE(status)) {
break;
}
status = switch_ivr_play_file(session, NULL, moh, NULL);
} else {
status = switch_ivr_sleep(session, 10000, SWITCH_FALSE, NULL);
}
if (!SWITCH_READ_ACCEPTABLE(status)) {
break;
}
}
return SWITCH_STATUS_FALSE;
Expand Down

0 comments on commit e2da2e1

Please sign in to comment.