mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-15 11:29:56 +00:00
FS-4711 --resolve this looks fine to me
This commit is contained in:
parent
b4c621530f
commit
188e0bd333
@ -8571,6 +8571,7 @@ static void kickall_matching_var(conference_obj_t *conference, const char *var,
|
|||||||
|
|
||||||
static void call_setup_event_handler(switch_event_t *event)
|
static void call_setup_event_handler(switch_event_t *event)
|
||||||
{
|
{
|
||||||
|
switch_status_t status = SWITCH_STATUS_FALSE;
|
||||||
conference_obj_t *conference = NULL;
|
conference_obj_t *conference = NULL;
|
||||||
char *conf = switch_event_get_header(event, "Target-Component");
|
char *conf = switch_event_get_header(event, "Target-Component");
|
||||||
char *domain = switch_event_get_header(event, "Target-Domain");
|
char *domain = switch_event_get_header(event, "Target-Domain");
|
||||||
@ -8592,7 +8593,10 @@ static void call_setup_event_handler(switch_event_t *event)
|
|||||||
char *expanded = NULL, *ostr = dial_str;;
|
char *expanded = NULL, *ostr = dial_str;;
|
||||||
|
|
||||||
if (!strcasecmp(action, "call")) {
|
if (!strcasecmp(action, "call")) {
|
||||||
|
if((conference->max_members > 0) && (conference->count >= conference->max_members)) {
|
||||||
|
// Conference member limit has been reached; do not proceed with setup request
|
||||||
|
status = SWITCH_STATUS_FALSE;
|
||||||
|
} else {
|
||||||
if (switch_event_create_plain(&var_event, SWITCH_EVENT_CHANNEL_DATA) != SWITCH_STATUS_SUCCESS) {
|
if (switch_event_create_plain(&var_event, SWITCH_EVENT_CHANNEL_DATA) != SWITCH_STATUS_SUCCESS) {
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
@ -8619,23 +8623,32 @@ static void call_setup_event_handler(switch_event_t *event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
conference_outcall_bg(conference, NULL, NULL, ostr, 60, NULL, NULL, NULL, NULL, NULL, NULL, &var_event);
|
status = conference_outcall_bg(conference, NULL, NULL, ostr, 60, NULL, NULL, NULL, NULL, NULL, NULL, &var_event);
|
||||||
|
|
||||||
if (expanded && expanded != conference->outcall_templ) {
|
if (expanded && expanded != conference->outcall_templ) {
|
||||||
switch_safe_free(expanded);
|
switch_safe_free(expanded);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} else if (!strcasecmp(action, "end")) {
|
} else if (!strcasecmp(action, "end")) {
|
||||||
//switch_core_session_hupall_matching_var("conference_call_key", key, SWITCH_CAUSE_NORMAL_CLEARING);
|
//switch_core_session_hupall_matching_var("conference_call_key", key, SWITCH_CAUSE_NORMAL_CLEARING);
|
||||||
kickall_matching_var(conference, "conference_call_key", key);
|
kickall_matching_var(conference, "conference_call_key", key);
|
||||||
|
status = SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_safe_free(key);
|
switch_safe_free(key);
|
||||||
|
} else { // Conference found but doesn't support referral.
|
||||||
|
status = SWITCH_STATUS_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
switch_thread_rwlock_unlock(conference->rwlock);
|
switch_thread_rwlock_unlock(conference->rwlock);
|
||||||
} else { // Couldn't find associated conference. Indicate failure on refer subscription
|
} else { // Couldn't find associated conference. Indicate failure on refer subscription
|
||||||
|
status = SWITCH_STATUS_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(status != SWITCH_STATUS_SUCCESS) {
|
||||||
|
// Unable to setup call, need to generate final NOTIFY
|
||||||
if (switch_event_create(&event, SWITCH_EVENT_CONFERENCE_DATA) == SWITCH_STATUS_SUCCESS) {
|
if (switch_event_create(&event, SWITCH_EVENT_CONFERENCE_DATA) == SWITCH_STATUS_SUCCESS) {
|
||||||
event->flags |= EF_UNIQ_HEADERS;
|
event->flags |= EF_UNIQ_HEADERS;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user