mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-02 13:47:15 +00:00
[mod_sofia] simplify - fix to and from-tag in refer-to header
This commit is contained in:
parent
f11e95e3fb
commit
8d84db7e06
@ -1945,6 +1945,8 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
|||||||
switch_core_session_t *rsession;
|
switch_core_session_t *rsession;
|
||||||
if ((rsession = switch_core_session_locate(uuid))) {
|
if ((rsession = switch_core_session_locate(uuid))) {
|
||||||
switch_channel_t *rchannel = switch_core_session_get_channel(rsession);
|
switch_channel_t *rchannel = switch_core_session_get_channel(rsession);
|
||||||
|
private_object_t *rtech_pvt = switch_core_session_get_private(rsession);
|
||||||
|
|
||||||
call_id = switch_channel_get_variable(rchannel, "sip_call_id");
|
call_id = switch_channel_get_variable(rchannel, "sip_call_id");
|
||||||
|
|
||||||
to_user = switch_channel_get_variable(rchannel, "sip_to_user");
|
to_user = switch_channel_get_variable(rchannel, "sip_to_user");
|
||||||
@ -1953,16 +1955,15 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
|||||||
to_host = switch_channel_get_variable(rchannel, "sip_to_host");
|
to_host = switch_channel_get_variable(rchannel, "sip_to_host");
|
||||||
from_user = switch_channel_get_variable(channel, "sip_from_user");
|
from_user = switch_channel_get_variable(channel, "sip_from_user");
|
||||||
from_host = switch_channel_get_variable(channel, "sip_from_host");
|
from_host = switch_channel_get_variable(channel, "sip_from_host");
|
||||||
to_tag = switch_channel_get_variable(rchannel, "sip_to_tag");
|
|
||||||
from_tag = switch_channel_get_variable(rchannel, "sip_from_tag");
|
|
||||||
} else {
|
} else {
|
||||||
to_host = switch_channel_get_variable(channel, "sip_to_host");
|
to_host = switch_channel_get_variable(channel, "sip_to_host");
|
||||||
from_user = switch_channel_get_variable(rchannel, "sip_from_user");
|
from_user = switch_channel_get_variable(rchannel, "sip_from_user");
|
||||||
from_host = switch_channel_get_variable(rchannel, "sip_from_host");
|
from_host = switch_channel_get_variable(rchannel, "sip_from_host");
|
||||||
from_tag = switch_channel_get_variable(rchannel, "sip_to_tag");
|
|
||||||
to_tag = switch_channel_get_variable(rchannel, "sip_from_tag");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
to_tag = nta_leg_get_rtag(nua_get_dialog_state_leg(rtech_pvt->nh));
|
||||||
|
from_tag = nta_leg_get_tag(nua_get_dialog_state_leg(rtech_pvt->nh));
|
||||||
|
|
||||||
switch_core_session_rwunlock(rsession);
|
switch_core_session_rwunlock(rsession);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user