Index: app_externalivr.c =================================================================== --- app_externalivr.c (revision 223910) +++ app_externalivr.c (working copy) @@ -724,17 +724,17 @@ send_eivr_event(eivr_events, 'Z', NULL, chan); continue; } - if (ast_fileexists(&input[2], NULL, u->chan->language) == -1) { + if (ast_fileexists(&input[2], NULL, u->chan->language) == 0) { ast_chan_log(LOG_WARNING, chan, "Unknown file requested '%s'\n", &input[2]); - send_eivr_event(eivr_events, 'Z', NULL, chan); - strcpy(&input[2], "exception"); - } - entry = make_entry(&input[2]); - if (entry) { - AST_LIST_LOCK(&u->playlist); - AST_LIST_INSERT_TAIL(&u->playlist, entry, list); - AST_LIST_UNLOCK(&u->playlist); - } + send_eivr_event(eivr_events, 'Z', &input[2], chan); + } else { + entry = make_entry(&input[2]); + if (entry) { + AST_LIST_LOCK(&u->playlist); + AST_LIST_INSERT_TAIL(&u->playlist, entry, list); + AST_LIST_UNLOCK(&u->playlist); + } + } } else if (input[0] == 'G') { /* A get variable message: "G,variable1,variable2,..." */ char response[2048];