From 42de0322734a8dddfd0eef08c6328b46ff2be22e Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Mon, 25 Feb 2013 17:03:37 -0500 Subject: [PATCH] change duplicate FIFO-Action from bridge-consumer-stop to channel-consumer-stop (same for start) for the set of events that were not for the bridge. Also, when trying to pull a specific call out of queue, end pending outbound calls to the agent first to avoid blocking --- src/mod/applications/mod_fifo/mod_fifo.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mod/applications/mod_fifo/mod_fifo.c b/src/mod/applications/mod_fifo/mod_fifo.c index 75c7006a7d..ce0bf39ac4 100644 --- a/src/mod/applications/mod_fifo/mod_fifo.c +++ b/src/mod/applications/mod_fifo/mod_fifo.c @@ -2157,7 +2157,7 @@ static void dec_use_count(switch_core_session_t *session, switch_bool_t send_eve if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, FIFO_EVENT) == SWITCH_STATUS_SUCCESS) { switch_channel_event_set_data(channel, event); switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "FIFO-Name", MANUAL_QUEUE_NAME); - switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "FIFO-Action", "bridge-consumer-stop"); + switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "FIFO-Action", "channel-consumer-stop"); switch_event_fire(&event); } } @@ -2231,7 +2231,7 @@ SWITCH_STANDARD_APP(fifo_track_call_function) if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, FIFO_EVENT) == SWITCH_STATUS_SUCCESS) { switch_channel_event_set_data(channel, event); switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "FIFO-Name", MANUAL_QUEUE_NAME); - switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "FIFO-Action", "bridge-consumer-start"); + switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "FIFO-Action", "channel-consumer-start"); switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "FIFO-Caller-CID-Name", cid_name); switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "FIFO-Caller-CID-Number", cid_number); switch_event_fire(&event); @@ -2782,6 +2782,8 @@ SWITCH_STANDARD_APP(fifo_function) goto done; } + cancel_consumer_outbound_call(outbound_id, SWITCH_CAUSE_ORIGINATOR_CANCEL); + for (x = 0; x < MAX_PRI; x++) { if (fifo_queue_pop_nameval(node->fifo_list[pop_array[x]], "+unique-id", varval, &pop, SWITCH_TRUE) == SWITCH_STATUS_SUCCESS && pop) { cancel_caller_outbound_call(varval, SWITCH_CAUSE_PICKED_OFF);