" 'p' -- allow user to exit the conference by pressing '#'\n"
" 's' -- send user to admin/user menu if '*' is received\n"
" 't' -- set talk only mode\n"
+" 'd' -- dynamically add conference\n"
" 'v' -- video mode\n"
" 'q' -- quiet mode (don't play enter/leave sounds)\n"
" 'b' -- run AGI script specified in ${MEETME_AGI_BACKGROUND} (Zap channels only)\n"
return ret;
}
-static struct conf *find_conf(char *confno, int make)
+static struct conf *find_conf(char *confno, int make, int dynamic)
{
struct ast_config *cfg;
struct ast_variable *var;
var = var->next;
}
if (!var) {
- ast_log(LOG_DEBUG, "%s isn't a valid conference\n", confno);
+ if (dynamic) {
+ ast_log(LOG_DEBUG, "Using dynamic conference '%s'\n", confno);
+ cnf = build_conf(confno, make);
+ } else
+ ast_log(LOG_DEBUG, "%s isn't a valid conference\n", confno);
}
ast_destroy(cfg);
return cnf;
LOCAL_USER_ADD(u);
strcpy(localdata,data);
confnum = strsep(&localdata,"|");
- conf = find_conf(confnum, 0);
+ conf = find_conf(confnum, 0, 1);
if (conf)
cnt = conf->users;
else
int retrycnt = 0;
struct conf *cnf;
int confflags = 0;
+ int dynamic = 0;
char info[256], *ptr, *inflags, *inpin;
confflags |= CONFFLAG_QUIET;
if (strchr(inflags, 'b'))
confflags |= CONFFLAG_AGI;
+ if (strchr(inflags, 'd'))
+ dynamic = 1;
inpin = strchr(inflags, '|');
}
if (strlen(confno)) {
/* Check the validity of the conference */
- cnf = find_conf(confno, 1);
+ cnf = find_conf(confno, 1, dynamic);
if (!cnf) {
res = ast_streamfile(chan, "conf-invalid", chan->language);
if (res < 0)