<p>N A has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/19603">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">chan_dahdi: Fix Caller ID presentation for FXO ports.<br><br>Currently, the presentation for incoming channels is<br>always available, because it is never actually set,<br>meaning the channel presentation can be nonsensical.<br>If the presentation from the incoming Caller ID spill<br>is private or unavailable, we now update the channel<br>presentation to reflect this.<br><br>ASTERISK-30333 #close<br><br>Change-Id: Ic16111998ae82eaf3068c1fe889c1ffdf81c9dde<br>---<br>M channels/chan_dahdi.c<br>1 file changed, 30 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/03/19603/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c</span><br><span>index 5607eb0..f2b707f 100644</span><br><span>--- a/channels/chan_dahdi.c</span><br><span>+++ b/channels/chan_dahdi.c</span><br><span>@@ -1447,6 +1447,18 @@</span><br><span>                     if (num)</span><br><span>                             ast_copy_string(numbuf, num, ANALOG_MAX_CID);</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+                     if (flags & (CID_PRIVATE_NUMBER | CID_UNKNOWN_NUMBER)) {</span><br><span style="color: hsl(120, 100%, 40%);">+                          /* If we got a presentation, we must set it on the channel */</span><br><span style="color: hsl(120, 100%, 40%);">+                         struct ast_channel *chan = analog_p->ss_astchan;</span><br><span style="color: hsl(120, 100%, 40%);">+                           struct ast_party_caller caller;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+                             ast_party_caller_set_init(&caller, ast_channel_caller(chan));</span><br><span style="color: hsl(120, 100%, 40%);">+                             caller.id.name.presentation = caller.id.number.presentation = (flags & CID_PRIVATE_NUMBER) ?</span><br><span style="color: hsl(120, 100%, 40%);">+                                      AST_PRES_RESTRICTED | AST_PRES_USER_NUMBER_UNSCREENED : AST_PRES_UNAVAILABLE | AST_PRES_USER_NUMBER_UNSCREENED;</span><br><span style="color: hsl(120, 100%, 40%);">+                               ast_party_caller_set(ast_channel_caller(chan), &caller, NULL);</span><br><span style="color: hsl(120, 100%, 40%);">+                            ast_party_caller_free(&caller);</span><br><span style="color: hsl(120, 100%, 40%);">+                   }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>                  ast_debug(1, "CallerID number: %s, name: %s, flags=%d\n", num, name, flags);</span><br><span>                       return 0;</span><br><span>            }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/19603">change 19603</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/19603"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ic16111998ae82eaf3068c1fe889c1ffdf81c9dde </div>
<div style="display:none"> Gerrit-Change-Number: 19603 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: N A <asterisk@phreaknet.org> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>