don't do wrapup when agent is in nowait mode or call has ended
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13094 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
de3e190a0c
commit
26e84c8713
|
@ -995,7 +995,6 @@ SWITCH_STANDARD_APP(fifo_function)
|
||||||
switch_frame_t *read_frame;
|
switch_frame_t *read_frame;
|
||||||
switch_status_t status;
|
switch_status_t status;
|
||||||
char *uuid;
|
char *uuid;
|
||||||
int done = 0;
|
|
||||||
switch_core_session_t *other_session;
|
switch_core_session_t *other_session;
|
||||||
switch_input_args_t args = { 0 };
|
switch_input_args_t args = { 0 };
|
||||||
const char *pop_order = NULL;
|
const char *pop_order = NULL;
|
||||||
|
@ -1310,9 +1309,10 @@ SWITCH_STANDARD_APP(fifo_function)
|
||||||
switch_mutex_unlock(node->mutex);
|
switch_mutex_unlock(node->mutex);
|
||||||
send_presence(node);
|
send_presence(node);
|
||||||
switch_core_session_rwunlock(other_session);
|
switch_core_session_rwunlock(other_session);
|
||||||
|
switch_safe_free(uuid);
|
||||||
|
|
||||||
if (!do_wait) {
|
if (!do_wait || !switch_channel_ready(channel)) {
|
||||||
done = 1;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
fifo_consumer_wrapup_sound = switch_channel_get_variable(channel, "fifo_consumer_wrapup_sound");
|
fifo_consumer_wrapup_sound = switch_channel_get_variable(channel, "fifo_consumer_wrapup_sound");
|
||||||
|
@ -1378,12 +1378,6 @@ SWITCH_STANDARD_APP(fifo_function)
|
||||||
switch_channel_set_variable(channel, "fifo_status", "WAITING");
|
switch_channel_set_variable(channel, "fifo_status", "WAITING");
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_safe_free(uuid);
|
|
||||||
|
|
||||||
if (done) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (do_wait && switch_channel_ready(channel)) {
|
if (do_wait && switch_channel_ready(channel)) {
|
||||||
if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, FIFO_EVENT) == SWITCH_STATUS_SUCCESS) {
|
if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, FIFO_EVENT) == SWITCH_STATUS_SUCCESS) {
|
||||||
switch_channel_event_set_data(channel, event);
|
switch_channel_event_set_data(channel, event);
|
||||||
|
|
Loading…
Reference in New Issue