mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 03:20:57 +00:00
res_pjsip_caller_id: Don't overwrite user portion of the From header when fromuser is set.
The fromuser option is used to explicitly set the user within the From header. The res_pjsip_caller_id module did not take this setting into account when determining if the From header could be modified or not. (closes issue ASTERISK-22866) Reported by: Anthony Messina ........ Merged revisions 402891 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402892 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -648,6 +648,7 @@ static void caller_id_outgoing_request(struct ast_sip_session *session, pjsip_tx
|
||||
|
||||
connected_id = ast_channel_connected_effective_id(session->channel);
|
||||
if (session->inv_session->state < PJSIP_INV_STATE_CONFIRMED &&
|
||||
ast_strlen_zero(session->endpoint->fromuser) &&
|
||||
(session->endpoint->id.trust_outbound ||
|
||||
((connected_id.name.presentation & AST_PRES_RESTRICTION) == AST_PRES_ALLOWED &&
|
||||
(connected_id.number.presentation & AST_PRES_RESTRICTION) == AST_PRES_ALLOWED))) {
|
||||
|
Reference in New Issue
Block a user