<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Fri, Aug 30, 2013 at 7:18 PM, Matt Behrens <span dir="ltr"><<a href="mailto:matt@zigg.com" target="_blank">matt@zigg.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Aug 30, 2012, at 5:15 PM, Asterisk Development Team <<a href="mailto:asteriskteam@digium.com">asteriskteam@digium.com</a>> wrote:<br>
<br>
> * The Asterisk RESTful Interface (ARI) has been added. This interface lets<br>
> external systems harness the telephony primitives within Asterisk to develop<br>
> their own communications applications. Communication with Asterisk is done<br>
> through a REST interface, while asynchronous events from Asterisk are<br>
> encoded in JSON and sent via a WebSocket. More information on ARI can be found<br>
> at <a href="https://wiki.asterisk.org/wiki/x/lYBbAQ" target="_blank">https://wiki.asterisk.org/wiki/x/lYBbAQ</a><br>
><br>
> * Major standardization of the Asterisk Manager Interface and its events have<br>
> occurred within this version. In particular, the names of Asterisk channels<br>
> no longer change and are stable throughout the lifetime of the channel.<br>
> More information on the changes in AMI can be seen in the AMI 1.4<br>
> Specification at <a href="https://wiki.asterisk.org/wiki/x/dAFRAQ" target="_blank">https://wiki.asterisk.org/wiki/x/dAFRAQ</a><br>
<br>
</div>I've been looking occasionally at how 12 work was going and I'm curious about how AMI and ARI relate. Do they effectively expose the same functionality, just offering a different style of communication? Or is there be a reason to prefer one over the other beyond the protocols used?<br>
</blockquote><div><br></div><div style>The general use cases for each protocol are a bit different, although I think some people will find areas of overlap as well.</div><div style><br></div><div style>The goal of ARI is to allow for externally controlled communications applications. Unlike AGI or AMI, you wouldn't use ARI to execute dialplan logic or Asterisk applications; you would use ARI to replace a default Asterisk dialplan application with one that performs your own business logic and rules. That's why ARI exposes a lot more of Asterisk's communication primitives and lets you control them in a fine grained fashion - if you want to write your own complex IVR or Queue, you need access to asynchronous media operations, various types of bridges, and control over multiple channels at the same time.</div>
<div style><br></div><div style>AMI, at its heart, is a call control protocol. While you can do some of what AMI does using only ARI, ARI requires handing all of the channels over to the external application through the Stasis dialplan application. If all you used was ARI, you'd lose some of the power of the dialplan. Likewise, while you can do some of what ARI does via a combination of AMI/some AGI variant, the result can be somewhat klunky and difficult to manage - particularly for complex bridging scenarios. </div>
</div><div><br></div><div style>Hope that helps!</div><div><br></div><div style>Matt</div><div style><br></div>-- <br><div dir="ltr"><div>Matthew Jordan<br></div><div>Digium, Inc. | Engineering Manager</div><div>445 Jan Davis Drive NW - Huntsville, AL 35806 - USA</div>
<div>Check us out at: <a href="http://digium.com" target="_blank">http://digium.com</a> & <a href="http://asterisk.org" target="_blank">http://asterisk.org</a></div></div>
</div></div>