Index: apps/app_meetme.c =================================================================== --- apps/app_meetme.c (revision 127753) +++ apps/app_meetme.c (working copy) @@ -1424,16 +1424,20 @@ if (confflags & CONFFLAG_RECORDCONF) { if (!conf->recordingfilename) { + ast_channel_lock(chan); conf->recordingfilename = pbx_builtin_getvar_helper(chan, "MEETME_RECORDINGFILE"); if (!conf->recordingfilename) { snprintf(recordingtmp, sizeof(recordingtmp), "meetme-conf-rec-%s-%s", conf->confno, chan->uniqueid); conf->recordingfilename = ast_strdupa(recordingtmp); - } + } + conf->recordingfilename = ast_strdupa(conf->recordingfilename); conf->recordingformat = pbx_builtin_getvar_helper(chan, "MEETME_RECORDINGFORMAT"); if (!conf->recordingformat) { snprintf(recordingtmp, sizeof(recordingtmp), "wav"); conf->recordingformat = ast_strdupa(recordingtmp); - } + } + conf->recordingformat = ast_strdupa(conf->recordingformat); + ast_channel_unlock(chan); ast_verbose(VERBOSE_PREFIX_4 "Starting recording of MeetMe Conference %s into file %s.%s.\n", conf->confno, conf->recordingfilename, conf->recordingformat); } @@ -1522,12 +1526,14 @@ ast_mutex_unlock(&conf->playlock); if (confflags & CONFFLAG_EXIT_CONTEXT) { + ast_channel_lock(chan); if ((agifile = pbx_builtin_getvar_helper(chan, "MEETME_EXIT_CONTEXT"))) ast_copy_string(exitcontext, agifile, sizeof(exitcontext)); else if (!ast_strlen_zero(chan->macrocontext)) ast_copy_string(exitcontext, chan->macrocontext, sizeof(exitcontext)); else ast_copy_string(exitcontext, chan->context, sizeof(exitcontext)); + ast_channel_unlock(chan); } if ( !(confflags & (CONFFLAG_QUIET | CONFFLAG_NOONLYPERSON)) ) { @@ -1711,10 +1717,13 @@ if (confflags & CONFFLAG_AGI) { /* Get name of AGI file to run from $(MEETME_AGI_BACKGROUND) or use default filename of conf-background.agi */ - + + ast_channel_lock(chan); agifile = pbx_builtin_getvar_helper(chan, "MEETME_AGI_BACKGROUND"); if (!agifile) agifile = agifiledefault; + agifile = ast_strdupa(agifile); + ast_channel_unlock(chan); if (user->zapchannel) { /* Set CONFMUTE mode on Zap channel to mute DTMF tones */