Add 'kick all' capability to ConfBridge CLI command
This patch adds the ability to kick all users out of a conference from the ConfBridge kick CLI command. It is invoked by passing 'all' as the channel parameter to the CLI command, i.e., "confbridge kick <conf> all". Note that this patch was modified slightly to conform to trunk. (closes issue ASTERISK-21827) Reported by: dorianlogan patches: kickall-patch_v2.diff uploaded by dorianlogan (License 6504) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394531 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
parent
1623347817
commit
19d8f8c8e4
6
CHANGES
6
CHANGES
|
@ -26,6 +26,12 @@ AgentMonitorOutgoing
|
||||||
* Application removed. It was a holdover from when AgentCallbackLogin was
|
* Application removed. It was a holdover from when AgentCallbackLogin was
|
||||||
removed.
|
removed.
|
||||||
|
|
||||||
|
ConfBridge
|
||||||
|
------------------
|
||||||
|
* All participants in a bridge can now be kicked out of a conference room
|
||||||
|
by specifying the channel parameter as 'all' in the ConfBridge kick CLI
|
||||||
|
command, i.e., "confbridge kick <conference> all"
|
||||||
|
|
||||||
ForkCDR
|
ForkCDR
|
||||||
------------------
|
------------------
|
||||||
* ForkCDR no longer automatically resets the forked CDR. See the 'r' option
|
* ForkCDR no longer automatically resets the forked CDR. See the 'r' option
|
||||||
|
|
|
@ -2069,6 +2069,7 @@ int conf_handle_dtmf(struct ast_bridge_channel *bridge_channel,
|
||||||
|
|
||||||
static int kick_conference_participant(struct confbridge_conference *conference, const char *channel)
|
static int kick_conference_participant(struct confbridge_conference *conference, const char *channel)
|
||||||
{
|
{
|
||||||
|
int res = -1;
|
||||||
struct confbridge_user *user = NULL;
|
struct confbridge_user *user = NULL;
|
||||||
|
|
||||||
SCOPED_AO2LOCK(bridge_lock, conference);
|
SCOPED_AO2LOCK(bridge_lock, conference);
|
||||||
|
@ -2077,6 +2078,10 @@ static int kick_conference_participant(struct confbridge_conference *conference,
|
||||||
user->kicked = 1;
|
user->kicked = 1;
|
||||||
ast_bridge_remove(conference->bridge, user->chan);
|
ast_bridge_remove(conference->bridge, user->chan);
|
||||||
return 0;
|
return 0;
|
||||||
|
} else if (!strcasecmp("all", channel)) {
|
||||||
|
user->kicked = 1;
|
||||||
|
ast_bridge_remove(conference->bridge, user->chan);
|
||||||
|
res = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AST_LIST_TRAVERSE(&conference->waiting_list, user, list) {
|
AST_LIST_TRAVERSE(&conference->waiting_list, user, list) {
|
||||||
|
@ -2084,10 +2089,14 @@ static int kick_conference_participant(struct confbridge_conference *conference,
|
||||||
user->kicked = 1;
|
user->kicked = 1;
|
||||||
ast_bridge_remove(conference->bridge, user->chan);
|
ast_bridge_remove(conference->bridge, user->chan);
|
||||||
return 0;
|
return 0;
|
||||||
|
} else if (!strcasecmp("all", channel)) {
|
||||||
|
user->kicked = 1;
|
||||||
|
ast_bridge_remove(conference->bridge, user->chan);
|
||||||
|
res = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *complete_confbridge_name(const char *line, const char *word, int pos, int state)
|
static char *complete_confbridge_name(const char *line, const char *word, int pos, int state)
|
||||||
|
|
Loading…
Reference in New Issue