]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-9880: [freeswitch-core] Code to check for text-only is too soon in app processing...
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 22 Dec 2016 19:03:54 +0000 (13:03 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 22 Dec 2016 19:03:54 +0000 (13:03 -0600)
src/switch_core_session.c

index 4dd2e2a6c0af52f02fd55df95358d9da8069f811..2ffcc7d37e555d962c5d86de22bfa8c8686929fa 100644 (file)
@@ -2677,15 +2677,6 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_execute_application_get_flag
                *flags = application_interface->flags;
        }
 
-       if (switch_channel_text_only(session->channel) && 
-               !switch_test_flag(application_interface, SAF_SUPPORT_NOMEDIA) && 
-               !switch_test_flag(application_interface, SAF_SUPPORT_TEXT_ONLY)) {
-               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Application %s does not support text-only mode on channel %s!\n",
-                                                 app, switch_channel_get_name(session->channel));
-               switch_channel_hangup(session->channel, SWITCH_CAUSE_SERVICE_NOT_IMPLEMENTED);
-               switch_goto_status(SWITCH_STATUS_FALSE, done);
-       }
-
        if (!switch_test_flag(application_interface, SAF_SUPPORT_NOMEDIA) && (switch_channel_test_flag(session->channel, CF_VIDEO))) {
                switch_core_session_request_video_refresh(session);
        }
@@ -2719,6 +2710,15 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_execute_application_get_flag
                }
        }
 
+       if (switch_channel_text_only(session->channel) && 
+               !switch_test_flag(application_interface, SAF_SUPPORT_NOMEDIA) && 
+               !switch_test_flag(application_interface, SAF_SUPPORT_TEXT_ONLY)) {
+               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Application %s does not support text-only mode on channel %s!\n",
+                                                 app, switch_channel_get_name(session->channel));
+               switch_channel_hangup(session->channel, SWITCH_CAUSE_SERVICE_NOT_IMPLEMENTED);
+               switch_goto_status(SWITCH_STATUS_FALSE, done);
+       }
+
  exec:
 
        switch_core_session_exec(session, application_interface, arg);