If you’re just starting out; I’d recommend taking a look at the ARI - the Asterisk REST Interface - an API (which many libs written for it) which allows you to control Asterisk and it’s channels using an API. Take a look at Asterisk ARI and Bridges (the things you’ll use to connect the channels together) - https://wiki.asterisk.org/wiki/display/AST/Introduction+to+ARI+and+Bridges
Is there a specific reason you were looking at using the AMI?
You could create the outgoing call using AMI and direct it to a place in the dialplan. AMI itself isn’t designed to have such control over operations, so you would need to write a combination of AMI and dialplan. I don’t really have an example for doing this.