diff options
author | Joshua Colp <jcolp@digium.com> | 2006-05-31 17:21:12 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2006-05-31 17:21:12 +0000 |
commit | a74ebe59339654fab34e96c1d7499be70244217b (patch) | |
tree | 035b4d95d732f44129acdf55505d4679306378fe /apps/app_meetme.c | |
parent | bb7dd96cfeebec49a6adbed0c44ef92896fca2c1 (diff) |
Make the user menu unmute/mute work again, including in combination with the 'l' option.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_meetme.c')
-rw-r--r-- | apps/app_meetme.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/apps/app_meetme.c b/apps/app_meetme.c index 6c6b2d3f4..15c9d6642 100644 --- a/apps/app_meetme.c +++ b/apps/app_meetme.c @@ -702,7 +702,7 @@ static int conf_cmd(int fd, int argc, char **argv) { S_OR(user->chan->cid.cid_name, "<no name>"), user->chan->name, user->userflags & CONFFLAG_ADMIN ? "(Admin)" : "", - user->userflags & CONFFLAG_MONITOR ? "(Listen only)" : "", + user->adminflags & ADMINFLAG_SELFMUTED ? "(Listen only)" : "", user->adminflags & ADMINFLAG_MUTED ? "(Admin Muted)" : "", istalking(user->talking), hr, min, sec); else @@ -712,7 +712,7 @@ static int conf_cmd(int fd, int argc, char **argv) { S_OR(user->chan->cid.cid_name, ""), user->chan->name, user->userflags & CONFFLAG_ADMIN ? "1" : "", - user->userflags & CONFFLAG_MONITOR ? "1" : "", + user->adminflags & ADMINFLAG_SELFMUTED ? "1" : "", user->adminflags & ADMINFLAG_MUTED ? "1" : "", user->talking, hr, min, sec); @@ -964,7 +964,11 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c user->chan = chan; user->userflags = confflags; - user->adminflags = (confflags & CONFFLAG_STARTMUTED) ? ADMINFLAG_MUTED : 0; + user->adminflags = 0; + if (confflags & CONFFLAG_STARTMUTED) + user->adminflags |= ADMINFLAG_MUTED; + if (confflags & CONFFLAG_MONITOR) + user->adminflags |= ADMINFLAG_SELFMUTED; user->talking = -1; conf->users++; /* Update table */ @@ -1376,7 +1380,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c user->zapchannel = !retryzap; goto zapretry; } - if ((confflags & CONFFLAG_MONITOR) || (user->adminflags & ADMINFLAG_MUTED)) + if ((user->adminflags & ADMINFLAG_SELFMUTED) || (user->adminflags & ADMINFLAG_MUTED)) f = ast_read_noaudio(c); else f = ast_read(c); @@ -1556,12 +1560,18 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c /* they can't override the admin mute state */ if (user->adminflags & (ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED)) { + ztc.confmode = ZT_CONF_CONF | ZT_CONF_LISTENER; if (!ast_streamfile(chan, "conf-muted", chan->language)) ast_waitstream(chan, ""); } else { + ztc.confmode = ZT_CONF_CONF | ZT_CONF_TALKER | ZT_CONF_LISTENER; if (!ast_streamfile(chan, "conf-unmuted", chan->language)) ast_waitstream(chan, ""); } + if (ioctl(fd, ZT_SETCONF, &ztc)) { + ast_log(LOG_WARNING, "Error setting conference - Un/Mute\n"); + ret = -1; + } break; case '4': tweak_listen_volume(user, VOL_DOWN); @@ -1614,7 +1624,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c fr.data = buf; fr.offset = AST_FRIENDLY_OFFSET; if (!user->listen.actual && - ((confflags & CONFFLAG_MONITOR) || + ((user->adminflags & ADMINFLAG_SELFMUTED) || (user->adminflags & ADMINFLAG_MUTED) || (!user->talking && (confflags & CONFFLAG_OPTIMIZETALKER)) )) { |