How to use Channel Variables in AGI exec function?

I am using PHP AGI. My AGI Code is like below :
$agi->exec('noop','${EXTEN}');

I want to use value of ${EXTEN} variable in AGI. It will consider as string and verbose it as it is in CLI.

Thank you for your efforts!!!

The arguments to exec are not evaluated for dialplan variables. You need to retrieve the variable using get_variable and pass it in.

A post was split to a new topic: AMI AGI Getting channel variable