diff --git a/apps/app_system.c b/apps/app_system.c index 4bada66b23..b60e11c5a2 100644 --- a/apps/app_system.c +++ b/apps/app_system.c @@ -95,6 +95,8 @@ static int system_exec_helper(struct ast_channel *chan, void *data, int failmode u = ast_module_user_add(chan); + ast_autoservice_start(chan); + /* Do our thing here */ res = ast_safe_system((char *)data); if ((res < 0) && (errno != ECHILD)) { @@ -118,6 +120,8 @@ static int system_exec_helper(struct ast_channel *chan, void *data, int failmode res = 0; } + ast_autoservice_stop(chan); + ast_module_user_remove(u); return res;