]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
remove media bugs on hangup before api_hangup_hook is run
authorMichael Jerris <mike@jerris.com>
Tue, 30 Dec 2008 15:45:17 +0000 (15:45 +0000)
committerMichael Jerris <mike@jerris.com>
Tue, 30 Dec 2008 15:45:17 +0000 (15:45 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11002 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_core_state_machine.c

index 97e2faffa8b2a53d13cfbbb0e0dbb2521fb7aa7c..1ea534817f52d8b86016f0870fe827b9a81335c6 100644 (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;