[Freeswitch-svn] [commit] r7212 - freeswitch/trunk/src
Freeswitch SVN
anthm at freeswitch.org
Mon Jan 14 10:37:00 EST 2008
Author: anthm
Date: Mon Jan 14 10:37:00 2008
New Revision: 7212
Modified:
freeswitch/trunk/src/switch_core_state_machine.c
Log:
add process_cdr variable
Modified: freeswitch/trunk/src/switch_core_state_machine.c
==============================================================================
--- freeswitch/trunk/src/switch_core_state_machine.c (original)
+++ freeswitch/trunk/src/switch_core_state_machine.c Mon Jan 14 10:37:00 2008
@@ -420,10 +420,17 @@
goto done;
case CS_HANGUP: /* Deactivate and end the thread */
{
- const char *var = NULL;
+ const char *var = switch_channel_get_variable(session->channel, SWITCH_PROCESS_CDR_VARIABLE);
- if (!(var = switch_channel_get_variable(session->channel, SWITCH_PROCESS_CDR_VARIABLE)) || !switch_true(var)) {
- do_extra_handlers = 0;
+ if (!switch_strlen_zero(var)) {
+
+ if (!strcasecmp(var, "a_only") && !switch_channel_test_flag(session->channel, CF_ORIGINATOR)) {
+ do_extra_handlers = 0;
+ } else if (!strcasecmp(var, "b_only") && switch_channel_test_flag(session->channel, CF_ORIGINATOR)) {
+ do_extra_handlers = 0;
+ } else if (!switch_true(var)) {
+ do_extra_handlers = 0;
+ }
}
STATE_MACRO(hangup, "HANGUP");
More information about the Freeswitch-svn
mailing list