Index: apps/app_meetme.c =================================================================== --- apps/app_meetme.c (revision 144636) +++ apps/app_meetme.c (working copy) @@ -352,6 +352,7 @@ #define MAX_CONFNUM 80 #define MAX_PIN 80 +#define OPTIONS_LEN 32 /*! \brief The MeetMe Conference object */ struct ast_conference { @@ -380,6 +381,9 @@ char pinadmin[MAX_PIN]; /*!< If protected by a admin PIN */ char uniqueid[32]; long endtime; /*!< When to end the conf if scheduled */ + char *useropts; /*!< RealTime user flags */ + char *adminopts; /*!< RealTime moderator flags */ + const char *bookid; /*!< Realtime conference id */ struct ast_frame *transframe[32]; struct ast_frame *origframe; struct ast_trans_pvt *transpath[32]; @@ -2737,8 +2741,7 @@ } static struct ast_conference *find_conf_realtime(struct ast_channel *chan, char *confno, int make, int dynamic, - char *dynamic_pin, size_t pin_buf_len, int refcount, struct ast_flags *confflags, - char *optargs[], int *too_early) + char *dynamic_pin, size_t pin_buf_len, int refcount, struct ast_flags *confflags, int *too_early) { struct ast_variable *var; struct ast_conference *cnf; @@ -2762,8 +2765,10 @@ struct timeval now; char currenttime[19] = ""; char eatime[19] = ""; - char useropts[32] = ""; - char adminopts[32] = ""; + char bookid[19] = ""; + char recordingtmp[AST_MAX_EXTENSION] = ""; + char useropts[OPTIONS_LEN]; /* Used for RealTime conferences */ + char adminopts[OPTIONS_LEN]; struct ast_tm tm, etm; struct timeval endtime = { .tv_sec = 0 }; @@ -2821,6 +2826,8 @@ pin = ast_strdupa(var->value); } else if (!strcasecmp(var->name, "adminpin")) { pinadmin = ast_strdupa(var->value); + } else if (!strcasecmp(var->name, "bookId")) { + ast_copy_string(bookid, var->value, sizeof(bookid)); } else if (!strcasecmp(var->name, "opts")) { ast_copy_string(useropts, var->value, sizeof(useropts)); } else if (!strcasecmp(var->name, "maxusers")) { @@ -2852,6 +2859,12 @@ cnf->maxusers = maxusers; cnf->endalert = endalert; cnf->endtime = endtime.tv_sec; + cnf->useropts = ast_strdup(useropts); + cnf->adminopts = ast_strdup(adminopts); + cnf->bookid = ast_strdup(bookid); + snprintf(recordingtmp, sizeof(recordingtmp), "%s/meetme/meetme-conf-rec-%s-%s", ast_config_AST_SPOOL_DIR, confno, bookid); + cnf->recordingfilename = ast_strdup(recordingtmp); + cnf->recordingformat = ast_strdup("wav"); } } @@ -3176,7 +3189,7 @@ if (!cnf) { int too_early = 0; cnf = find_conf_realtime(chan, confno, 1, dynamic, - the_pin, sizeof(the_pin), 1, &confflags, optargs, &too_early); + the_pin, sizeof(the_pin), 1, &confflags,&too_early); if (rt_schedule && too_early) allowretry = 0; } @@ -3212,8 +3225,16 @@ !strcasecmp(pin, cnf->pinadmin))) { /* Pin correct */ allowretry = 0; - if (!ast_strlen_zero(cnf->pinadmin) && !strcasecmp(pin, cnf->pinadmin)) + if (!ast_strlen_zero(cnf->pinadmin) && !strcasecmp(pin, cnf->pinadmin)) { + if(!ast_strlen_zero(cnf->adminopts)) { +ast_app_parse_options(meetme_opts, &confflags, optargs, cnf->adminopts); + } ast_set_flag(&confflags, CONFFLAG_ADMIN); + } else { + if(!ast_strlen_zero(cnf->useropts)) { +ast_app_parse_options(meetme_opts, &confflags, optargs, cnf->useropts); + } + } /* Run the conference */ res = conf_run(chan, cnf, confflags.flags, optargs); break;