]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7186 #resolve
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 23 Jan 2015 19:14:58 +0000 (13:14 -0600)
committerBrian West <brian@freeswitch.org>
Fri, 23 Jan 2015 19:14:58 +0000 (13:14 -0600)
src/switch_ivr_originate.c

index 506fc53bfdc21c238b62586b8b053390e954efbe..9e25ba0aef304e3bb13af7d1d82585932a7a8fd1 100644 (file)
@@ -1655,13 +1655,14 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_enterprise_originate(switch_core_sess
 
        for (i = 0; i < x_argc; i++) {
 
-               if (channel) {
-                       switch_channel_handle_cause(channel, handles[i].cause);
-               }
-
                if (hp == &handles[i]) {
                        continue;
                }
+
+               if (channel && handles[i].cause && handles[i].cause != SWITCH_CAUSE_SUCCESS) {
+                       switch_channel_handle_cause(channel, handles[i].cause);
+               }
+
                switch_mutex_unlock(handles[i].mutex);
 
                if (getcause && *cause != handles[i].cause && handles[i].cause != SWITCH_CAUSE_LOSE_RACE && handles[i].cause != SWITCH_CAUSE_NO_PICKUP) {