mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
add priority queue for events so important broadcasts like hold music can take precedenced over event-lock
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15865 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -461,6 +461,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_parse_event(switch_core_session_t *se
|
||||
unsigned long CMD_UNICAST = switch_hashfunc_default("unicast", &hlen);
|
||||
char *lead_frames = switch_event_get_header(event, "lead-frames");
|
||||
char *event_lock = switch_event_get_header(event, "event-lock");
|
||||
char *event_lock_pri = switch_event_get_header(event, "event-lock-pri");
|
||||
switch_status_t status = SWITCH_STATUS_FALSE;
|
||||
|
||||
if (zstr(cmd)) {
|
||||
@@ -476,6 +477,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_parse_event(switch_core_session_t *se
|
||||
switch_channel_set_flag_recursive(channel, CF_EVENT_LOCK);
|
||||
}
|
||||
|
||||
if (switch_true(event_lock_pri)) {
|
||||
switch_channel_set_flag_recursive(channel, CF_EVENT_LOCK_PRI);
|
||||
}
|
||||
|
||||
if (lead_frames) {
|
||||
switch_frame_t *read_frame;
|
||||
int frame_count = atoi(lead_frames);
|
||||
@@ -606,6 +611,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_parse_event(switch_core_session_t *se
|
||||
done:
|
||||
switch_channel_clear_flag_recursive(channel, CF_EVENT_PARSE);
|
||||
switch_channel_clear_flag_recursive(channel, CF_EVENT_LOCK);
|
||||
switch_channel_clear_flag_recursive(channel, CF_EVENT_LOCK_PRI);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
Reference in New Issue
Block a user