mirror of
https://github.com/asterisk/asterisk
synced 2026-08-07 10:32:13 -04:00
This commit adds the ability to make ARI REST requests over the same websocket used to receive events. For full details on how to use the new capability, visit... https://docs.asterisk.org/Configuration/Interfaces/Asterisk-REST-Interface-ARI/ARI-REST-over-WebSocket/ Changes: * Added utilities to http.c: * ast_get_http_method_from_string(). * ast_http_parse_post_form(). * Added utilities to json.c: * ast_json_nvp_array_to_ast_variables(). * ast_variables_to_json_nvp_array(). * Added definitions for new events to carry REST responses. * Created res/ari/ari_websocket_requests.c to house the new request handlers. * Moved non-event specific code out of res/ari/resource_events.c into res/ari/ari_websockets.c * Refactored res/res_ari.c to move non-http code out of ast_ari_callback() (which is http specific) and into ast_ari_invoke() so it can be shared between both the http and websocket transports. UpgradeNote: This commit adds the ability to make ARI REST requests over the same websocket used to receive events. See https://docs.asterisk.org/Configuration/Interfaces/Asterisk-REST-Interface-ARI/ARI-REST-over-WebSocket/ |
||
|---|---|---|
| .. | ||
| api.wiki.mustache | ||
| ari.make.mustache | ||
| ari_model_validators.c.mustache | ||
| ari_model_validators.h.mustache | ||
| ari_resource.c.mustache | ||
| ari_resource.h.mustache | ||
| asterisk_processor.py | ||
| body_parsing.mustache | ||
| do-not-edit.mustache | ||
| make_ari_stubs.py | ||
| models.wiki.mustache | ||
| odict.py | ||
| param_cleanup.mustache | ||
| param_parsing.mustache | ||
| README.txt | ||
| res_ari_resource.c.mustache | ||
| rest_handler.mustache | ||
| swagger_model.py | ||
| transform.py | ||
This directory contains templates and template processing code for generating HTTP bindings for the RESTful API's. The RESTful API's are declared using [Swagger][swagger]. While Swagger provides a [code generating toolkit][swagger-codegen], it requires Java to run, which would be an unusual dependency to require for Asterisk developers. This code generator is similar, but written in Python. Templates are processed by using [pystache][pystache], which is a fairly simply Python implementation of [mustache][mustache]. [swagger]: https://github.com/wordnik/swagger-core/wiki [swagger-codegen]: https://github.com/wordnik/swagger-codegen [pystache]: https://github.com/defunkt/pystache [mustache]: http://mustache.github.io/