[Asterisk-code-review] pbx_variables: Add variable registration and validation (asterisk[master])

N A asteriskteam at digium.com
Tue Jan 25 17:21:57 CST 2022


Attention is currently required from: Sean Bright, Joshua Colp, Kevin Harwell.
Hello Sean Bright, Kevin Harwell, Friendly Automation, 

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

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

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

Change subject: pbx_variables: Add variable registration and validation
......................................................................

pbx_variables: Add variable registration and validation

Adds a mechanism for modules to register the special
variables they use with the PBX core. This allows us
to do a few things:

First, a CLI command is added to allow the user to see
all special Asterisk variables, along with a description
of what each variable is for. This includes core Asterisk
variables and those registered by modules.

Secondly, at runtime the variable setter now is aware
of what variables names are reserved and in use by
Asterisk, and it can throw a warning if a user tries to
set one of these variables. This operation would currently
fail, but would do so silently since the variable would
be saved to the channel; however, it can never be retrieved
as the variable substituter will match a built-in first,
and thus the stored value is not usable.

Consequently, more robust variable validation is now
possible and users are warned about conflicts with
variable set operations.

ASTERISK-29849 #close

Change-Id: Iad3b8d9833c7d9debe04aca59260d7316c3ad28c
---
M apps/app_morsecode.c
M include/asterisk/chanvars.h
M include/asterisk/pbx.h
M main/pbx_variables.c
4 files changed, 376 insertions(+), 4 deletions(-)


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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Iad3b8d9833c7d9debe04aca59260d7316c3ad28c
Gerrit-Change-Number: 17792
Gerrit-PatchSet: 4
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Sean Bright <sean at seanbright.com>
Gerrit-CC: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: Sean Bright <sean at seanbright.com>
Gerrit-Attention: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: newpatchset
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220125/208a9342/attachment.html>


More information about the asterisk-code-review mailing list