git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7199 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale committed 2008-01-13 18:39:51 +00:00
1 parent 3993d8aa16
commit 58a8979c6e
12 files changed
+39 -37

No files matched your search

+9 -7
View File
@@ -575,11 +575,14 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_dequeue_private_event(switch
}
SWITCH_DECLARE(void) switch_core_session_reset(switch_core_session_t *session)
SWITCH_DECLARE(void) switch_core_session_reset(switch_core_session_t *session, switch_bool_t flush_dtmf)
{
switch_channel_t *channel;
switch_size_t has;
channel = switch_core_session_get_channel(session);
switch_assert(channel != NULL);
/* clear resamplers*/
switch_resample_destroy(&session->read_resampler);
switch_resample_destroy(&session->write_resampler);
@@ -590,12 +593,11 @@ SWITCH_DECLARE(void) switch_core_session_reset(switch_core_session_t *session)
/* wipe theese, they will be recreated if need be */
switch_buffer_destroy(&session->raw_read_buffer);
switch_buffer_destroy(&session->raw_write_buffer);
/* flush dtmf */
channel = switch_core_session_get_channel(session);
while ((has = switch_channel_has_dtmf(channel))) {
switch_channel_flush_dtmf(channel);
if (flush_dtmf) {
while ((has = switch_channel_has_dtmf(channel))) {
switch_channel_flush_dtmf(channel);
}
}
switch_ivr_deactivate_unicast(session);