[asterisk-bugs] [JIRA] (ASTERISK-25373) Deprecation of CALLERPRES() function requires duplicate dialplan code

Richard Mudgett (JIRA) noreply at issues.asterisk.org
Wed Sep 9 11:06:33 CDT 2015


    [ https://issues.asterisk.org/jira/browse/ASTERISK-25373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=227547#comment-227547 ] 

Richard Mudgett commented on ASTERISK-25373:
--------------------------------------------

There is no need to add an alias for something that already exists and in fact existed before the name and number presentation split.  It would make more sense to just add the documentation for the CALLERID(pres) and also the CONNECTEDLINE and REDIRECTING variants with the behavior for read and write explained.

The name and number presentation split was a result of some messaging in ISDN that could conceivably result in differing presentation values for the name and number.  For historical reasons inside Asterisk and because SIP doesn't have any distinction between name and number presentation a combined name and number presentation value was needed.

[~rnewton] This is now just a documentation issue.

> Deprecation of CALLERPRES() function requires duplicate dialplan code
> ---------------------------------------------------------------------
>
>                 Key: ASTERISK-25373
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-25373
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Functions/func_callerid
>    Affects Versions: 11.19.0, 13.5.0
>            Reporter: Walter Doekes
>            Assignee: Unassigned
>            Severity: Minor
>
> If you use:
> {noformat}
> Set(CALLERPRES()=allowed_passed_screen)
> {noformat}
> You get a deprecationwarning:
> {noformat}
>         if (!callerpres_deprecate_notify) {
>                 callerpres_deprecate_notify = 1;
>                 ast_log(LOG_WARNING, "CALLERPRES is deprecated."
>                         "  Use CALLERID(name-pres) or CALLERID(num-pres) instead.\n");
>         }
> {noformat}
> Right now it does this:
> {noformat}
>                 chan->caller.id.name.presentation = pres;
>                 chan->caller.id.number.presentation = pres;
> {noformat}
> Which in dialplan terms would be:
> {noformat}
> Set(CALLERID(name-pres)=allowed_passed_screen)
> Set(CALLERID(num-pres)=allowed_passed_screen)
> {noformat}
> And you need to set both, because chan_sip reads it as a single value -- through {{ast_party_id_presentation()}} -- where value with the most privacy wins.
> So, I don't consider two dialplan statements an improvement over one.
> Suggested fix: add a 'all-pres' item to CALLERID.
> {noformat}
> Set(CALLERID(all-pres)=allowed_passed_screen)
> {noformat}
> Preferably in the release branches so one can get rid of deprecationwarnings sooner.
> Thanks :)



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list