Retrieving a Global or channel variable's value by name?

Hi all,

Is there a way to call a variable’s value by name?

Example

[code][globals]
JOHN_123

[somecontext]
exten=>s,1,Set(first_part=JOHN)
exten=>s,2,Set(last_part=_123)
exten=>s,3,Set(${$first_part}${last_part}}=123)[/code]

Thanks,

Lee

what result do you get ? i think you’d be able to use this kind of logic more easily using the ASTDB rather than channel/global variables

I haven’t actually tested it yet. I need to set up an asterisk box that is not used for production. I have setup a vmWare/centos package which I need to install asterisk on. I will try it next day or so, but was curious if anyone knew the validity of the code off hand.

Thanks for responding,
Lee

A little more research turns up the “EVAL” function:

voip-info.org/wiki/index.php … +func+eval

If I understand it, this is what I think I need. I will try it.

Lee