[Freeswitch-svn] [commit] r11278 - freeswitch/trunk/src
FreeSWITCH SVN
brian at freeswitch.org
Mon Jan 19 08:25:49 PST 2009
Author: brian
Date: Mon Jan 19 10:25:49 2009
New Revision: 11278
Log:
just fail silently in these cases. see FSCORE-272
Modified:
freeswitch/trunk/src/switch_channel.c
Modified: freeswitch/trunk/src/switch_channel.c
==============================================================================
--- freeswitch/trunk/src/switch_channel.c (original)
+++ freeswitch/trunk/src/switch_channel.c Mon Jan 19 10:25:49 2009
@@ -1641,12 +1641,6 @@
return SWITCH_STATUS_FALSE;
}
- if (switch_channel_test_flag(channel, CF_OUTBOUND)) {
- switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_CRIT, "INVALID! Channel [%s] is an outbound leg\n", channel->name);
- switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
- return SWITCH_STATUS_FALSE;
- }
-
if (switch_channel_test_flag(channel, CF_ANSWERED)) {
return SWITCH_STATUS_SUCCESS;
}
@@ -1655,6 +1649,10 @@
return SWITCH_STATUS_SUCCESS;
}
+ if (switch_channel_test_flag(channel, CF_OUTBOUND)) {
+ return SWITCH_STATUS_SUCCESS;
+ }
+
msg.message_id = SWITCH_MESSAGE_INDICATE_PROGRESS;
msg.from = channel->name;
status = switch_core_session_perform_receive_message(channel->session, &msg, file, func, line);
@@ -1679,12 +1677,6 @@
return SWITCH_STATUS_FALSE;
}
- if (switch_channel_test_flag(channel, CF_OUTBOUND)) {
- switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_CRIT, "INVALID! Channel [%s] is an outbound leg\n", channel->name);
- switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
- return SWITCH_STATUS_FALSE;
- }
-
if (switch_channel_test_flag(channel, CF_ANSWERED)) {
return SWITCH_STATUS_SUCCESS;
}
@@ -1693,6 +1685,10 @@
return SWITCH_STATUS_SUCCESS;
}
+ if (switch_channel_test_flag(channel, CF_OUTBOUND)) {
+ return SWITCH_STATUS_SUCCESS;
+ }
+
msg.message_id = SWITCH_MESSAGE_INDICATE_RINGING;
msg.from = channel->name;
status = switch_core_session_perform_receive_message(channel->session, &msg, file, func, line);
@@ -1794,13 +1790,11 @@
return SWITCH_STATUS_FALSE;
}
- if (switch_channel_test_flag(channel, CF_OUTBOUND)) {
- switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_CRIT, "INVALID! Channel [%s] is an outbound leg\n", channel->name);
- switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
- return SWITCH_STATUS_FALSE;
+ if (switch_channel_test_flag(channel, CF_ANSWERED)) {
+ return SWITCH_STATUS_SUCCESS;
}
- if (switch_channel_test_flag(channel, CF_ANSWERED)) {
+ if (switch_channel_test_flag(channel, CF_OUTBOUND)) {
return SWITCH_STATUS_SUCCESS;
}
@@ -1814,8 +1808,6 @@
switch_channel_hangup(channel, SWITCH_CAUSE_INCOMPATIBLE_DESTINATION);
}
-
-
return status;
}
More information about the Freeswitch-svn
mailing list