Get Channel Name from AMI

Hi

I’m trying to make a web page (in php and using Asterisk Manager Interface) that redirects my actual call to a especific context when I press a button. My problem is with the parameter * Channel: Channel to redirect

i’m trying with Channel: SIP/MyExtension but shows me the message Message: Channel does not exist: SIP/6004

How can I know the channel name of a call???

Thanks a lot!

Regards

AMI doesnt talk to a specific channel, but to asterisk as a whole. therefore you’re the one that has to know what channel you are talking about. for example, you may want your php page obtain the list of all active channels (use an AMI Command action with “core show channels concise” and parse the response); display the channels in a table, with a button each; and let the user decide which channel they want to have the redirect operation on.

Can you please explaint in php code for example how can I get informations from AMI?