Merge "res_pjsip_session: Prevent user=phone being added to anonimized URIs."
This commit is contained in:
commit
acf686e6a5
1 changed files with 4 additions and 3 deletions
|
@ -1329,10 +1329,9 @@ static void set_from_header(struct ast_sip_session *session)
|
|||
pj_strdup2(dlg_pool, &dlg_info_uri->host, session->endpoint->fromdomain);
|
||||
}
|
||||
|
||||
ast_sip_add_usereqphone(session->endpoint, dlg_pool, dlg_info->uri);
|
||||
|
||||
/* We need to save off the non-anonymized From for RPID/PAI generation (for domain) */
|
||||
session->saved_from_hdr = pjsip_hdr_clone(dlg_pool, dlg_info);
|
||||
ast_sip_add_usereqphone(session->endpoint, dlg_pool, session->saved_from_hdr->uri);
|
||||
|
||||
/* In chan_sip, fromuser and fromdomain trump restricted so we only
|
||||
* anonymize if they're not set.
|
||||
|
@ -1348,7 +1347,9 @@ static void set_from_header(struct ast_sip_session *session)
|
|||
if (ast_strlen_zero(session->endpoint->fromdomain)) {
|
||||
pj_strdup2(dlg_pool, &dlg_info_uri->host, "anonymous.invalid");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ast_sip_add_usereqphone(session->endpoint, dlg_pool, dlg_info->uri);
|
||||
}
|
||||
}
|
||||
|
||||
int ast_sip_session_refresh(struct ast_sip_session *session,
|
||||
|
|
Loading…
Reference in a new issue