diff --git a/apps/app_milliwatt.c b/apps/app_milliwatt.c index 89063096cd..e7312cd90d 100644 --- a/apps/app_milliwatt.c +++ b/apps/app_milliwatt.c @@ -36,6 +36,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/module.h" #include "asterisk/channel.h" #include "asterisk/pbx.h" +#include "asterisk/indications.h" static char *app = "Milliwatt"; @@ -133,19 +134,13 @@ static int old_milliwatt_exec(struct ast_channel *chan) static int milliwatt_exec(struct ast_channel *chan, void *data) { const char *options = data; - struct ast_app *playtones_app; int res = -1; if (!ast_strlen_zero(options) && strchr(options, 'o')) { return old_milliwatt_exec(chan); } - if (!(playtones_app = pbx_findapp("Playtones"))) { - ast_log(LOG_ERROR, "The Playtones application is required to run Milliwatt()\n"); - return -1; - } - - res = pbx_exec(chan, playtones_app, "1004/1000"); + res = ast_playtones_start(chan, 23255, "1004/1000", 0); while (!res) { res = ast_safe_sleep(chan, 10000);