[asterisk-dev] murf: branch 1.4 r77191 - /branches/1.4/apps/app_meetme.c
Tony Mountifield
tony at softins.clara.co.uk
Thu Jul 26 03:35:57 CDT 2007
In article <20070725223928.80D29A9D91C at lists.digium.internal>,
SVN commits to the Digium repositories <svn-commits at lists.digium.com> wrote:
> Author: murf
> Date: Wed Jul 25 17:39:27 2007
> New Revision: 77191
>
> URL: http://svn.digium.com/view/asterisk?view=rev&rev=77191
> Log:
> 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.
It looks to me like the new code is creating an additional /dev/zap/pseudo
channel into the conference purely for playing the raw enter/leave sounds.
I have heard the described effect too. I suspect it is due to the conf's
pseudo device having been switched to slinear mode, but then the raw data
of the enter/leave sound is still written in uLaw format.
I suspect a better approach in the longer term may be to check or reset
the channel format on the original pseudo device before playing the
enter/leave sounds. Just a thought.
Cheers
Tony
> Modified:
> branches/1.4/apps/app_meetme.c
>
> Modified: branches/1.4/apps/app_meetme.c
> URL:
> http://svn.digium.com/view/asterisk/branches/1.4/apps/app_meetme.c?view=diff&rev=77191&r1=77190&r2=77191
> ==============================================================================
> --- branches/1.4/apps/app_meetme.c (original)
> +++ branches/1.4/apps/app_meetme.c Wed Jul 25 17:39:27 2007
> @@ -761,38 +761,44 @@
> ast_copy_string(cnf->confno, confno, sizeof(cnf->confno));
> ast_copy_string(cnf->pin, pin, sizeof(cnf->pin));
> ast_copy_string(cnf->pinadmin, pinadmin, sizeof(cnf->pinadmin));
> +
> + /* 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);
> 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);
> - 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);
>
>
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> svn-commits mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/svn-commits
>
--
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org
More information about the asterisk-dev
mailing list