put the channel in autoservice when executing func_shell
[asterisk/asterisk.git] / funcs / func_shell.c
index 668631a..9653fca 100644 (file)
@@ -49,6 +49,8 @@ static int shell_helper(struct ast_channel *chan, const char *cmd, char *data,
                return -1;
        }
 
+       ast_autoservice_start(chan);
+
        if (len >= 1) {
                FILE *ptr;
                char plbuff[4096];
@@ -60,6 +62,8 @@ static int shell_helper(struct ast_channel *chan, const char *cmd, char *data,
                pclose(ptr);
        }
 
+       ast_autoservice_stop(chan);
+
        return 0;
 }