remove media bugs on hangup before api_hangup_hook is run

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11002 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2008-12-30 15:45:17 +00:00
parent bd435a2c13
commit 9528cd56da

View File

@ -399,6 +399,8 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session_t *session)
STATE_MACRO(hangup, "HANGUP");
switch_core_media_bug_remove_all(session);
hook_var = switch_channel_get_variable(session->channel, SWITCH_API_HANGUP_HOOK_VARIABLE);
if (switch_true(switch_channel_get_variable(session->channel, SWITCH_SESSION_IN_HANGUP_HOOK_VARIABLE))) {
use_session = session;