diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-31 17:21:12 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-31 17:21:12 +0000 |
commit | 88f656f5f5b815cc064d2e827e4c268d6385c7bc (patch) | |
tree | 035b4d95d732f44129acdf55505d4679306378fe /apps | |
parent | 1264d306ef99444c139d5467f47ae6bc50a296b2 (diff) |
Make the user menu unmute/mute work again, including in combination with the 'l' option.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@31076 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-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)) )) { |