]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-1986 --resolve Come To ClueCon 2011 http://www.cluecon.com
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 27 May 2011 14:49:02 +0000 (09:49 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 27 May 2011 14:49:02 +0000 (09:49 -0500)
src/mod/applications/mod_dptools/mod_dptools.c

index e0b8e0aa93cdf08d6ee5effe4618b8e9f739bbef..c98e632f94b7ff0c29a3df21c42d7da5314193fa 100755 (executable)
@@ -2529,8 +2529,7 @@ SWITCH_STANDARD_APP(audio_bridge_function)
        char *tof_data = NULL;
        char *tof_array[4] = { 0 };
        //int tof_arrayc = 0;
-       const char *continue_on_fail = NULL, *failure_causes = NULL,
-               *v_campon = NULL, *v_campon_retries, *v_campon_sleep, *v_campon_timeout, *v_campon_fallback_exten = NULL;
+       const char *v_campon = NULL, *v_campon_retries, *v_campon_sleep, *v_campon_timeout, *v_campon_fallback_exten = NULL;
        switch_call_cause_t cause = SWITCH_CAUSE_NORMAL_CLEARING;
        int campon_retries = 100, campon_timeout = 10, campon_sleep = 10, tmp, camping = 0, fail = 0, thread_started = 0;
        struct camping_stake stake = { 0 };
@@ -2544,15 +2543,11 @@ SWITCH_STANDARD_APP(audio_bridge_function)
                return;
        }
 
-       continue_on_fail = switch_channel_get_variable(caller_channel, "continue_on_fail");
-
        transfer_on_fail = switch_channel_get_variable(caller_channel, "transfer_on_fail");
        tof_data = switch_core_session_strdup(session, transfer_on_fail);
        switch_split(tof_data, ' ', tof_array);
        transfer_on_fail = tof_array[0];
        
-       failure_causes = switch_channel_get_variable(caller_channel, "failure_causes");
-       
        if ((v_campon = switch_channel_get_variable(caller_channel, "campon")) && switch_true(v_campon)) {
                const char *cid_name = NULL;
                const char *cid_number = NULL;
@@ -2693,6 +2688,11 @@ SWITCH_STANDARD_APP(audio_bridge_function)
                   EXCEPTION... ATTENDED_TRANSFER never is a reason to continue.......
                 */
                if (cause != SWITCH_CAUSE_ATTENDED_TRANSFER) {
+                       const char *continue_on_fail = NULL, *failure_causes = NULL;
+
+                       continue_on_fail = switch_channel_get_variable(caller_channel, "continue_on_fail");
+                       failure_causes = switch_channel_get_variable(caller_channel, "failure_causes");
+
                        if (continue_on_fail || failure_causes) {
                                const char *cause_str;
                                char cause_num[35] = "";