]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
lower log-level of failed ivr_originate
authorTravis Cross <tc@traviscross.com>
Mon, 6 Jun 2011 17:48:34 +0000 (17:48 +0000)
committerTravis Cross <tc@traviscross.com>
Mon, 6 Jun 2011 17:54:17 +0000 (17:54 +0000)
ivr_originate can fail due to causes such as NO_ANSWER and
ATTENDED_TRANSFER.  It seems excessive to log these normal events
with LOG_ERROR.  Lowering to LOG_NOTICE.

src/switch_ivr_originate.c
src/switch_swig.c

index 840705aad586d88e4c2ad0dd355f4fbe9743ead1..872c11cf64c2d38930152454818537bdcb35c17f 100644 (file)
@@ -2440,7 +2440,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
                                switch_event_destroy(&originate_var_event);
 
                                if (reason != SWITCH_CAUSE_SUCCESS) {
-                                       switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Cannot create outgoing channel of type [%s] cause: [%s]\n",
+                                       switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, "Cannot create outgoing channel of type [%s] cause: [%s]\n",
                                                                          chan_type, switch_channel_cause2str(reason));
                                        if (local_var_event) switch_event_destroy(&local_var_event);
                                        
index c041e1b1daefbd6726e1e2fe8b150fe7f38d3dde..71ed3f7467c7abf9892026bbd52f338fe2964c14 100644 (file)
@@ -238,7 +238,7 @@ int fs_switch_ivr_originate(switch_core_session_t *session, switch_core_session_
        }
 
        if (switch_ivr_originate(session, &peer_session, &cause, bridgeto, timelimit, NULL, NULL, NULL, NULL, SOF_NONE) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Cannot Create Outgoing Channel!\n");
+               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, "Cannot Create Outgoing Channel!\n");
                switch_channel_hangup(caller_channel, SWITCH_CAUSE_REQUESTED_CHAN_UNAVAIL);
                return;
        } else {