]> git.ipfire.org Git - thirdparty/asterisk.git/commit
pbx: Add variable substitution API for extensions
authorNaveen Albert <asterisk@phreaknet.org>
Mon, 15 Nov 2021 21:08:11 +0000 (21:08 +0000)
committerFriendly Automation <jenkins2@gerrit.asterisk.org>
Mon, 13 Dec 2021 17:18:04 +0000 (11:18 -0600)
commitbf28c2901d93f1d96544e31a4f1eace46995f7f4
treecc38baeb680c057cdc51a5bb9931e0d06db98946
parent9eba9f44d64cc5cd587f6007cb66d7a1ad32948a
pbx: Add variable substitution API for extensions

Currently, variable substitution involving dialplan
extensions is quite clunky since it entails obtaining
the current dialplan location, backing it up, storing
the desired variables for substitution on the channel,
performing substitution, then restoring the original
location.

In addition to being clunky, things could also go wrong
if an async goto were to occur and change the dialplan
location during a substitution.

Fundamentally, there's no reason it needs to be done this
way, so new API is added to allow for directly passing in
the dialplan location for the purposes of variable
substitution so we don't need to mess with the channel
information anymore. Existing API is not changed.

ASTERISK-29745 #close

Change-Id: I23273bf27fa0efb64a606eebf9aa8e2f41a065e4
include/asterisk/pbx.h
main/pbx.c
main/pbx_variables.c