aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-03-03 23:33:11 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-03-03 23:33:11 +0000
commit5e71843a4f30df48110c356764cbf5c3b530df72 (patch)
treeb514fbc0d65ca3aaf12d927f9a44b07585be74bd /apps
parentb072adc139c53438fdb1854c345faca05e4085aa (diff)
Flush MeetMe at appropriate times (bug #3599)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5131 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rwxr-xr-xapps/app_meetme.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/apps/app_meetme.c b/apps/app_meetme.c
index c1b1a215c..269e6c5ea 100755
--- a/apps/app_meetme.c
+++ b/apps/app_meetme.c
@@ -536,6 +536,16 @@ static int confnonzero(void *ptr)
return res;
}
+static void conf_flush(int fd)
+{
+ int x;
+ x = ZT_FLUSH_ALL;
+ if (ioctl(fd, ZT_FLUSH, x)) {
+ ast_log(LOG_WARNING, "Error flushing channel\n");
+ close(fd);
+ }
+}
+
static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int confflags)
{
struct ast_conference *prev=NULL, *cur;
@@ -785,6 +795,7 @@ zapretry:
ast_mutex_unlock(&conflock);
goto outrun;
}
+ conf_flush(fd);
ast_log(LOG_DEBUG, "Placed channel %s in ZAP conf %d\n", chan->name, conf->zapconf);
manager_event(EVENT_FLAG_CALL, "MeetmeJoin",
@@ -960,6 +971,15 @@ zapretry:
ret = 0;
break;
} else if (((f->frametype == AST_FRAME_DTMF) && (f->subclass == '*') && (confflags & CONFFLAG_STARMENU)) || ((f->frametype == AST_FRAME_DTMF) && menu_active)) {
+ int oldconfmode = 0;
+ oldconfmode = ztc.confmode;
+ ztc.confmode = 0;
+ if (ioctl(fd, ZT_SETCONF, &ztc)) {
+ ast_log(LOG_WARNING, "Error setting conference\n");
+ close(fd);
+ ast_mutex_unlock(&conflock);
+ goto outrun;
+ }
if (musiconhold) {
ast_moh_stop(chan);
}
@@ -1075,6 +1095,14 @@ zapretry:
if (musiconhold) {
ast_moh_start(chan, NULL);
}
+ ztc.confmode = oldconfmode;
+ if (ioctl(fd, ZT_SETCONF, &ztc)) {
+ ast_log(LOG_WARNING, "Error setting conference\n");
+ close(fd);
+ ast_mutex_unlock(&conflock);
+ goto outrun;
+ }
+ conf_flush(fd);
} else if (option_debug) {
ast_log(LOG_DEBUG, "Got unrecognized frame on channel %s, f->frametype=%d,f->subclass=%d\n",chan->name,f->frametype,f->subclass);
}