static int milliwatt_exec(struct ast_channel *chan, void *data)
{
const char *options = data;
- struct ast_app *playtones_app, *wait_app;
+ struct ast_app *playtones_app;
struct ast_module_user *u;
int res = -1;
goto exit_app;
}
- if (!(wait_app = pbx_findapp("Wait"))) {
- ast_log(LOG_ERROR, "The Wait application is required to run Milliwatt()\n");
- goto exit_app;
- }
-
- res = pbx_exec(chan, playtones_app, "1004,1000");
+ res = pbx_exec(chan, playtones_app, "1004/1000");
while (!res) {
- res = pbx_exec(chan, wait_app, "3600");
+ res = ast_safe_sleep(chan, 10000);
}
res = 0;