From: Anthony Minessale Date: Tue, 21 May 2013 15:04:35 +0000 (-0500) Subject: FS-5376 --resolve X-Git-Tag: v1.2.13~357 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2da2e19c308277918c52a802b30cdd9f49cd205;p=thirdparty%2Ffreeswitch.git FS-5376 --resolve --- diff --git a/src/mod/applications/mod_spy/mod_spy.c b/src/mod/applications/mod_spy/mod_spy.c index a5cb3c92c0..f0d8b3550b 100644 --- a/src/mod/applications/mod_spy/mod_spy.c +++ b/src/mod/applications/mod_spy/mod_spy.c @@ -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;