diff --git a/channels/chan_console.c b/channels/chan_console.c index 6c566e9c9e9b0829ab670a8537619aaeee8db5ff..9d68e9f5273df18beaef24f198996d75284d4a76 100644 --- a/channels/chan_console.c +++ b/channels/chan_console.c @@ -1196,7 +1196,7 @@ static char *cli_console_active(struct ast_cli_entry *e, int cmd, struct ast_cli return CLI_SUCCESS; } - if (!(pvt = find_pvt(a->argv[e->args]))) { + if (!(pvt = find_pvt(a->argv[e->args - 1]))) { ast_cli(a->fd, "Could not find a device called '%s'.\n", a->argv[e->args]); return CLI_FAILURE; }