Use proper case for checking if digest authentication is used.
[asterisk/asterisk.git] / res / res_ari_recordings.c
index a63f37b..56fb9ec 100644 (file)
@@ -41,6 +41,7 @@
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
+#include "asterisk/app.h"
 #include "asterisk/module.h"
 #include "asterisk/stasis_app.h"
 #include "ari/resource_recordings.h"
@@ -48,6 +49,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #include "ari/ari_model_validators.h"
 #endif
 
+#define MAX_VALS 128
+
 /*!
  * \brief Parameter parsing callback for /recordings/stored.
  * \param get_params GET parameters in the HTTP request.
@@ -55,17 +58,19 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
  * \param headers HTTP headers.
  * \param[out] response Response to the HTTP request.
  */
-static void ast_ari_get_stored_recordings_cb(
+static void ast_ari_recordings_list_stored_cb(
+       struct ast_tcptls_session_instance *ser,
        struct ast_variable *get_params, struct ast_variable *path_vars,
        struct ast_variable *headers, struct ast_ari_response *response)
 {
+       struct ast_ari_recordings_list_stored_args args = {};
+       RAII_VAR(struct ast_json *, body, NULL, ast_json_unref);
 #if defined(AST_DEVMODE)
        int is_valid;
        int code;
 #endif /* AST_DEVMODE */
 
-       struct ast_get_stored_recordings_args args = {};
-       ast_ari_get_stored_recordings(headers, &args, response);
+       ast_ari_recordings_list_stored(headers, &args, response);
 #if defined(AST_DEVMODE)
        code = response->response_code;
 
@@ -93,6 +98,9 @@ static void ast_ari_get_stored_recordings_cb(
                        "Internal Server Error", "Response validation failed");
        }
 #endif /* AST_DEVMODE */
+
+fin: __attribute__((unused))
+       return;
 }
 /*!
  * \brief Parameter parsing callback for /recordings/stored/{recordingName}.
@@ -101,25 +109,26 @@ static void ast_ari_get_stored_recordings_cb(
  * \param headers HTTP headers.
  * \param[out] response Response to the HTTP request.
  */
-static void ast_ari_get_stored_recording_cb(
+static void ast_ari_recordings_get_stored_cb(
+       struct ast_tcptls_session_instance *ser,
        struct ast_variable *get_params, struct ast_variable *path_vars,
        struct ast_variable *headers, struct ast_ari_response *response)
 {
+       struct ast_ari_recordings_get_stored_args args = {};
+       struct ast_variable *i;
+       RAII_VAR(struct ast_json *, body, NULL, ast_json_unref);
 #if defined(AST_DEVMODE)
        int is_valid;
        int code;
 #endif /* AST_DEVMODE */
 
-       struct ast_get_stored_recording_args args = {};
-       struct ast_variable *i;
-
        for (i = path_vars; i; i = i->next) {
                if (strcmp(i->name, "recordingName") == 0) {
                        args.recording_name = (i->value);
                } else
                {}
        }
-       ast_ari_get_stored_recording(headers, &args, response);
+       ast_ari_recordings_get_stored(headers, &args, response);
 #if defined(AST_DEVMODE)
        code = response->response_code;
 
@@ -129,6 +138,7 @@ static void ast_ari_get_stored_recording_cb(
                break;
        case 500: /* Internal Server Error */
        case 501: /* Not Implemented */
+       case 404: /* Recording not found */
                is_valid = 1;
                break;
        default:
@@ -147,6 +157,9 @@ static void ast_ari_get_stored_recording_cb(
                        "Internal Server Error", "Response validation failed");
        }
 #endif /* AST_DEVMODE */
+
+fin: __attribute__((unused))
+       return;
 }
 /*!
  * \brief Parameter parsing callback for /recordings/stored/{recordingName}.
@@ -155,25 +168,26 @@ static void ast_ari_get_stored_recording_cb(
  * \param headers HTTP headers.
  * \param[out] response Response to the HTTP request.
  */
-static void ast_ari_delete_stored_recording_cb(
+static void ast_ari_recordings_delete_stored_cb(
+       struct ast_tcptls_session_instance *ser,
        struct ast_variable *get_params, struct ast_variable *path_vars,
        struct ast_variable *headers, struct ast_ari_response *response)
 {
+       struct ast_ari_recordings_delete_stored_args args = {};
+       struct ast_variable *i;
+       RAII_VAR(struct ast_json *, body, NULL, ast_json_unref);
 #if defined(AST_DEVMODE)
        int is_valid;
        int code;
 #endif /* AST_DEVMODE */
 
-       struct ast_delete_stored_recording_args args = {};
-       struct ast_variable *i;
-
        for (i = path_vars; i; i = i->next) {
                if (strcmp(i->name, "recordingName") == 0) {
                        args.recording_name = (i->value);
                } else
                {}
        }
-       ast_ari_delete_stored_recording(headers, &args, response);
+       ast_ari_recordings_delete_stored(headers, &args, response);
 #if defined(AST_DEVMODE)
        code = response->response_code;
 
@@ -183,6 +197,7 @@ static void ast_ari_delete_stored_recording_cb(
                break;
        case 500: /* Internal Server Error */
        case 501: /* Not Implemented */
+       case 404: /* Recording not found */
                is_valid = 1;
                break;
        default:
@@ -201,52 +216,9 @@ static void ast_ari_delete_stored_recording_cb(
                        "Internal Server Error", "Response validation failed");
        }
 #endif /* AST_DEVMODE */
-}
-/*!
- * \brief Parameter parsing callback for /recordings/live.
- * \param get_params GET parameters in the HTTP request.
- * \param path_vars Path variables extracted from the request.
- * \param headers HTTP headers.
- * \param[out] response Response to the HTTP request.
- */
-static void ast_ari_get_live_recordings_cb(
-       struct ast_variable *get_params, struct ast_variable *path_vars,
-       struct ast_variable *headers, struct ast_ari_response *response)
-{
-#if defined(AST_DEVMODE)
-       int is_valid;
-       int code;
-#endif /* AST_DEVMODE */
 
-       struct ast_get_live_recordings_args args = {};
-       ast_ari_get_live_recordings(headers, &args, response);
-#if defined(AST_DEVMODE)
-       code = response->response_code;
-
-       switch (code) {
-       case 0: /* Implementation is still a stub, or the code wasn't set */
-               is_valid = response->message == NULL;
-               break;
-       case 500: /* Internal Server Error */
-       case 501: /* Not Implemented */
-               is_valid = 1;
-               break;
-       default:
-               if (200 <= code && code <= 299) {
-                       is_valid = ast_ari_validate_list(response->message,
-                               ast_ari_validate_live_recording_fn());
-               } else {
-                       ast_log(LOG_ERROR, "Invalid error response %d for /recordings/live\n", code);
-                       is_valid = 0;
-               }
-       }
-
-       if (!is_valid) {
-               ast_log(LOG_ERROR, "Response validation failed for /recordings/live\n");
-               ast_ari_response_error(response, 500,
-                       "Internal Server Error", "Response validation failed");
-       }
-#endif /* AST_DEVMODE */
+fin: __attribute__((unused))
+       return;
 }
 /*!
  * \brief Parameter parsing callback for /recordings/live/{recordingName}.
@@ -255,25 +227,26 @@ static void ast_ari_get_live_recordings_cb(
  * \param headers HTTP headers.
  * \param[out] response Response to the HTTP request.
  */
-static void ast_ari_get_live_recording_cb(
+static void ast_ari_recordings_get_live_cb(
+       struct ast_tcptls_session_instance *ser,
        struct ast_variable *get_params, struct ast_variable *path_vars,
        struct ast_variable *headers, struct ast_ari_response *response)
 {
+       struct ast_ari_recordings_get_live_args args = {};
+       struct ast_variable *i;
+       RAII_VAR(struct ast_json *, body, NULL, ast_json_unref);
 #if defined(AST_DEVMODE)
        int is_valid;
        int code;
 #endif /* AST_DEVMODE */
 
-       struct ast_get_live_recording_args args = {};
-       struct ast_variable *i;
-
        for (i = path_vars; i; i = i->next) {
                if (strcmp(i->name, "recordingName") == 0) {
                        args.recording_name = (i->value);
                } else
                {}
        }
-       ast_ari_get_live_recording(headers, &args, response);
+       ast_ari_recordings_get_live(headers, &args, response);
 #if defined(AST_DEVMODE)
        code = response->response_code;
 
@@ -283,6 +256,7 @@ static void ast_ari_get_live_recording_cb(
                break;
        case 500: /* Internal Server Error */
        case 501: /* Not Implemented */
+       case 404: /* Recording not found */
                is_valid = 1;
                break;
        default:
@@ -301,6 +275,9 @@ static void ast_ari_get_live_recording_cb(
                        "Internal Server Error", "Response validation failed");
        }
 #endif /* AST_DEVMODE */
+
+fin: __attribute__((unused))
+       return;
 }
 /*!
  * \brief Parameter parsing callback for /recordings/live/{recordingName}.
@@ -309,25 +286,26 @@ static void ast_ari_get_live_recording_cb(
  * \param headers HTTP headers.
  * \param[out] response Response to the HTTP request.
  */
-static void ast_ari_cancel_recording_cb(
+static void ast_ari_recordings_cancel_cb(
+       struct ast_tcptls_session_instance *ser,
        struct ast_variable *get_params, struct ast_variable *path_vars,
        struct ast_variable *headers, struct ast_ari_response *response)
 {
+       struct ast_ari_recordings_cancel_args args = {};
+       struct ast_variable *i;
+       RAII_VAR(struct ast_json *, body, NULL, ast_json_unref);
 #if defined(AST_DEVMODE)
        int is_valid;
        int code;
 #endif /* AST_DEVMODE */
 
-       struct ast_cancel_recording_args args = {};
-       struct ast_variable *i;
-
        for (i = path_vars; i; i = i->next) {
                if (strcmp(i->name, "recordingName") == 0) {
                        args.recording_name = (i->value);
                } else
                {}
        }
-       ast_ari_cancel_recording(headers, &args, response);
+       ast_ari_recordings_cancel(headers, &args, response);
 #if defined(AST_DEVMODE)
        code = response->response_code;
 
@@ -337,6 +315,7 @@ static void ast_ari_cancel_recording_cb(
                break;
        case 500: /* Internal Server Error */
        case 501: /* Not Implemented */
+       case 404: /* Recording not found */
                is_valid = 1;
                break;
        default:
@@ -355,6 +334,9 @@ static void ast_ari_cancel_recording_cb(
                        "Internal Server Error", "Response validation failed");
        }
 #endif /* AST_DEVMODE */
+
+fin: __attribute__((unused))
+       return;
 }
 /*!
  * \brief Parameter parsing callback for /recordings/live/{recordingName}/stop.
@@ -363,25 +345,26 @@ static void ast_ari_cancel_recording_cb(
  * \param headers HTTP headers.
  * \param[out] response Response to the HTTP request.
  */
-static void ast_ari_stop_recording_cb(
+static void ast_ari_recordings_stop_cb(
+       struct ast_tcptls_session_instance *ser,
        struct ast_variable *get_params, struct ast_variable *path_vars,
        struct ast_variable *headers, struct ast_ari_response *response)
 {
+       struct ast_ari_recordings_stop_args args = {};
+       struct ast_variable *i;
+       RAII_VAR(struct ast_json *, body, NULL, ast_json_unref);
 #if defined(AST_DEVMODE)
        int is_valid;
        int code;
 #endif /* AST_DEVMODE */
 
-       struct ast_stop_recording_args args = {};
-       struct ast_variable *i;
-
        for (i = path_vars; i; i = i->next) {
                if (strcmp(i->name, "recordingName") == 0) {
                        args.recording_name = (i->value);
                } else
                {}
        }
-       ast_ari_stop_recording(headers, &args, response);
+       ast_ari_recordings_stop(headers, &args, response);
 #if defined(AST_DEVMODE)
        code = response->response_code;
 
@@ -391,6 +374,7 @@ static void ast_ari_stop_recording_cb(
                break;
        case 500: /* Internal Server Error */
        case 501: /* Not Implemented */
+       case 404: /* Recording not found */
                is_valid = 1;
                break;
        default:
@@ -409,6 +393,9 @@ static void ast_ari_stop_recording_cb(
                        "Internal Server Error", "Response validation failed");
        }
 #endif /* AST_DEVMODE */
+
+fin: __attribute__((unused))
+       return;
 }
 /*!
  * \brief Parameter parsing callback for /recordings/live/{recordingName}/pause.
@@ -417,25 +404,26 @@ static void ast_ari_stop_recording_cb(
  * \param headers HTTP headers.
  * \param[out] response Response to the HTTP request.
  */
-static void ast_ari_pause_recording_cb(
+static void ast_ari_recordings_pause_cb(
+       struct ast_tcptls_session_instance *ser,
        struct ast_variable *get_params, struct ast_variable *path_vars,
        struct ast_variable *headers, struct ast_ari_response *response)
 {
+       struct ast_ari_recordings_pause_args args = {};
+       struct ast_variable *i;
+       RAII_VAR(struct ast_json *, body, NULL, ast_json_unref);
 #if defined(AST_DEVMODE)
        int is_valid;
        int code;
 #endif /* AST_DEVMODE */
 
-       struct ast_pause_recording_args args = {};
-       struct ast_variable *i;
-
        for (i = path_vars; i; i = i->next) {
                if (strcmp(i->name, "recordingName") == 0) {
                        args.recording_name = (i->value);
                } else
                {}
        }
-       ast_ari_pause_recording(headers, &args, response);
+       ast_ari_recordings_pause(headers, &args, response);
 #if defined(AST_DEVMODE)
        code = response->response_code;
 
@@ -445,6 +433,8 @@ static void ast_ari_pause_recording_cb(
                break;
        case 500: /* Internal Server Error */
        case 501: /* Not Implemented */
+       case 404: /* Recording not found */
+       case 409: /* Recording not in session */
                is_valid = 1;
                break;
        default:
@@ -463,33 +453,37 @@ static void ast_ari_pause_recording_cb(
                        "Internal Server Error", "Response validation failed");
        }
 #endif /* AST_DEVMODE */
+
+fin: __attribute__((unused))
+       return;
 }
 /*!
- * \brief Parameter parsing callback for /recordings/live/{recordingName}/unpause.
+ * \brief Parameter parsing callback for /recordings/live/{recordingName}/pause.
  * \param get_params GET parameters in the HTTP request.
  * \param path_vars Path variables extracted from the request.
  * \param headers HTTP headers.
  * \param[out] response Response to the HTTP request.
  */
-static void ast_ari_unpause_recording_cb(
+static void ast_ari_recordings_unpause_cb(
+       struct ast_tcptls_session_instance *ser,
        struct ast_variable *get_params, struct ast_variable *path_vars,
        struct ast_variable *headers, struct ast_ari_response *response)
 {
+       struct ast_ari_recordings_unpause_args args = {};
+       struct ast_variable *i;
+       RAII_VAR(struct ast_json *, body, NULL, ast_json_unref);
 #if defined(AST_DEVMODE)
        int is_valid;
        int code;
 #endif /* AST_DEVMODE */
 
-       struct ast_unpause_recording_args args = {};
-       struct ast_variable *i;
-
        for (i = path_vars; i; i = i->next) {
                if (strcmp(i->name, "recordingName") == 0) {
                        args.recording_name = (i->value);
                } else
                {}
        }
-       ast_ari_unpause_recording(headers, &args, response);
+       ast_ari_recordings_unpause(headers, &args, response);
 #if defined(AST_DEVMODE)
        code = response->response_code;
 
@@ -499,6 +493,8 @@ static void ast_ari_unpause_recording_cb(
                break;
        case 500: /* Internal Server Error */
        case 501: /* Not Implemented */
+       case 404: /* Recording not found */
+       case 409: /* Recording not in session */
                is_valid = 1;
                break;
        default:
@@ -506,17 +502,20 @@ static void ast_ari_unpause_recording_cb(
                        is_valid = ast_ari_validate_void(
                                response->message);
                } else {
-                       ast_log(LOG_ERROR, "Invalid error response %d for /recordings/live/{recordingName}/unpause\n", code);
+                       ast_log(LOG_ERROR, "Invalid error response %d for /recordings/live/{recordingName}/pause\n", code);
                        is_valid = 0;
                }
        }
 
        if (!is_valid) {
-               ast_log(LOG_ERROR, "Response validation failed for /recordings/live/{recordingName}/unpause\n");
+               ast_log(LOG_ERROR, "Response validation failed for /recordings/live/{recordingName}/pause\n");
                ast_ari_response_error(response, 500,
                        "Internal Server Error", "Response validation failed");
        }
 #endif /* AST_DEVMODE */
+
+fin: __attribute__((unused))
+       return;
 }
 /*!
  * \brief Parameter parsing callback for /recordings/live/{recordingName}/mute.
@@ -525,25 +524,26 @@ static void ast_ari_unpause_recording_cb(
  * \param headers HTTP headers.
  * \param[out] response Response to the HTTP request.
  */
-static void ast_ari_mute_recording_cb(
+static void ast_ari_recordings_mute_cb(
+       struct ast_tcptls_session_instance *ser,
        struct ast_variable *get_params, struct ast_variable *path_vars,
        struct ast_variable *headers, struct ast_ari_response *response)
 {
+       struct ast_ari_recordings_mute_args args = {};
+       struct ast_variable *i;
+       RAII_VAR(struct ast_json *, body, NULL, ast_json_unref);
 #if defined(AST_DEVMODE)
        int is_valid;
        int code;
 #endif /* AST_DEVMODE */
 
-       struct ast_mute_recording_args args = {};
-       struct ast_variable *i;
-
        for (i = path_vars; i; i = i->next) {
                if (strcmp(i->name, "recordingName") == 0) {
                        args.recording_name = (i->value);
                } else
                {}
        }
-       ast_ari_mute_recording(headers, &args, response);
+       ast_ari_recordings_mute(headers, &args, response);
 #if defined(AST_DEVMODE)
        code = response->response_code;
 
@@ -553,6 +553,8 @@ static void ast_ari_mute_recording_cb(
                break;
        case 500: /* Internal Server Error */
        case 501: /* Not Implemented */
+       case 404: /* Recording not found */
+       case 409: /* Recording not in session */
                is_valid = 1;
                break;
        default:
@@ -571,33 +573,37 @@ static void ast_ari_mute_recording_cb(
                        "Internal Server Error", "Response validation failed");
        }
 #endif /* AST_DEVMODE */
+
+fin: __attribute__((unused))
+       return;
 }
 /*!
- * \brief Parameter parsing callback for /recordings/live/{recordingName}/unmute.
+ * \brief Parameter parsing callback for /recordings/live/{recordingName}/mute.
  * \param get_params GET parameters in the HTTP request.
  * \param path_vars Path variables extracted from the request.
  * \param headers HTTP headers.
  * \param[out] response Response to the HTTP request.
  */
-static void ast_ari_unmute_recording_cb(
+static void ast_ari_recordings_unmute_cb(
+       struct ast_tcptls_session_instance *ser,
        struct ast_variable *get_params, struct ast_variable *path_vars,
        struct ast_variable *headers, struct ast_ari_response *response)
 {
+       struct ast_ari_recordings_unmute_args args = {};
+       struct ast_variable *i;
+       RAII_VAR(struct ast_json *, body, NULL, ast_json_unref);
 #if defined(AST_DEVMODE)
        int is_valid;
        int code;
 #endif /* AST_DEVMODE */
 
-       struct ast_unmute_recording_args args = {};
-       struct ast_variable *i;
-
        for (i = path_vars; i; i = i->next) {
                if (strcmp(i->name, "recordingName") == 0) {
                        args.recording_name = (i->value);
                } else
                {}
        }
-       ast_ari_unmute_recording(headers, &args, response);
+       ast_ari_recordings_unmute(headers, &args, response);
 #if defined(AST_DEVMODE)
        code = response->response_code;
 
@@ -607,6 +613,8 @@ static void ast_ari_unmute_recording_cb(
                break;
        case 500: /* Internal Server Error */
        case 501: /* Not Implemented */
+       case 404: /* Recording not found */
+       case 409: /* Recording not in session */
                is_valid = 1;
                break;
        default:
@@ -614,17 +622,20 @@ static void ast_ari_unmute_recording_cb(
                        is_valid = ast_ari_validate_void(
                                response->message);
                } else {
-                       ast_log(LOG_ERROR, "Invalid error response %d for /recordings/live/{recordingName}/unmute\n", code);
+                       ast_log(LOG_ERROR, "Invalid error response %d for /recordings/live/{recordingName}/mute\n", code);
                        is_valid = 0;
                }
        }
 
        if (!is_valid) {
-               ast_log(LOG_ERROR, "Response validation failed for /recordings/live/{recordingName}/unmute\n");
+               ast_log(LOG_ERROR, "Response validation failed for /recordings/live/{recordingName}/mute\n");
                ast_ari_response_error(response, 500,
                        "Internal Server Error", "Response validation failed");
        }
 #endif /* AST_DEVMODE */
+
+fin: __attribute__((unused))
+       return;
 }
 
 /*! \brief REST handler for /api-docs/recordings.{format} */
@@ -632,8 +643,8 @@ static struct stasis_rest_handlers recordings_stored_recordingName = {
        .path_segment = "recordingName",
        .is_wildcard = 1,
        .callbacks = {
-               [AST_HTTP_GET] = ast_ari_get_stored_recording_cb,
-               [AST_HTTP_DELETE] = ast_ari_delete_stored_recording_cb,
+               [AST_HTTP_GET] = ast_ari_recordings_get_stored_cb,
+               [AST_HTTP_DELETE] = ast_ari_recordings_delete_stored_cb,
        },
        .num_children = 0,
        .children = {  }
@@ -642,7 +653,7 @@ static struct stasis_rest_handlers recordings_stored_recordingName = {
 static struct stasis_rest_handlers recordings_stored = {
        .path_segment = "stored",
        .callbacks = {
-               [AST_HTTP_GET] = ast_ari_get_stored_recordings_cb,
+               [AST_HTTP_GET] = ast_ari_recordings_list_stored_cb,
        },
        .num_children = 1,
        .children = { &recordings_stored_recordingName, }
@@ -651,7 +662,7 @@ static struct stasis_rest_handlers recordings_stored = {
 static struct stasis_rest_handlers recordings_live_recordingName_stop = {
        .path_segment = "stop",
        .callbacks = {
-               [AST_HTTP_POST] = ast_ari_stop_recording_cb,
+               [AST_HTTP_POST] = ast_ari_recordings_stop_cb,
        },
        .num_children = 0,
        .children = {  }
@@ -660,16 +671,8 @@ static struct stasis_rest_handlers recordings_live_recordingName_stop = {
 static struct stasis_rest_handlers recordings_live_recordingName_pause = {
        .path_segment = "pause",
        .callbacks = {
-               [AST_HTTP_POST] = ast_ari_pause_recording_cb,
-       },
-       .num_children = 0,
-       .children = {  }
-};
-/*! \brief REST handler for /api-docs/recordings.{format} */
-static struct stasis_rest_handlers recordings_live_recordingName_unpause = {
-       .path_segment = "unpause",
-       .callbacks = {
-               [AST_HTTP_POST] = ast_ari_unpause_recording_cb,
+               [AST_HTTP_POST] = ast_ari_recordings_pause_cb,
+               [AST_HTTP_DELETE] = ast_ari_recordings_unpause_cb,
        },
        .num_children = 0,
        .children = {  }
@@ -678,16 +681,8 @@ static struct stasis_rest_handlers recordings_live_recordingName_unpause = {
 static struct stasis_rest_handlers recordings_live_recordingName_mute = {
        .path_segment = "mute",
        .callbacks = {
-               [AST_HTTP_POST] = ast_ari_mute_recording_cb,
-       },
-       .num_children = 0,
-       .children = {  }
-};
-/*! \brief REST handler for /api-docs/recordings.{format} */
-static struct stasis_rest_handlers recordings_live_recordingName_unmute = {
-       .path_segment = "unmute",
-       .callbacks = {
-               [AST_HTTP_POST] = ast_ari_unmute_recording_cb,
+               [AST_HTTP_POST] = ast_ari_recordings_mute_cb,
+               [AST_HTTP_DELETE] = ast_ari_recordings_unmute_cb,
        },
        .num_children = 0,
        .children = {  }
@@ -697,17 +692,16 @@ static struct stasis_rest_handlers recordings_live_recordingName = {
        .path_segment = "recordingName",
        .is_wildcard = 1,
        .callbacks = {
-               [AST_HTTP_GET] = ast_ari_get_live_recording_cb,
-               [AST_HTTP_DELETE] = ast_ari_cancel_recording_cb,
+               [AST_HTTP_GET] = ast_ari_recordings_get_live_cb,
+               [AST_HTTP_DELETE] = ast_ari_recordings_cancel_cb,
        },
-       .num_children = 5,
-       .children = { &recordings_live_recordingName_stop,&recordings_live_recordingName_pause,&recordings_live_recordingName_unpause,&recordings_live_recordingName_mute,&recordings_live_recordingName_unmute, }
+       .num_children = 3,
+       .children = { &recordings_live_recordingName_stop,&recordings_live_recordingName_pause,&recordings_live_recordingName_mute, }
 };
 /*! \brief REST handler for /api-docs/recordings.{format} */
 static struct stasis_rest_handlers recordings_live = {
        .path_segment = "live",
        .callbacks = {
-               [AST_HTTP_GET] = ast_ari_get_live_recordings_cb,
        },
        .num_children = 1,
        .children = { &recordings_live_recordingName, }