--- apps/app_meetme.c 2007-10-24 11:09:12.000000000 +0100 +++ ../asterisk-meetme-concise/apps/app_meetme.c 2007-10-24 11:07:42.000000000 +0100 @@ -864,7 +864,7 @@ static char *complete_meetmecmd(const char *line, const char *word, int pos, int state) { - static char *cmds[] = {"lock", "unlock", "mute", "unmute", "kick", "list", NULL}; + static char *cmds[] = {"concise", "lock", "unlock", "mute", "unmute", "kick", "list", NULL}; int len = strlen(word); int which = 0; @@ -954,16 +954,19 @@ if (strlen(a->argv[i]) > 100) ast_cli(a->fd, "Invalid Arguments.\n"); } - if (a->argc == 1) { + if (a->argc == 1 || ( a->argc == 2 && !strcasecmp(a->argv[1], "concise") )) { /* 'MeetMe': List all the conferences */ + int concise = ( a->argc == 2 && !strcasecmp(a->argv[1], "concise") ); now = time(NULL); AST_LIST_LOCK(&confs); if (AST_LIST_EMPTY(&confs)) { - ast_cli(a->fd, "No active MeetMe conferences.\n"); + if (!concise) + ast_cli(a->fd, "No active MeetMe conferences.\n"); AST_LIST_UNLOCK(&confs); return CLI_SUCCESS; } - ast_cli(a->fd, header_format, "Conf Num", "Parties", "Marked", "Activity", "Creation", "Locked"); + if (!concise) + ast_cli(a->fd, header_format, "Conf Num", "Parties", "Marked", "Activity", "Creation", "Locked"); AST_LIST_TRAVERSE(&confs, cnf, list) { if (cnf->markedusers == 0) strcpy(cmdline, "N/A "); @@ -972,13 +975,22 @@ hr = (now - cnf->start) / 3600; min = ((now - cnf->start) % 3600) / 60; sec = (now - cnf->start) % 60; - - ast_cli(a->fd, data_format, cnf->confno, cnf->users, cmdline, hr, min, sec, cnf->isdynamic ? "Dynamic" : "Static", cnf->locked ? "Yes" : "No"); - + if (!concise) + ast_cli(a->fd, data_format, cnf->confno, cnf->users, cmdline, hr, min, sec, cnf->isdynamic ? "Dynamic" : "Static", cnf->locked ? "Yes" : "No"); + else + ast_cli(a->fd, "%s!%d!%d!%02d:%02d:%02d!%d!%d\n", + cnf->confno, + cnf->users, + cnf->markedusers, + hr, min, sec, + cnf->isdynamic, + cnf->locked); + total += cnf->users; } AST_LIST_UNLOCK(&confs); - ast_cli(a->fd, "* Total number of MeetMe users: %d\n", total); + if (!concise) + ast_cli(a->fd, "* Total number of MeetMe users: %d\n", total); return CLI_SUCCESS; } if (a->argc < 3)