[mod_sofia] add sip_ignore_remote_cid var to ignore remote display update

This commit is contained in:
Anthony Minessale 2020-06-04 02:14:51 +00:00 committed by Andrey Volk
parent 1cbb2e6fc3
commit cc68179d2b

View File

@ -1230,11 +1230,13 @@ void sofia_update_callee_id(switch_core_session_t *session, sofia_profile_t *pro
number = (char *) switch_channel_get_variable(channel, num_var); number = (char *) switch_channel_get_variable(channel, num_var);
name = (char *) switch_channel_get_variable(channel, name_var); name = (char *) switch_channel_get_variable(channel, name_var);
if (zstr(number) && sip->sip_to) { if (zstr(number) && sip->sip_to) {
number = sip->sip_to->a_url->url_user; number = sip->sip_to->a_url->url_user;
} }
if (switch_channel_var_true(channel, "sip_ignore_remote_cid")) {
fs++;
} else {
if ((val = sofia_glue_get_unknown_header(sip, "X-FS-Display-Number"))) { if ((val = sofia_glue_get_unknown_header(sip, "X-FS-Display-Number"))) {
number = val; number = val;
fs++; fs++;
@ -1255,6 +1257,7 @@ void sofia_update_callee_id(switch_core_session_t *session, sofia_profile_t *pro
att = switch_true(val); att = switch_true(val);
fs++; fs++;
} }
}
if (!fs) { if (!fs) {
sip_remote_party_id_t *rpid; sip_remote_party_id_t *rpid;