The right way to pass argument to AGI in your dial plan is:
exten=>_0.,n,AGI(CALLyourAGI,${VARIABLE})
Before calling your AGI you can display in your CLI if the variable was really setted:
[outgoing-call]
exten=>100,1,NoOP(My Variable content ${var})
exten=>100,n,AGI(agi://127.0.0.1/hello.agi,${var})
Do not forget to set verbose in the CLI
ast*CLI> core set verbose 9999
Make a call and keep your eyes on it