mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-13 00:04:53 +00:00
res_parking: Dynamic Parking Lots
(closes issue ASTERISK-21644) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2615/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -66,6 +66,7 @@ static void display_parking_lot(struct parking_lot *lot, int fd)
|
||||
ast_cli(fd, "Comeback Dial Time : %u sec\n", lot->cfg->comebackdialtime);
|
||||
ast_cli(fd, "MusicOnHold Class : %s\n", lot->cfg->mohclass);
|
||||
ast_cli(fd, "Enabled : %s\n", (lot->mode == PARKINGLOT_DISABLED) ? "no" : "yes");
|
||||
ast_cli(fd, "Dynamic : %s\n", (lot->mode == PARKINGLOT_DYNAMIC) ? "yes" : "no");
|
||||
ast_cli(fd, "\n");
|
||||
}
|
||||
|
||||
@@ -102,6 +103,14 @@ static void cli_display_parking_lot(int fd, const char *name)
|
||||
ast_cli(fd, "\n");
|
||||
}
|
||||
|
||||
static void cli_display_parking_global(int fd)
|
||||
{
|
||||
ast_cli(fd, "Parking General Options\n"
|
||||
"-----------------------\n");
|
||||
ast_cli(fd, "Dynamic Parking : %s\n", parking_dynamic_lots_enabled() ? "yes" : "no");
|
||||
ast_cli(fd, "\n");
|
||||
}
|
||||
|
||||
static void cli_display_parking_lot_list(int fd)
|
||||
{
|
||||
struct ao2_container *lot_container;
|
||||
@@ -172,6 +181,7 @@ static char *handle_show_parking_lot_cmd(struct ast_cli_entry *e, int cmd, struc
|
||||
ast_cli(a->fd, "\n");
|
||||
|
||||
if (a->argc == 2) {
|
||||
cli_display_parking_global(a->fd);
|
||||
cli_display_parking_lot_list(a->fd);
|
||||
return CLI_SUCCESS;
|
||||
}
|
||||
|
Reference in New Issue
Block a user