aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_meetme.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-09-07 14:15:37 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-09-07 14:15:37 +0000
commitdad8943fab53dc91ea85e42bf7c12f835700ac69 (patch)
tree3b2fa268f66f2cd7ab317ec7d8cda927677c9be6 /apps/app_meetme.c
parentcd78f8ce8488ed6fe0a149a564aa4c5c82369c73 (diff)
reset channel volumes when exiting apps that use them
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6525 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_meetme.c')
-rwxr-xr-xapps/app_meetme.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/apps/app_meetme.c b/apps/app_meetme.c
index 89a96ac5b..95aaadd32 100755
--- a/apps/app_meetme.c
+++ b/apps/app_meetme.c
@@ -365,6 +365,14 @@ static void tweak_listen_volume(struct ast_conf_user *user, enum volume_action a
user->listen.actual = user->listen.desired;
}
+static void reset_volumes(struct ast_conf_user *user)
+{
+ signed char zero_volume = 0;
+
+ ast_channel_setoption(user->chan, AST_OPTION_TXGAIN, &zero_volume, sizeof(zero_volume), 0);
+ ast_channel_setoption(user->chan, AST_OPTION_RXGAIN, &zero_volume, sizeof(zero_volume), 0);
+}
+
static void adjust_volume(struct ast_frame *f, int vol)
{
int count;
@@ -1473,7 +1481,6 @@ zapretry:
close(fd);
else {
/* Take out of conference */
- /* Add us to the conference */
ztc.chan = 0;
ztc.confno = 0;
ztc.confmode = 0;
@@ -1482,6 +1489,8 @@ zapretry:
}
}
+ reset_volumes(user);
+
ast_mutex_lock(&conflock);
if (!(confflags & CONFFLAG_QUIET) && !(confflags & CONFFLAG_MONITOR) && !(confflags & CONFFLAG_ADMIN))
conf_play(chan, conf, LEAVE);
@@ -1502,16 +1511,16 @@ zapretry:
outrun:
ast_mutex_lock(&conflock);
- if (confflags & CONFFLAG_MONITORTALKER && dsp)
+ if (confflags & CONFFLAG_MONITORTALKER && dsp)
ast_dsp_free(dsp);
if (user->user_no) { /* Only cleanup users who really joined! */
manager_event(EVENT_FLAG_CALL, "MeetmeLeave",
- "Channel: %s\r\n"
- "Uniqueid: %s\r\n"
- "Meetme: %s\r\n"
- "Usernum: %d\r\n",
- chan->name, chan->uniqueid, conf->confno, user->user_no);
+ "Channel: %s\r\n"
+ "Uniqueid: %s\r\n"
+ "Meetme: %s\r\n"
+ "Usernum: %d\r\n",
+ chan->name, chan->uniqueid, conf->confno, user->user_no);
conf->users--;
if (confflags & CONFFLAG_MARKEDUSER)
conf->markedusers--;