What's the difference between AGI and AMI

Dear All,
I’m new here. I have a question:
What’s the difference between AGI and AMI.

Thank you in advance,
Behzad[/quote]

AGI - Asterisk Gateway Interface - provides synchronous control over a channel in asterisk using stdio and stderr. Basically anything that can read from standard input and write to standard output can control an asterisk channel via AGI.

voip-info.org/wiki/view/Asterisk+AGI

AMI - Asterisk Manager Interface - an asynchronous TCP based plain text protocol which allows asterisk to send events and receive commands.

voip-info.org/wiki/view/Asterisk+manager+API

Thank you for your reply.

hey there. So whats the difference or benefit between these two as because what i have been searching and trying to learn says that you can originate a call from AMI and also you can originate a call through AGI. So whats the difference or which on is used in which manner?

AMI is third party control, and doesn’t appear in the dialplan. AGI is first party control and always has to appear in the dialplan…