Process a variable in a string.

Home » Asterisk Users » Process a variable in a string.
Asterisk Users 1 Comment

I have a string value from a database that has a reference to a global
variable ${myglobalvar}. When I set the value it sets it to
the string what is in the database and does not evulate the variable
inside. Any ideas how to force an evaluation as part of a set?

example: l_databaseVariableName = MyTrunk
l_databaseVariableValue = ${myglobalvar}
myglobalvar = Target_Trunk

exten =>
doVtype-1,1,Set(${l_databaseVariableName}=${l_databaseVariableValue}

I need variable MyTrunk to = Target_Trunk
The above sets MyTrunk to = ${myglobalvar}

Any suggestions would be apperciated, And I would not prefer to set the
database value for l_databaseVariableValue to Target_Trunk Any suggestions
would be apperciated, And I would not prefer to set the database value for
l_databaseVariableValue to Target_Trunk Thanks
Bryant

One thought on - Process a variable in a string.