[Home]

Summary:ASTERISK-28796: func_channel: cannot read fields exten, context, userfield, channame from dialplan
Reporter:Sébastien Duthil (sduthil)Labels:
Date Opened:2020-03-31 14:59:14Date Closed:2020-04-08 09:15:01
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Functions/func_channel
Versions:17.3.0 Frequency of
Occurrence
Related
Issues:
Environment:Debian 10 Buster, Asterisk 17.3.0Attachments:
Description:Given the following dialplan:
{noformat}
[default]
exten = 123456,1,NoOp(CHANNEL function demo)
same = n,Set(CHANNEL(userfield)=something)
same = n,NoOp(exten: ${CHANNEL(exten)})
same = n,NoOp(context: ${CHANNEL(context)})
same = n,NoOp(userfield: ${CHANNEL(userfield)})
same = n,NoOp(channame: ${CHANNEL(channame)})
same = n,Hangup
{noformat}
When I call 123456
Then I see in the console:
{noformat}
Executing [123456@default:1] NoOp("PJSIP/caller-00000001", "CHANNEL function demo")
Executing [123456@default:2] Set("PJSIP/caller-00000001", "CHANNEL(userfield)=something")
WARNING[0001][C-00000001]: func_channel.c:463 func_channel_read: Unknown or unavailable item requested: 'exten'
Executing [123456@default:3] NoOp("PJSIP/caller-00000001", "exten: ")
WARNING[0001][C-00000001]: func_channel.c:463 func_channel_read: Unknown or unavailable item requested: 'context'
Executing [123456@default:4] NoOp("PJSIP/caller-00000001", "context: ")
WARNING[0001][C-00000001]: func_channel.c:463 func_channel_read: Unknown or unavailable item requested: 'userfield'
Executing [123456@default:5] NoOp("PJSIP/caller-00000001", "userfield: ")
WARNING[0001][C-00000001]: func_channel.c:463 func_channel_read: Unknown or unavailable item requested: 'channame'
Executing [123456@default:6] NoOp("PJSIP/caller-00000001", "channame: ")
{noformat}

Expected: I don't see warnings, and I can see the value of exten, context, userfield and channame.
Comments:By: Asterisk Team (asteriskteam) 2020-03-31 14:59:15.631-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) 2020-04-01 12:47:51.697-0500

On IRC you mentioned providing a patch for this potentially. Is that something you are exploring?

By: Sébastien Duthil (sduthil) 2020-04-01 16:47:58.463-0500

Yes, I have a patch for this issue, and tests too. I'm just trying to get them to Gerrit, but for now, I'm stuck with this error:

{noformat}
remote: error: branch refs/publish/17/ASTERISK-28796:        
remote: You need 'Create' rights to create new references.        
remote: User: sduthil        
remote: Contact an administrator to fix the permissions        
remote:
remote: Processing changes: refs: 1
remote: Processing changes: refs: 1, done            
To ssh://gerrit.asterisk.org:29418/asterisk.git
! [remote rejected]       HEAD -> refs/publish/17/ASTERISK-28796 (prohibited by Gerrit: not permitted: create)
error: failed to push some refs to 'ssh://sduthil@gerrit.asterisk.org:29418/asterisk.git
{noformat}

I will try to understand that and push again later.

By: Joshua C. Colp (jcolp) 2020-04-01 16:52:34.703-0500

Are you using the latest version of "git-review" and have your SSH key on your account?

By: Sébastien Duthil (sduthil) 2020-04-03 13:56:22.614-0500

Thank you for the pointers. Changes are ready for review in https://gerrit.asterisk.org/c/asterisk/+/14082

By: Sébastien Duthil (sduthil) 2020-04-03 16:46:55.931-0500

I also pushed a branch in the testsuite: https://gerrit.asterisk.org/c/testsuite/+/14085

By: Friendly Automation (friendly-automation) 2020-04-08 09:15:02.336-0500

Change 14130 merged by Friendly Automation:
func_channel: allow reading 4 fields from dialplan

[https://gerrit.asterisk.org/c/asterisk/+/14130|https://gerrit.asterisk.org/c/asterisk/+/14130]

By: Friendly Automation (friendly-automation) 2020-04-08 09:23:35.117-0500

Change 14082 merged by Friendly Automation:
func_channel: allow reading 4 fields from dialplan

[https://gerrit.asterisk.org/c/asterisk/+/14082|https://gerrit.asterisk.org/c/asterisk/+/14082]

By: Friendly Automation (friendly-automation) 2020-04-08 09:48:48.480-0500

Change 14131 merged by George Joseph:
func_channel: allow reading 4 fields from dialplan

[https://gerrit.asterisk.org/c/asterisk/+/14131|https://gerrit.asterisk.org/c/asterisk/+/14131]

By: Friendly Automation (friendly-automation) 2020-04-08 09:49:18.204-0500

Change 14132 merged by George Joseph:
func_channel: allow reading 4 fields from dialplan

[https://gerrit.asterisk.org/c/asterisk/+/14132|https://gerrit.asterisk.org/c/asterisk/+/14132]