[asterisk-dev] Asterisk 12: ARI update
David M. Lee
dlee at digium.com
Wed Jul 3 11:34:41 CDT 2013
Hey everybody!
There's been a few people following the progress of the new Asterisk
REST Interface (ARI), so I thought I'd give an update. I also merged
in some patches this morning that change the ARI interface, so a heads
up is warranted.
If you're not familiar with ARI, please check out its project page on
[the Asterisk wiki][1]. There's also [detailed documentation][2] of
the API's themselves. We should soon have a getting started page to
offer a more complete introduction to the interface.
For those who are daring, quite a bit of the API is now implemented.
You can send calls to an ARI application; answer; play media; dial;
create bridges; bridge channels together. The code is still very new,
but early feedback is welcome!
If you've been playing around with ARI, today there are many changes
that will affect you.
* The prefix for URL's was changes from /stasis to /ari.
* The WebSocket for events was moved from /ws to /stasis/events.
* The interface now supports (and requires) authentication.
* Users are configured in ari.conf
* In addition HTTP Basic authentication, ARI allows you to
authenticate by passing ?api_key={username}:{password} as a
parameter to your request. This allows [swagger-ui][3] to
used for API documentation.
* If building with DEV_MODE enabled, responses from ARI are validated
against the API docs. If the response provided does not match the
documented response, warnings are logged and the response is
replaced with a 500 Internal Server Error.
* If you have changes to api-docs in a branch, you'll probably have
conflicts in the generated files (res/res_stasis_http_*.c,
res/res_stasis_json_*.c, and res/stasis_json/resource_*.h). Since
they're generated, the best strategy is to simply revert the files
and re-run 'make ari-stubs'.
* Oh yeah, 'make stasis-stubs' was changed to 'make ari-stubs'.
[1]: https://wiki.asterisk.org/wiki/x/CoZHAQ#Asterisk12APIImprovements-RESTfulHTTPAPI
[2]: https://wiki.asterisk.org/wiki/x/lYBbAQ
[3]: https://github.com/wordnik/swagger-ui
--
David M. Lee
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: www.digium.com & www.asterisk.org
More information about the asterisk-dev
mailing list