提交 8c97af6e authored 作者: Anthony Minessale's avatar Anthony Minessale

don't execute apps on channels that are hungup

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12177 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 ff1a9d09
...@@ -1238,6 +1238,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_execute_application(switch_c ...@@ -1238,6 +1238,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_execute_application(switch_c
{ {
switch_application_interface_t *application_interface; switch_application_interface_t *application_interface;
if (switch_channel_get_state(session->channel) >= CS_HANGUP) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Channel is hungup, aborting execution of application: %s\n", app);
return SWITCH_STATUS_FALSE;
}
if ((application_interface = switch_loadable_module_get_application_interface(app)) == 0) { if ((application_interface = switch_loadable_module_get_application_interface(app)) == 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Application %s\n", app); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Application %s\n", app);
switch_channel_hangup(session->channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER); switch_channel_hangup(session->channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论