summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Murphy <murf@digium.com>2007-07-26 01:13:07 +0000
committerSteve Murphy <murf@digium.com>2007-07-26 01:13:07 +0000
commit0f326a83c5c3991ed8c0ed26be464b04a60a6c3a (patch)
tree13e80409e85c2f4f130df7229e7027710c386940
parent1c783e8cfbd321fa82da35c3fcd9d7b9df861d5b (diff)
Merged revisions 77191 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r77191 | murf | 2007-07-25 16:39:27 -0600 (Wed, 25 Jul 2007) | 1 line This fix solves problem with intense squelch noise when someone joins conf in bug 9430; We repro'd the problem with meetme opts of 'CciMo'; Josh Colp supplied this patch, and I'm applying it. It looks like playing the recorded username will louse up the next thing played into the channel. Josh rearranged the code so as to start things over before playing data directly into the conference. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77217 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--apps/app_meetme.c52
1 files changed, 31 insertions, 21 deletions
diff --git a/apps/app_meetme.c b/apps/app_meetme.c
index 70d00cbc2..207ddf61a 100644
--- a/apps/app_meetme.c
+++ b/apps/app_meetme.c
@@ -786,38 +786,45 @@ static struct ast_conference *build_conf(char *confno, char *pin, char *pinadmin
ast_copy_string(cnf->pin, pin, sizeof(cnf->pin));
ast_copy_string(cnf->pinadmin, pinadmin, sizeof(cnf->pinadmin));
ast_copy_string(cnf->uniqueid, chan->uniqueid, sizeof(cnf->uniqueid));
+
+ /* Setup a new zap conference */
+ ztc.confno = -1;
+ ztc.confmode = ZT_CONF_CONFANN | ZT_CONF_CONFANNMON;
+ cnf->fd = open("/dev/zap/pseudo", O_RDWR);
+ if (cnf->fd < 0 || ioctl(cnf->fd, ZT_SETCONF, &ztc)) {
+ ast_log(LOG_WARNING, "Unable to open pseudo device\n");
+ if (cnf->fd >= 0)
+ close(cnf->fd);
+ free(cnf);
+ cnf = NULL;
+ goto cnfout;
+ }
+
+ cnf->zapconf = ztc.confno;
+
+ /* Setup a new channel for playback of audio files */
cnf->chan = ast_request("zap", AST_FORMAT_SLINEAR, "pseudo", NULL);
if (cnf->chan) {
ast_set_read_format(cnf->chan, AST_FORMAT_SLINEAR);
ast_set_write_format(cnf->chan, AST_FORMAT_SLINEAR);
- cnf->fd = cnf->chan->fds[0]; /* for use by conf_play() */
- } else {
- ast_log(LOG_WARNING, "Unable to open pseudo channel - trying device\n");
- cnf->fd = open("/dev/zap/pseudo", O_RDWR);
- if (cnf->fd < 0) {
- ast_log(LOG_WARNING, "Unable to open pseudo device\n");
+ ztc.chan = 0;
+ ztc.confno = cnf->zapconf;
+ ztc.confmode = ZT_CONF_CONFANN | ZT_CONF_CONFANNMON;
+ if (ioctl(cnf->chan->fds[0], ZT_SETCONF, &ztc)) {
+ ast_log(LOG_WARNING, "Error setting conference\n");
+ if (cnf->chan)
+ ast_hangup(cnf->chan);
+ else
+ close(cnf->fd);
+
ast_free(cnf);
cnf = NULL;
goto cnfout;
}
}
-
- /* Setup a new zap conference */
- ztc.confno = -1;
- ztc.confmode = ZT_CONF_CONFANN | ZT_CONF_CONFANNMON;
- if (ioctl(cnf->fd, ZT_SETCONF, &ztc)) {
- ast_log(LOG_WARNING, "Error setting conference\n");
- if (cnf->chan)
- ast_hangup(cnf->chan);
- else
- close(cnf->fd);
- ast_free(cnf);
- cnf = NULL;
- goto cnfout;
- }
+
/* Fill the conference struct */
cnf->start = time(NULL);
- cnf->zapconf = ztc.confno;
cnf->isdynamic = dynamic ? 1 : 0;
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Created MeetMe conference %d for conference '%s'\n", cnf->zapconf, cnf->confno);
@@ -2404,8 +2411,10 @@ static struct ast_conference *find_conf(struct ast_channel *chan, char *confno,
);
/* Check first in the conference list */
+ ast_log(LOG_NOTICE,"The requested confno is '%s'?\n", confno);
AST_LIST_LOCK(&confs);
AST_LIST_TRAVERSE(&confs, cnf, list) {
+ ast_log(LOG_NOTICE,"Does conf %s match %s?\n", confno, cnf->confno);
if (!strcmp(confno, cnf->confno))
break;
}
@@ -2443,6 +2452,7 @@ static struct ast_conference *find_conf(struct ast_channel *chan, char *confno,
return NULL;
AST_NONSTANDARD_APP_ARGS(args, parse, ',');
+ ast_log(LOG_NOTICE,"Will conf %s match %s?\n", confno, args.confno);
if (!strcasecmp(args.confno, confno)) {
/* Bingo it's a valid conference */
cnf = build_conf(args.confno,