Index: main/indications.c =================================================================== --- main/indications.c (revision 178204) +++ main/indications.c (working copy) @@ -374,14 +374,20 @@ d.nitems++; } - if (ast_activate_generator(chan, &playtones, &d)) { + if (d.nitems) { + if (ast_activate_generator(chan, &playtones, &d)) { + ast_free(d.items); + return -1; + } + return 0; + } else { + ast_log(LOG_ERROR, "No valid tone parts\n"); ast_free(d.items); return -1; } - - return 0; } + void ast_playtones_stop(struct ast_channel *chan) { ast_deactivate_generator(chan);