Pass variable from Call manager to AGI

I have an application setup that uses the telnet call manager API and originate to place a call. I need to get a variable from the Manager API, through to the placed call so that I can pass it to the AGI script. I tried using the Variable: line with the manager API but I cant seem to get the variable back after the call is placed. Any ideas would be helpfull…

Not sure what you mean when you say, “I cant seem to get the variable back after the call is placed”.

Post the call paramters that you send.
In the first context for your call’s destination, can you put in a line with NoOP( My variable from manager is: ${myvariable} )
where myvariable is the name of your variable that you passed with the manager. Does it give you the variable result?
Also, are you sure that the variable you are sending from the manager is not null or whitespace?

I’m an ami newb but am passing variables to dialplan ok.

I was having a hard time reading a variable out with an agi php script, I solved the problem by calling the php script out of the asterisk manager session, and trailing it with the variables that were needed.

so like


I was trying to send the call to an extension and then execute the php passing a variable to it, I could not seem to make that work right. thanks for the follow up tho, I apreciate it.