]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-3396 --resolve
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 10 Aug 2011 12:59:03 +0000 (07:59 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 10 Aug 2011 12:59:03 +0000 (07:59 -0500)
src/switch_channel.c

index 7dd43672a96580520d27f47839c5b982ea907656..4f272db7e235a208360dfe62761580d0004f8599 100644 (file)
@@ -2842,10 +2842,6 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_mark_pre_answered(switch_
                switch_channel_set_flag(channel, CF_EARLY_MEDIA);
                switch_channel_set_callstate(channel, CCS_EARLY);
                switch_channel_set_variable(channel, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, "EARLY MEDIA");
-               if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_PROGRESS_MEDIA) == SWITCH_STATUS_SUCCESS) {
-                       switch_channel_event_set_data(channel, event);
-                       switch_event_fire(&event);
-               }
 
                if (channel->caller_profile && channel->caller_profile->times) {
                        switch_mutex_lock(channel->profile_mutex);
@@ -2865,6 +2861,11 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_mark_pre_answered(switch_
                        switch_mutex_unlock(channel->profile_mutex);
                }
 
+               if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_PROGRESS_MEDIA) == SWITCH_STATUS_SUCCESS) {
+                       switch_channel_event_set_data(channel, event);
+                       switch_event_fire(&event);
+               }
+
                switch_channel_execute_on(channel, SWITCH_CHANNEL_EXECUTE_ON_PRE_ANSWER_VARIABLE);
                switch_channel_execute_on(channel, SWITCH_CHANNEL_EXECUTE_ON_MEDIA_VARIABLE);