]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add debug line
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 24 Sep 2008 17:46:35 +0000 (17:46 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 24 Sep 2008 17:46:35 +0000 (17:46 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9636 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_channel.c

index f442d7f89007bd3bb368c1614c1b4a2e576063d1..c9fbf1fbb958d5a04d50ca388ccadf979b8feebf 100644 (file)
@@ -1563,7 +1563,7 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_mark_answered(switch_chan
 
        switch_channel_set_variable(channel, "endpoint_disposition", "ANSWER");
        switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_NOTICE, "Channel [%s] has been answered\n", channel->name);
-       if ((var = switch_channel_get_variable(channel, SWITCH_CHANNEL_EXECUTE_ON_ANSWER_VARIABLE))) {
+       if ((var = switch_channel_get_variable(channel, SWITCH_CHANNEL_EXECUTE_ON_ANSWER_VARIABLE)) && !switch_strlen_zero(var)) {
                char *arg = NULL;
 
                app = switch_core_session_strdup(channel->session, var);
@@ -1571,7 +1571,7 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_mark_answered(switch_chan
                if ((arg = strchr(app, ' '))) {
                        *arg++ = '\0';
                }
-
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s execute on answer: %s(%s)", channel->name, app, switch_str_nil(arg));
                switch_core_session_execute_application(channel->session, app, arg);
        }
        return SWITCH_STATUS_SUCCESS;