[asterisk-bugs] [JIRA] (ASTERISK-29486) Hint-like extension value lookup function without device state
George Joseph (JIRA)
noreply at issues.asterisk.org
Wed Aug 4 13:33:33 CDT 2021
[ https://issues.asterisk.org/jira/browse/ASTERISK-29486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=255782#comment-255782 ]
George Joseph commented on ASTERISK-29486:
------------------------------------------
bq. but the other aspect of being able to retrieve what is actually an arbitrary priority is missing here, since it locks into the GoSub framework of returning something at priority 1
Not understanding. Gosub/CALL_SUB will start at any priority you want and stop when it's hits the Return.
{code}
[customer-groups]
exten => _55XXXXX,42,Return(1)
exten => _6[23]3NXXX,1,Return(17)
exten => _652[6-9]XXX,1(somelabel),Return(${EXTEN:-4:1})
exten => _652[6-9]XXX,42(someotherlabel),Return(${EXTEN:-4:1})
[default]
same = n,DoSomething(${CALL_SUB(customer-groups,${CALLERID(num)},42))})
same = n,DoSomething(${CALL_SUB(customer-groups,${CALLERID(num)},someotherlabel))})
{code}
bq. As LOOKUP would be just a function, wouldn't that also be equally accessible from Lua/AEL?
No because LOOKUP returns a simple value and doesn't actually execute anything.
I do get your points about performance though.
Let me think more and I'll make comments on the review.
> Hint-like extension value lookup function without device state
> --------------------------------------------------------------
>
> Key: ASTERISK-29486
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-29486
> Project: Asterisk
> Issue Type: New Feature
> Security Level: None
> Components: Functions/NewFeature
> Affects Versions: 18.4.0
> Reporter: N A
> Assignee: N A
>
> This is a new function that works like the HINT function, only a separate priority is used so that device state overhead is not added. This can provide a mechanism for a fast, efficient, and clean extension value lookup in the dialplan using native core extension pattern matching capabilities to retrieve extension values, including substituting variables.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list