const char *recordingformat; /*!< Format to record the Conference in */
char pin[MAX_PIN]; /*!< If protected by a PIN */
char pinadmin[MAX_PIN]; /*!< If protected by a admin PIN */
+ char uniqueid[32];
struct ast_frame *transframe[32];
struct ast_frame *origframe;
struct ast_trans_pvt *transpath[32];
* \return A pointer to the conference struct, or NULL if it wasn't found and
* make or dynamic were not set.
*/
-static struct ast_conference *build_conf(char *confno, char *pin, char *pinadmin, int make, int dynamic, int refcount)
+static struct ast_conference *build_conf(char *confno, char *pin, char *pinadmin, int make, int dynamic, int refcount, const struct ast_channel *chan)
{
struct ast_conference *cnf;
struct zt_confinfo ztc = { 0, };
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));
+ ast_copy_string(cnf->uniqueid, chan->uniqueid, sizeof(cnf->uniqueid));
cnf->chan = ast_request("zap", AST_FORMAT_SLINEAR, "pseudo", NULL);
if (cnf->chan) {
ast_set_read_format(cnf->chan, AST_FORMAT_SLINEAR);
ast_mutex_unlock(&conf->playlock);
+ /* return the unique ID of the conference */
+ pbx_builtin_setvar_helper(chan, "MEETMEUNIQUEID", conf->uniqueid);
+
if (confflags & CONFFLAG_EXIT_CONTEXT) {
if ((agifile = pbx_builtin_getvar_helper(chan, "MEETME_EXIT_CONTEXT")))
ast_copy_string(exitcontext, agifile, sizeof(exitcontext));
}
ast_variables_destroy(var);
- cnf = build_conf(confno, pin ? pin : "", pinadmin ? pinadmin : "", make, dynamic, refcount);
+ cnf = build_conf(confno, pin ? pin : "", pinadmin ? pinadmin : "", make, dynamic, refcount, chan);
}
if (cnf) {
if (ast_app_getdata(chan, "conf-getpin", dynamic_pin, pin_buf_len - 1, 0) < 0)
return NULL;
}
- cnf = build_conf(confno, dynamic_pin, "", make, dynamic, refcount);
+ cnf = build_conf(confno, dynamic_pin, "", make, dynamic, refcount, chan);
} else {
- cnf = build_conf(confno, "", "", make, dynamic, refcount);
+ cnf = build_conf(confno, "", "", make, dynamic, refcount, chan);
}
} else {
/* Check the config */
cnf = build_conf(args.confno,
S_OR(args.pin, ""),
S_OR(args.pinadmin, ""),
- make, dynamic, refcount);
+ make, dynamic, refcount, chan);
break;
}
}
ast_set_flag(&conf_flags,
CONFFLAG_QUIET | CONFFLAG_MARKEDEXIT | CONFFLAG_PASS_DTMF | CONFFLAG_SLA_STATION);
ast_answer(trunk_ref->chan);
- conf = build_conf(conf_name, "", "", 0, 0, 1);
+ conf = build_conf(conf_name, "", "", 0, 0, 1, trunk_ref->chan);
if (conf) {
conf_run(trunk_ref->chan, conf, conf_flags.flags, NULL);
dispose_conf(conf);
ast_set_flag(&conf_flags,
CONFFLAG_QUIET | CONFFLAG_MARKEDEXIT | CONFFLAG_MARKEDUSER |
CONFFLAG_PASS_DTMF | CONFFLAG_SLA_TRUNK);
- conf = build_conf(conf_name, "", "", 1, 1, 1);
+ conf = build_conf(conf_name, "", "", 1, 1, 1, trunk_ref->trunk->chan);
ast_mutex_lock(args->cond_lock);
ast_cond_signal(args->cond);
ast_set_flag(&conf_flags,
CONFFLAG_QUIET | CONFFLAG_MARKEDEXIT | CONFFLAG_PASS_DTMF | CONFFLAG_SLA_STATION);
ast_answer(chan);
- conf = build_conf(conf_name, "", "", 0, 0, 1);
+ conf = build_conf(conf_name, "", "", 0, 0, 1, chan);
if (conf) {
conf_run(chan, conf, conf_flags.flags, NULL);
dispose_conf(conf);
}
snprintf(conf_name, sizeof(conf_name), "SLA_%s", trunk_name);
- conf = build_conf(conf_name, "", "", 1, 1, 1);
+ conf = build_conf(conf_name, "", "", 1, 1, 1, chan);
if (!conf) {
pbx_builtin_setvar_helper(chan, "SLATRUNK_STATUS", "FAILURE");
return 0;