提交 42de0322 authored 作者: Michael Jerris's avatar Michael Jerris

change duplicate FIFO-Action from bridge-consumer-stop to channel-consumer-stop…

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
上级 560e70f2
......@@ -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);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论