[Asterisk-code-review] chan_dahdi: Fix broken hidecallerid setting. (asterisk[master])

N A asteriskteam at digium.com
Mon Dec 12 09:28:24 CST 2022


Attention is currently required from: N A.

Hello Friendly Automation, 

I'd like you to reexamine a change. Please visit

    https://gerrit.asterisk.org/c/asterisk/+/19707

to look at the new patch set (#2).

Change subject: chan_dahdi: Fix broken hidecallerid setting.
......................................................................

chan_dahdi: Fix broken hidecallerid setting.

The hidecallerid setting in chan_dahdi.conf currently
is broken for a couple reasons.

First, the actual code in sig_analog to "allow" or "block"
Caller ID depending on this setting improperly used
ast_set_callerid instead of updating the presentation.
This issue was mostly fixed in ASTERISK_29991, and that
fix is carried forward to this code as well.

Secondly, the hidecallerid setting is set on the DAHDI
pvt but not carried forward to the analog pvt properly.
This is because the chan_dahdi config loading code improperly
set permhidecallerid to permhidecallerid from the config file,
even though hidecallerid is what is actually set from the config
file. (This is done correctly for call waiting, a few lines above.)
This is fixed to read the proper value.

Thirdly, in sig_analog, hidecallerid is set to permhidecallerid
only on hangup. This can lead to potential security vulnerabilities
as an allowed Caller ID from an initial call can "leak" into subsequent
calls if no hangup occurs between them. This is fixed by setting
hidecallerid to permcallerid when calls begin, rather than when they end.
This also means we don't need to also set hidecallerid in chan_dahdi.c
when copying from the config, as we would have to otherwise.

Fourthly, sig_analog currently only allows dialing *67 or *82 if
that would actually toggle the presentation. A comment is added
clarifying that this behavior is okay.

Finally, a couple log messages are updated to be more accurate.

ASTERISK-30349 #close

Change-Id: I45d1f3d697e833fadbc45a8fcc37f569dd9063d0
---
M channels/chan_dahdi.c
M channels/sig_analog.c
2 files changed, 75 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/07/19707/2
-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/19707
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I45d1f3d697e833fadbc45a8fcc37f569dd9063d0
Gerrit-Change-Number: 19707
Gerrit-PatchSet: 2
Gerrit-Owner: N A <asterisk at phreaknet.org>
Gerrit-Reviewer: Friendly Automation
Gerrit-Attention: N A <asterisk at phreaknet.org>
Gerrit-MessageType: newpatchset
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20221212/35efffde/attachment-0001.html>


More information about the asterisk-code-review mailing list