summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2003-07-14 04:21:00 +0000
committerMark Spencer <markster@digium.com>2003-07-14 04:21:00 +0000
commit94f7087311c3e585295194f96c525c17a4337d89 (patch)
tree5eb4d946c09176804486a4b5f397e137e42e822d
parent4e6c02b6add240cbc12785e5187f6b7d73ee2f41 (diff)
Add musiconhold definitions to show agents
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1181 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rwxr-xr-xchannels/chan_agent.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/channels/chan_agent.c b/channels/chan_agent.c
index e6c82d019..5031a35ad 100755
--- a/channels/chan_agent.c
+++ b/channels/chan_agent.c
@@ -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;