mirror of
https://github.com/asterisk/asterisk.git
synced 2026-06-09 03:45:27 +00:00
Add musiconhold definitions to show agents
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1181 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -718,6 +718,7 @@ static int agents_show(int fd, int argc, char **argv)
|
||||
char username[256];
|
||||
char location[256];
|
||||
char talkingto[256];
|
||||
char moh[256];
|
||||
|
||||
if (argc != 2)
|
||||
return RESULT_SHOWUSAGE;
|
||||
@@ -751,8 +752,10 @@ static int agents_show(int fd, int argc, char **argv)
|
||||
strcpy(location, "not logged in");
|
||||
strcpy(talkingto, "");
|
||||
}
|
||||
ast_cli(fd, "%-12.12s %s%s%s\n", p->agent,
|
||||
username, location, talkingto);
|
||||
if (strlen(p->moh))
|
||||
snprintf(moh, sizeof(moh), "(musiconhold is '%s')", p->moh);
|
||||
ast_cli(fd, "%-12.12s %s%s%s%s\n", p->agent,
|
||||
username, location, talkingto, moh);
|
||||
}
|
||||
ast_pthread_mutex_unlock(&p->lock);
|
||||
p = p->next;
|
||||
|
||||
Reference in New Issue
Block a user