mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-13 16:21:01 +00:00
Remove possibility of sending duplicate MeetmeJoin manager events, and only send a MeetmeLeave event if a MeetmeJoin event occured in the first place. (issue #6599 reported by imran - provided patch with few tiny mods)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -883,6 +883,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
|
|||||||
int using_pseudo = 0;
|
int using_pseudo = 0;
|
||||||
int duration=20;
|
int duration=20;
|
||||||
int hr, min, sec;
|
int hr, min, sec;
|
||||||
|
int sent_event = 0;
|
||||||
time_t now;
|
time_t now;
|
||||||
struct ast_dsp *dsp=NULL;
|
struct ast_dsp *dsp=NULL;
|
||||||
struct ast_app *app;
|
struct ast_app *app;
|
||||||
@@ -1135,12 +1136,15 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
|
|||||||
}
|
}
|
||||||
ast_log(LOG_DEBUG, "Placed channel %s in ZAP conf %d\n", chan->name, conf->zapconf);
|
ast_log(LOG_DEBUG, "Placed channel %s in ZAP conf %d\n", chan->name, conf->zapconf);
|
||||||
|
|
||||||
|
if (!sent_event) {
|
||||||
manager_event(EVENT_FLAG_CALL, "MeetmeJoin",
|
manager_event(EVENT_FLAG_CALL, "MeetmeJoin",
|
||||||
"Channel: %s\r\n"
|
"Channel: %s\r\n"
|
||||||
"Uniqueid: %s\r\n"
|
"Uniqueid: %s\r\n"
|
||||||
"Meetme: %s\r\n"
|
"Meetme: %s\r\n"
|
||||||
"Usernum: %d\r\n",
|
"Usernum: %d\r\n",
|
||||||
chan->name, chan->uniqueid, conf->confno, user->user_no);
|
chan->name, chan->uniqueid, conf->confno, user->user_no);
|
||||||
|
sent_event = 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (!firstpass && !(confflags & CONFFLAG_MONITOR) && !(confflags & CONFFLAG_ADMIN)) {
|
if (!firstpass && !(confflags & CONFFLAG_MONITOR) && !(confflags & CONFFLAG_ADMIN)) {
|
||||||
firstpass = 1;
|
firstpass = 1;
|
||||||
@@ -1693,6 +1697,7 @@ bailoutandtrynormal:
|
|||||||
min = ((now - user->jointime) % 3600) / 60;
|
min = ((now - user->jointime) % 3600) / 60;
|
||||||
sec = (now - user->jointime) % 60;
|
sec = (now - user->jointime) % 60;
|
||||||
|
|
||||||
|
if (sent_event) {
|
||||||
manager_event(EVENT_FLAG_CALL, "MeetmeLeave",
|
manager_event(EVENT_FLAG_CALL, "MeetmeLeave",
|
||||||
"Channel: %s\r\n"
|
"Channel: %s\r\n"
|
||||||
"Uniqueid: %s\r\n"
|
"Uniqueid: %s\r\n"
|
||||||
@@ -1706,6 +1711,7 @@ bailoutandtrynormal:
|
|||||||
S_OR(user->chan->cid.cid_num, "<unknown>"),
|
S_OR(user->chan->cid.cid_num, "<unknown>"),
|
||||||
S_OR(user->chan->cid.cid_name, "<unknown>"),
|
S_OR(user->chan->cid.cid_name, "<unknown>"),
|
||||||
(now - user->jointime));
|
(now - user->jointime));
|
||||||
|
}
|
||||||
|
|
||||||
conf->users--;
|
conf->users--;
|
||||||
conf->refcount--;
|
conf->refcount--;
|
||||||
|
Reference in New Issue
Block a user