Index: apps/app_meetme.c =================================================================== --- apps/app_meetme.c (revision 32601) +++ apps/app_meetme.c (working copy) @@ -287,6 +287,7 @@ const char *recordingformat; /*!< Format to record the Conference in */ char pin[AST_MAX_EXTENSION]; /*!< If protected by a PIN */ char pinadmin[AST_MAX_EXTENSION]; /*!< If protected by a admin PIN */ + char uniqueid[32]; /*!< Unique ID of channel that created the conf */ struct ast_frame *transframe[32]; struct ast_frame *origframe; struct ast_trans_pvt *transpath[32]; @@ -506,7 +507,7 @@ ast_autoservice_stop(chan); } -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, struct ast_channel *chan) { struct ast_conference *cnf; struct zt_confinfo ztc; @@ -526,6 +527,7 @@ 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->refcount = 0; cnf->markedusers = 0; cnf->chan = ast_request("zap", AST_FORMAT_SLINEAR, "pseudo", NULL); @@ -973,6 +975,9 @@ 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)); @@ -1789,7 +1794,7 @@ } 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) { @@ -1845,9 +1850,9 @@ if (ast_app_getdata(chan, "conf-getpin", dynamic_pin, AST_MAX_EXTENSION - 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 */ @@ -1869,7 +1874,7 @@ cnf = build_conf(args.confno, S_OR(args.pin, ""), S_OR(args.pinadmin, ""), - make, dynamic, refcount); + make, dynamic, refcount, chan); break; } }