]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-4328 try this
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 11 Jul 2012 23:12:26 +0000 (18:12 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 11 Jul 2012 23:12:26 +0000 (18:12 -0500)
src/mod/endpoints/mod_sofia/sofia_glue.c

index 75c201ddb2fd3fae510a0d6a80eeb3db246eceb5..78beb7362499d2a3d6c07c322cf5a87d740786db 100644 (file)
@@ -5766,13 +5766,11 @@ static int recover_callback(void *pArg, int argc, char **argv, char **columnName
        rr = switch_channel_get_variable(channel, "sip_invite_record_route");
 
        if (switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND) {
+               int break_rfc = switch_true(switch_channel_get_variable(channel, "sip_recovery_break_rfc"));
                tech_pvt->dest = switch_core_session_sprintf(session, "sip:%s", switch_channel_get_variable(channel, "sip_req_uri"));
-               switch_channel_set_variable(channel, "sip_handle_full_from", switch_channel_get_variable(channel, "sip_full_from"));
-               switch_channel_set_variable(channel, "sip_handle_full_to", switch_channel_get_variable(channel, "sip_full_to"));
+               switch_channel_set_variable(channel, "sip_handle_full_from", switch_channel_get_variable(channel, break_rfc ? "sip_full_to" : "sip_full_from"));
+               switch_channel_set_variable(channel, "sip_handle_full_to", switch_channel_get_variable(channel, break_rfc ? "sip_full_from" : "sip_full_to"));
        } else {
-               
-               int break_rfc = switch_true(switch_channel_get_variable(channel, "sip_recovery_break_rfc"));
-
                tech_pvt->redirected = switch_core_session_sprintf(session, "sip:%s", switch_channel_get_variable(channel, "sip_contact_uri"));
 
                if (zstr(rr)) {
@@ -5785,11 +5783,11 @@ static int recover_callback(void *pArg, int argc, char **argv, char **columnName
                tech_pvt->dest = switch_core_session_sprintf(session, "sip:%s", switch_channel_get_variable(channel, "sip_from_uri"));
 
                if (!switch_channel_get_variable_dup(channel, "sip_handle_full_from", SWITCH_FALSE, -1)) {
-                       switch_channel_set_variable(channel, "sip_handle_full_from", switch_channel_get_variable(channel, break_rfc ? "sip_full_from" : "sip_full_to"));
+                       switch_channel_set_variable(channel, "sip_handle_full_from", switch_channel_get_variable(channel, "sip_full_to"));
                }
 
                if (!switch_channel_get_variable_dup(channel, "sip_handle_full_to", SWITCH_FALSE, -1)) {
-                       switch_channel_set_variable(channel, "sip_handle_full_to", switch_channel_get_variable(channel, break_rfc ? "sip_full_to" : "sip_full_from"));
+                       switch_channel_set_variable(channel, "sip_handle_full_to", switch_channel_get_variable(channel, "sip_full_from"));
                }
        }