mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-17 01:02:12 +00:00
FS-4913 try this patch
This commit is contained in:
parent
84ce23038e
commit
8e5012e4d6
@ -269,6 +269,11 @@ static void extract_header_vars(sofia_profile_t *profile, sip_t const *sip,
|
|||||||
if (p != sip->sip_from->a_display) free(p);
|
if (p != sip->sip_from->a_display) free(p);
|
||||||
if ((full = sip_header_as_string(nh->nh_home, (void *) sip->sip_from))) {
|
if ((full = sip_header_as_string(nh->nh_home, (void *) sip->sip_from))) {
|
||||||
switch_channel_set_variable(channel, "sip_full_from", full);
|
switch_channel_set_variable(channel, "sip_full_from", full);
|
||||||
|
|
||||||
|
if (!switch_channel_get_variable_dup(channel, "sip_orig_full_from", SWITCH_FALSE, -1)) {
|
||||||
|
switch_channel_set_variable(channel, "sip_orig_full_from", full);
|
||||||
|
}
|
||||||
|
|
||||||
su_free(nh->nh_home, full);
|
su_free(nh->nh_home, full);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -284,6 +289,11 @@ static void extract_header_vars(sofia_profile_t *profile, sip_t const *sip,
|
|||||||
|
|
||||||
if ((full = sip_header_as_string(nh->nh_home, (void *) sip->sip_to))) {
|
if ((full = sip_header_as_string(nh->nh_home, (void *) sip->sip_to))) {
|
||||||
switch_channel_set_variable(channel, "sip_full_to", full);
|
switch_channel_set_variable(channel, "sip_full_to", full);
|
||||||
|
|
||||||
|
if (!switch_channel_get_variable_dup(channel, "sip_orig_full_to", SWITCH_FALSE, -1)) {
|
||||||
|
switch_channel_set_variable(channel, "sip_orig_full_to", full);
|
||||||
|
}
|
||||||
|
|
||||||
su_free(nh->nh_home, full);
|
su_free(nh->nh_home, full);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5863,8 +5863,8 @@ int sofia_recover_callback(switch_core_session_t *session)
|
|||||||
if (switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND) {
|
if (switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND) {
|
||||||
int break_rfc = switch_true(switch_channel_get_variable(channel, "sip_recovery_break_rfc"));
|
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"));
|
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, break_rfc ? "sip_full_to" : "sip_full_from"));
|
switch_channel_set_variable(channel, "sip_handle_full_from", switch_channel_get_variable(channel, break_rfc ? "sip_orig_full_to" : "sip_orig_full_from"));
|
||||||
switch_channel_set_variable(channel, "sip_handle_full_to", switch_channel_get_variable(channel, break_rfc ? "sip_full_from" : "sip_full_to"));
|
switch_channel_set_variable(channel, "sip_handle_full_to", switch_channel_get_variable(channel, break_rfc ? "sip_orig_full_from" : "sip_orig_full_to"));
|
||||||
} else {
|
} else {
|
||||||
tech_pvt->redirected = switch_core_session_sprintf(session, "sip:%s", switch_channel_get_variable(channel, "sip_contact_uri"));
|
tech_pvt->redirected = switch_core_session_sprintf(session, "sip:%s", switch_channel_get_variable(channel, "sip_contact_uri"));
|
||||||
|
|
||||||
@ -5878,11 +5878,11 @@ int sofia_recover_callback(switch_core_session_t *session)
|
|||||||
tech_pvt->dest = switch_core_session_sprintf(session, "sip:%s", switch_channel_get_variable(channel, "sip_from_uri"));
|
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)) {
|
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, "sip_full_to"));
|
switch_channel_set_variable(channel, "sip_handle_full_from", switch_channel_get_variable(channel, "sip_orig_full_to"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!switch_channel_get_variable_dup(channel, "sip_handle_full_to", SWITCH_FALSE, -1)) {
|
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, "sip_full_from"));
|
switch_channel_set_variable(channel, "sip_handle_full_to", switch_channel_get_variable(channel, "sip_orig_full_from"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user