[Home]

Summary:ASTERISK-28364: func_strings: HASHKEYS in shared variable space cannot be retrieved
Reporter:Niksa Baldun (niksa)Labels:
Date Opened:2019-03-30 06:18:56Date Closed:2019-04-08 05:49:24
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Functions/func_strings
Versions:16.2.1 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Debian 9 stableAttachments:
Description:It is possible to create a hash in channels shared variable space like so:

{code}
Set(SHARED(HASH(test_hash,var1))=test)
{code}

And it can be read:

{code}
${SHARED(HASH(test_hash,var1))}
{code}

However, it is unclear how to call the HASHKEYS function in this case. The logical syntax would be:

{code}
${SHARED(HASHKEYS(test_hash))}
{code}

or possibly:

{code}
${HASHKEYS(SHARED(test_hash))}
{code}

But nothing is returned in either case.

I've checked, it doesn't work with hashes in global variable space, either.
Comments:By: Asterisk Team (asteriskteam) 2019-03-30 06:18:57.772-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

By: Joshua C. Colp (jcolp) 2019-04-08 05:49:24.699-0500

The HASH dialplan functions operate on the underlying channel they are executed on. They are not aware of and do not support the SHARED functionality or global variables. Adding support for this would be considered a new feature. If you'd like to add support for this feel free to reopen.