提交 72f0cf47 authored 作者: Anthony Minessale's avatar Anthony Minessale

add conference-create and conference-destroy action events

上级 98063854
...@@ -1910,7 +1910,7 @@ static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, v ...@@ -1910,7 +1910,7 @@ static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, v
int32_t z = 0; int32_t z = 0;
int member_score_sum = 0; int member_score_sum = 0;
int divisor = 0; int divisor = 0;
if (!(divisor = conference->rate / 8000)) { if (!(divisor = conference->rate / 8000)) {
divisor = 1; divisor = 1;
} }
...@@ -1932,6 +1932,13 @@ static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, v ...@@ -1932,6 +1932,13 @@ static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, v
conference->is_recording = 0; conference->is_recording = 0;
conference->record_count = 0; conference->record_count = 0;
switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT);
conference_add_event_data(conference, event);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "conference-create");
switch_event_fire(&event);
while (globals.running && !switch_test_flag(conference, CFLAG_DESTRUCT)) { while (globals.running && !switch_test_flag(conference, CFLAG_DESTRUCT)) {
switch_size_t file_sample_len = samples; switch_size_t file_sample_len = samples;
switch_size_t file_data_len = samples * 2; switch_size_t file_data_len = samples * 2;
...@@ -2448,6 +2455,11 @@ static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, v ...@@ -2448,6 +2455,11 @@ static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, v
} }
} }
switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT);
conference_add_event_data(conference, event);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "conference-destroy");
switch_event_fire(&event);
switch_core_timer_destroy(&timer); switch_core_timer_destroy(&timer);
switch_mutex_lock(globals.hash_mutex); switch_mutex_lock(globals.hash_mutex);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论