Asterisk - The Open Source Telephony Project  18.5.0
Data Structures | Functions
resource_recordings.h File Reference

Generated file - declares stubs to be implemented in res/ari/resource_recordings.c. More...

#include "asterisk/ari.h"
Include dependency graph for resource_recordings.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ast_ari_recordings_cancel_args
 
struct  ast_ari_recordings_copy_stored_args
 
struct  ast_ari_recordings_delete_stored_args
 
struct  ast_ari_recordings_get_live_args
 
struct  ast_ari_recordings_get_stored_args
 
struct  ast_ari_recordings_get_stored_file_args
 
struct  ast_ari_recordings_list_stored_args
 
struct  ast_ari_recordings_mute_args
 
struct  ast_ari_recordings_pause_args
 
struct  ast_ari_recordings_stop_args
 
struct  ast_ari_recordings_unmute_args
 
struct  ast_ari_recordings_unpause_args
 

Functions

void ast_ari_recordings_cancel (struct ast_variable *headers, struct ast_ari_recordings_cancel_args *args, struct ast_ari_response *response)
 Stop a live recording and discard it. More...
 
void ast_ari_recordings_copy_stored (struct ast_variable *headers, struct ast_ari_recordings_copy_stored_args *args, struct ast_ari_response *response)
 Copy a stored recording. More...
 
int ast_ari_recordings_copy_stored_parse_body (struct ast_json *body, struct ast_ari_recordings_copy_stored_args *args)
 Body parsing function for /recordings/stored/{recordingName}/copy. More...
 
void ast_ari_recordings_delete_stored (struct ast_variable *headers, struct ast_ari_recordings_delete_stored_args *args, struct ast_ari_response *response)
 Delete a stored recording. More...
 
void ast_ari_recordings_get_live (struct ast_variable *headers, struct ast_ari_recordings_get_live_args *args, struct ast_ari_response *response)
 List live recordings. More...
 
void ast_ari_recordings_get_stored (struct ast_variable *headers, struct ast_ari_recordings_get_stored_args *args, struct ast_ari_response *response)
 Get a stored recording's details. More...
 
void ast_ari_recordings_get_stored_file (struct ast_tcptls_session_instance *ser, struct ast_variable *headers, struct ast_ari_recordings_get_stored_file_args *args, struct ast_ari_response *response)
 Get the file associated with the stored recording. More...
 
void ast_ari_recordings_list_stored (struct ast_variable *headers, struct ast_ari_recordings_list_stored_args *args, struct ast_ari_response *response)
 List recordings that are complete. More...
 
void ast_ari_recordings_mute (struct ast_variable *headers, struct ast_ari_recordings_mute_args *args, struct ast_ari_response *response)
 Mute a live recording. More...
 
void ast_ari_recordings_pause (struct ast_variable *headers, struct ast_ari_recordings_pause_args *args, struct ast_ari_response *response)
 Pause a live recording. More...
 
void ast_ari_recordings_stop (struct ast_variable *headers, struct ast_ari_recordings_stop_args *args, struct ast_ari_response *response)
 Stop a live recording and store it. More...
 
void ast_ari_recordings_unmute (struct ast_variable *headers, struct ast_ari_recordings_unmute_args *args, struct ast_ari_response *response)
 Unmute a live recording. More...
 
void ast_ari_recordings_unpause (struct ast_variable *headers, struct ast_ari_recordings_unpause_args *args, struct ast_ari_response *response)
 Unpause a live recording. More...
 

Detailed Description

Generated file - declares stubs to be implemented in res/ari/resource_recordings.c.

Recording resources

Author
David M. Lee, II dlee@.nosp@m.digi.nosp@m.um.co.nosp@m.m

Definition in file resource_recordings.h.

Function Documentation

◆ ast_ari_recordings_cancel()

void ast_ari_recordings_cancel ( struct ast_variable headers,
struct ast_ari_recordings_cancel_args args,
struct ast_ari_response response 
)

Stop a live recording and discard it.

Parameters
headersHTTP headers
argsSwagger parameters
[out]responseHTTP response

Definition at line 313 of file resource_recordings.c.

References control_recording(), ast_ari_recordings_cancel_args::recording_name, and STASIS_APP_RECORDING_CANCEL.

Referenced by ast_ari_recordings_cancel_cb().

316 {
318  response);
319 }
static void control_recording(const char *name, enum stasis_app_recording_media_operation operation, struct ast_ari_response *response)

◆ ast_ari_recordings_copy_stored()

void ast_ari_recordings_copy_stored ( struct ast_variable headers,
struct ast_ari_recordings_copy_stored_args args,
struct ast_ari_response response 
)

Copy a stored recording.

Parameters
headersHTTP headers
argsSwagger parameters
[out]responseHTTP response

Definition at line 145 of file resource_recordings.c.

References ao2_cleanup, ast_ari_response_error(), ast_ari_response_ok(), ast_log, ast_ari_recordings_copy_stored_args::destination_recording_name, errno, LOG_WARNING, NULL, RAII_VAR, ast_ari_recordings_copy_stored_args::recording_name, stasis_app_stored_recording_copy(), stasis_app_stored_recording_find_by_name(), and stasis_app_stored_recording_to_json().

Referenced by ast_ari_recordings_copy_stored_cb().

148 {
149  RAII_VAR(struct stasis_app_stored_recording *, src_recording, NULL,
150  ao2_cleanup);
151  RAII_VAR(struct stasis_app_stored_recording *, dst_recording, NULL,
152  ao2_cleanup);
153  struct ast_json *json;
154  int res;
155 
157  args->recording_name);
158  if (src_recording == NULL) {
159  ast_ari_response_error(response, 404, "Not Found",
160  "Recording not found");
161  return;
162  }
163 
166  if (dst_recording) {
167  ast_ari_response_error(response, 409, "Conflict",
168  "A recording with the same name already exists on the system");
169  return;
170  }
171 
172  /* See if we got our name rejected */
173  switch (errno) {
174  case EINVAL:
175  ast_ari_response_error(response, 400, "Bad request",
176  "Invalid destination recording name");
177  return;
178  case EACCES:
179  ast_ari_response_error(response, 403, "Forbidden",
180  "Destination file path is forbidden");
181  return;
182  default:
183  break;
184  }
185 
186  res = stasis_app_stored_recording_copy(src_recording,
187  args->destination_recording_name, &dst_recording);
188  if (res) {
189  switch (errno) {
190  case EACCES:
191  case EPERM:
192  ast_ari_response_error(response, 500,
193  "Internal Server Error",
194  "Copy failed");
195  break;
196  default:
198  "Unexpected error copying recording %s to %s: %s\n",
199  args->recording_name, args->destination_recording_name, strerror(errno));
200  ast_ari_response_error(response, 500,
201  "Internal Server Error",
202  "Copy failed");
203  break;
204  }
205  return;
206  }
207 
208  json = stasis_app_stored_recording_to_json(dst_recording);
209  if (json == NULL) {
210  ast_ari_response_error(response, 500,
211  "Internal Server Error", "Error building response");
212  return;
213  }
214 
215  ast_ari_response_ok(response, json);
216 }
#define LOG_WARNING
Definition: logger.h:274
struct ast_json * stasis_app_stored_recording_to_json(struct stasis_app_stored_recording *recording)
Convert stored recording info to JSON.
Definition: stored.c:446
#define NULL
Definition: resample.c:96
#define ast_log
Definition: astobj2.c:42
#define RAII_VAR(vartype, varname, initval, dtor)
Declare a variable that will call a destructor function when it goes out of scope.
Definition: utils.h:911
void ast_ari_response_ok(struct ast_ari_response *response, struct ast_json *message)
Fill in an OK (200) ast_ari_response.
Definition: res_ari.c:276
int errno
void ast_ari_response_error(struct ast_ari_response *response, int response_code, const char *response_text, const char *message_fmt,...)
Fill in an error ast_ari_response.
Definition: res_ari.c:259
#define ao2_cleanup(obj)
Definition: astobj2.h:1958
int stasis_app_stored_recording_copy(struct stasis_app_stored_recording *src_recording, const char *dst, struct stasis_app_stored_recording **dst_recording)
Copy a recording.
Definition: stored.c:389
struct stasis_app_stored_recording * stasis_app_stored_recording_find_by_name(const char *name)
Creates a stored recording object, with the given name.
Definition: stored.c:310
Abstract JSON element (object, array, string, int, ...).

◆ ast_ari_recordings_copy_stored_parse_body()

int ast_ari_recordings_copy_stored_parse_body ( struct ast_json body,
struct ast_ari_recordings_copy_stored_args args 
)

Body parsing function for /recordings/stored/{recordingName}/copy.

Parameters
bodyThe JSON body from which to parse parameters.
[out]argsThe args structure to parse into.
Return values
zeroon success
non-zeroon failure

Definition at line 279 of file res_ari_recordings.c.

References ast_json_object_get(), ast_json_string_get(), and ast_ari_recordings_copy_stored_args::destination_recording_name.

Referenced by ast_ari_recordings_copy_stored_cb().

282 {
283  struct ast_json *field;
284  /* Parse query parameters out of it */
285  field = ast_json_object_get(body, "destinationRecordingName");
286  if (field) {
288  }
289  return 0;
290 }
const char * ast_json_string_get(const struct ast_json *string)
Get the value of a JSON string.
Definition: json.c:273
struct ast_json * ast_json_object_get(struct ast_json *object, const char *key)
Get a field from a JSON object.
Definition: json.c:397
Abstract JSON element (object, array, string, int, ...).

◆ ast_ari_recordings_delete_stored()

void ast_ari_recordings_delete_stored ( struct ast_variable headers,
struct ast_ari_recordings_delete_stored_args args,
struct ast_ari_response response 
)

Delete a stored recording.

Parameters
headersHTTP headers
argsSwagger parameters
[out]responseHTTP response

Definition at line 218 of file resource_recordings.c.

References ao2_cleanup, ast_ari_response_error(), ast_ari_response_no_content(), ast_log, errno, LOG_WARNING, NULL, RAII_VAR, ast_ari_recordings_delete_stored_args::recording_name, stasis_app_stored_recording_delete(), and stasis_app_stored_recording_find_by_name().

Referenced by ast_ari_recordings_delete_stored_cb().

221 {
222  RAII_VAR(struct stasis_app_stored_recording *, recording, NULL,
223  ao2_cleanup);
224  int res;
225 
227  args->recording_name);
228  if (recording == NULL) {
229  ast_ari_response_error(response, 404, "Not Found",
230  "Recording not found");
231  return;
232  }
233 
234  res = stasis_app_stored_recording_delete(recording);
235 
236  if (res != 0) {
237  switch (errno) {
238  case EACCES:
239  case EPERM:
240  ast_ari_response_error(response, 500,
241  "Internal Server Error",
242  "Delete failed");
243  break;
244  default:
246  "Unexpected error deleting recording %s: %s\n",
247  args->recording_name, strerror(errno));
248  ast_ari_response_error(response, 500,
249  "Internal Server Error",
250  "Delete failed");
251  break;
252  }
253  return;
254  }
255 
256  ast_ari_response_no_content(response);
257 }
#define LOG_WARNING
Definition: logger.h:274
#define NULL
Definition: resample.c:96
#define ast_log
Definition: astobj2.c:42
#define RAII_VAR(vartype, varname, initval, dtor)
Declare a variable that will call a destructor function when it goes out of scope.
Definition: utils.h:911
int errno
void ast_ari_response_error(struct ast_ari_response *response, int response_code, const char *response_text, const char *message_fmt,...)
Fill in an error ast_ari_response.
Definition: res_ari.c:259
int stasis_app_stored_recording_delete(struct stasis_app_stored_recording *recording)
Delete a recording from disk.
Definition: stored.c:439
void ast_ari_response_no_content(struct ast_ari_response *response)
Fill in a No Content (204) ast_ari_response.
Definition: res_ari.c:284
#define ao2_cleanup(obj)
Definition: astobj2.h:1958
struct stasis_app_stored_recording * stasis_app_stored_recording_find_by_name(const char *name)
Creates a stored recording object, with the given name.
Definition: stored.c:310

◆ ast_ari_recordings_get_live()

void ast_ari_recordings_get_live ( struct ast_variable headers,
struct ast_ari_recordings_get_live_args args,
struct ast_ari_response response 
)

List live recordings.

Parameters
headersHTTP headers
argsSwagger parameters
[out]responseHTTP response

Definition at line 259 of file resource_recordings.c.

References ao2_cleanup, ast_ari_response_error(), ast_ari_response_ok(), NULL, RAII_VAR, ast_ari_recordings_get_live_args::recording_name, stasis_app_recording_find_by_name(), and stasis_app_recording_to_json().

Referenced by ast_ari_recordings_get_live_cb().

262 {
263  RAII_VAR(struct stasis_app_recording *, recording, NULL, ao2_cleanup);
264  struct ast_json *json;
265 
267  if (recording == NULL) {
268  ast_ari_response_error(response, 404, "Not Found",
269  "Recording not found");
270  return;
271  }
272 
273  json = stasis_app_recording_to_json(recording);
274  if (json == NULL) {
275  ast_ari_response_error(response, 500,
276  "Internal Server Error", "Error building response");
277  return;
278  }
279 
280  ast_ari_response_ok(response, json);
281 }
#define NULL
Definition: resample.c:96
struct ast_json * stasis_app_recording_to_json(const struct stasis_app_recording *recording)
Construct a JSON model of a recording.
#define RAII_VAR(vartype, varname, initval, dtor)
Declare a variable that will call a destructor function when it goes out of scope.
Definition: utils.h:911
void ast_ari_response_ok(struct ast_ari_response *response, struct ast_json *message)
Fill in an OK (200) ast_ari_response.
Definition: res_ari.c:276
void ast_ari_response_error(struct ast_ari_response *response, int response_code, const char *response_text, const char *message_fmt,...)
Fill in an error ast_ari_response.
Definition: res_ari.c:259
#define ao2_cleanup(obj)
Definition: astobj2.h:1958
Abstract JSON element (object, array, string, int, ...).
struct stasis_app_recording * stasis_app_recording_find_by_name(const char *name)
Finds the recording object with the given name.

◆ ast_ari_recordings_get_stored()

void ast_ari_recordings_get_stored ( struct ast_variable headers,
struct ast_ari_recordings_get_stored_args args,
struct ast_ari_response response 
)

Get a stored recording's details.

Parameters
headersHTTP headers
argsSwagger parameters
[out]responseHTTP response

Definition at line 75 of file resource_recordings.c.

References ao2_cleanup, ast_ari_response_error(), ast_ari_response_ok(), NULL, RAII_VAR, ast_ari_recordings_get_stored_args::recording_name, stasis_app_stored_recording_find_by_name(), and stasis_app_stored_recording_to_json().

Referenced by ast_ari_recordings_get_stored_cb().

78 {
79  RAII_VAR(struct stasis_app_stored_recording *, recording, NULL,
80  ao2_cleanup);
81  struct ast_json *json;
82 
84  args->recording_name);
85  if (recording == NULL) {
86  ast_ari_response_error(response, 404, "Not Found",
87  "Recording not found");
88  return;
89  }
90 
91  json = stasis_app_stored_recording_to_json(recording);
92  if (json == NULL) {
93  ast_ari_response_error(response, 500,
94  "Internal Server Error", "Error building response");
95  return;
96  }
97 
98  ast_ari_response_ok(response, json);
99 }
struct ast_json * stasis_app_stored_recording_to_json(struct stasis_app_stored_recording *recording)
Convert stored recording info to JSON.
Definition: stored.c:446
#define NULL
Definition: resample.c:96
#define RAII_VAR(vartype, varname, initval, dtor)
Declare a variable that will call a destructor function when it goes out of scope.
Definition: utils.h:911
void ast_ari_response_ok(struct ast_ari_response *response, struct ast_json *message)
Fill in an OK (200) ast_ari_response.
Definition: res_ari.c:276
void ast_ari_response_error(struct ast_ari_response *response, int response_code, const char *response_text, const char *message_fmt,...)
Fill in an error ast_ari_response.
Definition: res_ari.c:259
#define ao2_cleanup(obj)
Definition: astobj2.h:1958
struct stasis_app_stored_recording * stasis_app_stored_recording_find_by_name(const char *name)
Creates a stored recording object, with the given name.
Definition: stored.c:310
Abstract JSON element (object, array, string, int, ...).

◆ ast_ari_recordings_get_stored_file()

void ast_ari_recordings_get_stored_file ( struct ast_tcptls_session_instance ser,
struct ast_variable headers,
struct ast_ari_recordings_get_stored_file_args args,
struct ast_ari_response response 
)

Get the file associated with the stored recording.

Parameters
serTCP/TLS session instance
headersHTTP headers
argsSwagger parameters
[out]responseHTTP response

Definition at line 101 of file resource_recordings.c.

References ao2_cleanup, ast_ari_response_error(), ast_ari_response_ok(), ast_format_get_type(), ast_get_format_for_file_ext(), ast_json_null(), AST_MEDIA_TYPE_AUDIO, AST_MEDIA_TYPE_IMAGE, AST_MEDIA_TYPE_TEXT, AST_MEDIA_TYPE_UNKNOWN, AST_MEDIA_TYPE_VIDEO, ast_str_append(), ast_ari_response::fd, format, ast_ari_response::headers, ast_ari_response::message, RAII_VAR, ast_ari_recordings_get_stored_file_args::recording_name, stasis_app_stored_recording_find_by_name(), stasis_app_stored_recording_get_extension(), and stasis_app_stored_recording_get_filename().

Referenced by ast_ari_recordings_get_stored_file_cb().

104 {
105  RAII_VAR(struct stasis_app_stored_recording *, recording,
107  ao2_cleanup);
108  static const char *format_type_names[AST_MEDIA_TYPE_TEXT + 1] = {
109  [AST_MEDIA_TYPE_UNKNOWN] = "binary",
110  [AST_MEDIA_TYPE_AUDIO] = "audio",
111  [AST_MEDIA_TYPE_VIDEO] = "video",
112  [AST_MEDIA_TYPE_IMAGE] = "image",
113  [AST_MEDIA_TYPE_TEXT] = "text",
114  };
115  struct ast_format *format;
116 
117  response->message = ast_json_null();
118 
119  if (!recording) {
120  ast_ari_response_error(response, 404, "Not Found",
121  "Recording not found");
122  return;
123  }
124 
126  if (!format) {
127  ast_ari_response_error(response, 500, "Internal Server Error",
128  "Format specified by recording not available or loaded");
129  return;
130  }
131 
132  response->fd = open(stasis_app_stored_recording_get_filename(recording), O_RDONLY);
133  if (response->fd < 0) {
134  ast_ari_response_error(response, 403, "Forbidden",
135  "Recording could not be opened");
136  return;
137  }
138 
139  ast_str_append(&response->headers, 0, "Content-Type: %s/%s\r\n",
140  format_type_names[ast_format_get_type(format)],
142  ast_ari_response_ok(response, ast_json_null());
143 }
enum ast_media_type ast_format_get_type(const struct ast_format *format)
Get the media type of a format.
Definition: format.c:354
struct ast_str * headers
Definition: ari.h:95
Definition of a media format.
Definition: format.c:43
int ast_str_append(struct ast_str **buf, ssize_t max_len, const char *fmt,...)
Append to a thread local dynamic string.
Definition: strings.h:1091
struct ast_json * ast_json_null(void)
Get the JSON null value.
Definition: json.c:248
#define RAII_VAR(vartype, varname, initval, dtor)
Declare a variable that will call a destructor function when it goes out of scope.
Definition: utils.h:911
const char * stasis_app_stored_recording_get_filename(struct stasis_app_stored_recording *recording)
Returns the full filename, with extension, for this recording.
Definition: stored.c:62
void ast_ari_response_ok(struct ast_ari_response *response, struct ast_json *message)
Fill in an OK (200) ast_ari_response.
Definition: res_ari.c:276
const char * stasis_app_stored_recording_get_extension(struct stasis_app_stored_recording *recording)
Returns the extension for this recording.
Definition: stored.c:71
void ast_ari_response_error(struct ast_ari_response *response, int response_code, const char *response_text, const char *message_fmt,...)
Fill in an error ast_ari_response.
Definition: res_ari.c:259
struct ast_format * ast_get_format_for_file_ext(const char *file_ext)
Get the ast_format associated with the given file extension.
Definition: file.c:1938
struct ast_json * message
Definition: ari.h:93
#define ao2_cleanup(obj)
Definition: astobj2.h:1958
struct stasis_app_stored_recording * stasis_app_stored_recording_find_by_name(const char *name)
Creates a stored recording object, with the given name.
Definition: stored.c:310
static snd_pcm_format_t format
Definition: chan_alsa.c:102

◆ ast_ari_recordings_list_stored()

void ast_ari_recordings_list_stored ( struct ast_variable headers,
struct ast_ari_recordings_list_stored_args args,
struct ast_ari_response response 
)

List recordings that are complete.

Parameters
headersHTTP headers
argsSwagger parameters
[out]responseHTTP response

Definition at line 35 of file resource_recordings.c.

References ao2_cleanup, ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ast_ari_response_alloc_failed(), ast_ari_response_ok(), ast_json_array_append(), ast_json_array_create(), ast_json_ref(), ast_json_unref(), NULL, RAII_VAR, recordings, stasis_app_stored_recording_find_all(), and stasis_app_stored_recording_to_json().

Referenced by ast_ari_recordings_list_stored_cb().

38 {
40  RAII_VAR(struct ast_json *, json, NULL, ast_json_unref);
41  struct ao2_iterator i;
42  void *obj;
43 
45 
46  if (!recordings) {
48  return;
49  }
50 
51  json = ast_json_array_create();
52  if (!json) {
54  return;
55  }
56 
58  while ((obj = ao2_iterator_next(&i))) {
59  RAII_VAR(struct stasis_app_stored_recording *, recording, obj,
60  ao2_cleanup);
61 
62  int r = ast_json_array_append(
63  json, stasis_app_stored_recording_to_json(recording));
64  if (r != 0) {
67  return;
68  }
69  }
71 
72  ast_ari_response_ok(response, ast_json_ref(json));
73 }
struct ast_json * ast_json_ref(struct ast_json *value)
Increase refcount on value.
Definition: json.c:67
void ast_json_unref(struct ast_json *value)
Decrease refcount on value. If refcount reaches zero, value is freed.
Definition: json.c:73
struct ast_json * stasis_app_stored_recording_to_json(struct stasis_app_stored_recording *recording)
Convert stored recording info to JSON.
Definition: stored.c:446
void ao2_iterator_destroy(struct ao2_iterator *iter)
Destroy a container iterator.
#define NULL
Definition: resample.c:96
void ast_ari_response_alloc_failed(struct ast_ari_response *response)
Fill in response with a 500 message for allocation failures.
Definition: res_ari.c:298
struct ao2_container * stasis_app_stored_recording_find_all(void)
Find all stored recordings on disk.
Definition: stored.c:290
static struct stasis_rest_handlers recordings
REST handler for /api-docs/recordings.json.
#define RAII_VAR(vartype, varname, initval, dtor)
Declare a variable that will call a destructor function when it goes out of scope.
Definition: utils.h:911
void ast_ari_response_ok(struct ast_ari_response *response, struct ast_json *message)
Fill in an OK (200) ast_ari_response.
Definition: res_ari.c:276
struct ast_json * ast_json_array_create(void)
Create a empty JSON array.
Definition: json.c:352
int ast_json_array_append(struct ast_json *array, struct ast_json *value)
Append to an array.
Definition: json.c:368
#define ao2_iterator_next(iter)
Definition: astobj2.h:1933
When we need to walk through a container, we use an ao2_iterator to keep track of the current positio...
Definition: astobj2.h:1841
#define ao2_cleanup(obj)
Definition: astobj2.h:1958
Abstract JSON element (object, array, string, int, ...).
Generic container type.
struct ao2_iterator ao2_iterator_init(struct ao2_container *c, int flags) attribute_warn_unused_result
Create an iterator for a container.

◆ ast_ari_recordings_mute()

void ast_ari_recordings_mute ( struct ast_variable headers,
struct ast_ari_recordings_mute_args args,
struct ast_ari_response response 
)

Mute a live recording.

Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.

Parameters
headersHTTP headers
argsSwagger parameters
[out]responseHTTP response

Definition at line 345 of file resource_recordings.c.

References control_recording(), ast_ari_recordings_mute_args::recording_name, and STASIS_APP_RECORDING_MUTE.

Referenced by ast_ari_recordings_mute_cb().

348 {
350  response);
351 }
static void control_recording(const char *name, enum stasis_app_recording_media_operation operation, struct ast_ari_response *response)

◆ ast_ari_recordings_pause()

void ast_ari_recordings_pause ( struct ast_variable headers,
struct ast_ari_recordings_pause_args args,
struct ast_ari_response response 
)

Pause a live recording.

Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.

Parameters
headersHTTP headers
argsSwagger parameters
[out]responseHTTP response

Definition at line 329 of file resource_recordings.c.

References control_recording(), ast_ari_recordings_pause_args::recording_name, and STASIS_APP_RECORDING_PAUSE.

Referenced by ast_ari_recordings_pause_cb().

332 {
334  response);
335 }
static void control_recording(const char *name, enum stasis_app_recording_media_operation operation, struct ast_ari_response *response)

◆ ast_ari_recordings_stop()

void ast_ari_recordings_stop ( struct ast_variable headers,
struct ast_ari_recordings_stop_args args,
struct ast_ari_response response 
)

Stop a live recording and store it.

Parameters
headersHTTP headers
argsSwagger parameters
[out]responseHTTP response

Definition at line 321 of file resource_recordings.c.

References control_recording(), ast_ari_recordings_stop_args::recording_name, and STASIS_APP_RECORDING_STOP.

Referenced by ast_ari_recordings_stop_cb().

324 {
326  response);
327 }
static void control_recording(const char *name, enum stasis_app_recording_media_operation operation, struct ast_ari_response *response)

◆ ast_ari_recordings_unmute()

void ast_ari_recordings_unmute ( struct ast_variable headers,
struct ast_ari_recordings_unmute_args args,
struct ast_ari_response response 
)

Unmute a live recording.

Parameters
headersHTTP headers
argsSwagger parameters
[out]responseHTTP response

Definition at line 353 of file resource_recordings.c.

References control_recording(), ast_ari_recordings_unmute_args::recording_name, and STASIS_APP_RECORDING_UNMUTE.

Referenced by ast_ari_recordings_unmute_cb().

356 {
358  response);
359 }
static void control_recording(const char *name, enum stasis_app_recording_media_operation operation, struct ast_ari_response *response)

◆ ast_ari_recordings_unpause()

void ast_ari_recordings_unpause ( struct ast_variable headers,
struct ast_ari_recordings_unpause_args args,
struct ast_ari_response response 
)

Unpause a live recording.

Parameters
headersHTTP headers
argsSwagger parameters
[out]responseHTTP response

Definition at line 337 of file resource_recordings.c.

References control_recording(), ast_ari_recordings_unpause_args::recording_name, and STASIS_APP_RECORDING_UNPAUSE.

Referenced by ast_ari_recordings_unpause_cb().

340 {
342  response);
343 }
static void control_recording(const char *name, enum stasis_app_recording_media_operation operation, struct ast_ari_response *response)