From 1c06b516867d3f1fe630a0a96bd4b99c43c5be9b Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Thu, 22 Nov 2007 06:56:02 +0000 Subject: [PATCH] fix for MODENDP-31, send stop-talking events after CNG packets as well as silent frames. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6374 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- .../applications/mod_conference/mod_conference.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c index 596bcdcbf5..7249b70874 100644 --- a/src/mod/applications/mod_conference/mod_conference.c +++ b/src/mod/applications/mod_conference/mod_conference.c @@ -1356,6 +1356,22 @@ static void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t * thread, } if (switch_test_flag(read_frame, SFF_CNG)) { + if (hangunder_hits) { + hangunder_hits--; + } + if (talking) { + switch_event_t *event; + if (++hangover_hits >= hangover) { + hangover_hits = hangunder_hits = 0; + talking = 0; + + if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) { + conference_add_event_member_data(member, event); + switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "stop-talking"); + switch_event_fire(&event); + } + } + } continue; }