summaryrefslogtreecommitdiff
path: root/res/res_ari.c
diff options
context:
space:
mode:
authorBenjamin Ford <bford@digium.com>2015-07-14 13:12:32 -0500
committerBenjamin Keith Ford <bford@digium.com>2015-07-14 13:17:30 -0500
commit9d458b8311d6f897b4ac16401727efecaf043101 (patch)
tree52de471710d6bf9e96888fe9062e5b310aaf559d /res/res_ari.c
parent3ebe5cd7666f1f7de3c73b51c0cb610d61f23917 (diff)
ARI: Added new functionality to reload a single module.
An http request can be sent to reload an Asterisk module. If the module can not be reloaded or is not already loaded, an error response will be returned. The command "curl -v -u user:pass -X PUT 'http://localhost:8088 /ari/asterisk/modules/{moduleName}'" (or something similar, based on configuration) can be run in the terminal to access this new functionality. For more information, see: https://wiki.asterisk.org/wiki.display/~bford/Asterisk+ARI+Resource * Added new ARI functionality * Asterisk modules can be reloaded through http requests ASTERISK-25173 Change-Id: I289188bcae182b2083bdbd9ebfffd50b62f58ae1
Diffstat (limited to 'res/res_ari.c')
-rw-r--r--res/res_ari.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/res/res_ari.c b/res/res_ari.c
index bdc4379b2..0575fdecd 100644
--- a/res/res_ari.c
+++ b/res/res_ari.c
@@ -284,6 +284,13 @@ void ast_ari_response_no_content(struct ast_ari_response *response)
response->response_text = "No Content";
}
+void ast_ari_response_accepted(struct ast_ari_response *response)
+{
+ response->message = ast_json_null();
+ response->response_code = 202;
+ response->response_text = "Accepted";
+}
+
void ast_ari_response_alloc_failed(struct ast_ari_response *response)
{
response->message = ast_json_ref(oom_json);