fix some language issues and move media bug removal to hangup state

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12225 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2009-02-21 22:50:35 +00:00
parent 54ff389b09
commit e66b78047a
5 changed files with 47 additions and 15 deletions

View File

@@ -397,6 +397,7 @@ SWITCH_DECLARE(switch_size_t) switch_channel_dequeue_dtmf_string(switch_channel_
SWITCH_DECLARE(void) switch_channel_flush_dtmf(switch_channel_t *channel)
{
void *pop;
switch_mutex_lock(channel->dtmf_mutex);
while (switch_queue_trypop(channel->dtmf_queue, &pop) == SWITCH_STATUS_SUCCESS) {
switch_safe_free(pop);
@@ -1562,6 +1563,7 @@ SWITCH_DECLARE(switch_channel_state_t) switch_channel_perform_hangup(switch_chan
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_NOTICE, "Hangup %s [%s] [%s]\n",
channel->name, state_names[last_state], switch_channel_cause2str(channel->hangup_cause));
switch_core_media_bug_remove_all(channel->session);
switch_channel_set_variable(channel, "hangup_cause", switch_channel_cause2str(channel->hangup_cause));
switch_channel_presence(channel, "unavailable", switch_channel_cause2str(channel->hangup_cause), NULL);