mod_sofia: BOUNTY-7 and MODENDP-146
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13977 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
4dd9f8d07b
commit
f06a25fb93
|
@ -4695,6 +4695,10 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_
|
||||||
if ((rpid = sip_remote_party_id(sip))) {
|
if ((rpid = sip_remote_party_id(sip))) {
|
||||||
if (rpid->rpid_url && rpid->rpid_url->url_user) {
|
if (rpid->rpid_url && rpid->rpid_url->url_user) {
|
||||||
from_user = rpid->rpid_url->url_user;
|
from_user = rpid->rpid_url->url_user;
|
||||||
|
if (!switch_strlen_zero(from_user)) {
|
||||||
|
switch_channel_set_variable(channel, SOFIA_SIP_HEADER_PREFIX "Remote-Party-ID", from_user);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (!switch_strlen_zero(rpid->rpid_display)) {
|
if (!switch_strlen_zero(rpid->rpid_display)) {
|
||||||
displayname = rpid->rpid_display;
|
displayname = rpid->rpid_display;
|
||||||
|
@ -4705,6 +4709,9 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_
|
||||||
if ((passerted = sip_p_asserted_identity(sip))) {
|
if ((passerted = sip_p_asserted_identity(sip))) {
|
||||||
if (passerted->paid_url && passerted->paid_url->url_user) {
|
if (passerted->paid_url && passerted->paid_url->url_user) {
|
||||||
from_user = passerted->paid_url->url_user;
|
from_user = passerted->paid_url->url_user;
|
||||||
|
if (!switch_strlen_zero(from_user)) {
|
||||||
|
switch_channel_set_variable(channel, SOFIA_SIP_HEADER_PREFIX "P-Asserted-Identity", from_user);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!switch_strlen_zero(passerted->paid_display)) {
|
if (!switch_strlen_zero(passerted->paid_display)) {
|
||||||
displayname = passerted->paid_display;
|
displayname = passerted->paid_display;
|
||||||
|
@ -4715,6 +4722,10 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_
|
||||||
if ((ppreferred = sip_p_preferred_identity(sip))) {
|
if ((ppreferred = sip_p_preferred_identity(sip))) {
|
||||||
if (ppreferred->ppid_url && ppreferred->ppid_url->url_user) {
|
if (ppreferred->ppid_url && ppreferred->ppid_url->url_user) {
|
||||||
from_user = ppreferred->ppid_url->url_user;
|
from_user = ppreferred->ppid_url->url_user;
|
||||||
|
if (!switch_strlen_zero(from_user)) {
|
||||||
|
switch_channel_set_variable(channel, SOFIA_SIP_HEADER_PREFIX "P-Preferred-Identity", from_user);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (!switch_strlen_zero(ppreferred->ppid_display)) {
|
if (!switch_strlen_zero(ppreferred->ppid_display)) {
|
||||||
displayname = ppreferred->ppid_display;
|
displayname = ppreferred->ppid_display;
|
||||||
|
@ -5082,6 +5093,11 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((privacy = sip_privacy(sip))) {
|
if ((privacy = sip_privacy(sip))) {
|
||||||
|
char *full_priv_header = sip_header_as_string(nh->nh_home, (void *) privacy);
|
||||||
|
if (!switch_strlen_zero(full_priv_header)) {
|
||||||
|
switch_channel_set_variable(channel, SOFIA_SIP_HEADER_PREFIX "Privacy", full_priv_header);
|
||||||
|
}
|
||||||
|
|
||||||
if (msg_params_find(privacy->priv_values, "id")) {
|
if (msg_params_find(privacy->priv_values, "id")) {
|
||||||
switch_set_flag(tech_pvt->caller_profile, SWITCH_CPF_HIDE_NAME | SWITCH_CPF_HIDE_NUMBER);
|
switch_set_flag(tech_pvt->caller_profile, SWITCH_CPF_HIDE_NAME | SWITCH_CPF_HIDE_NUMBER);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue