mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-30 23:24:18 +00:00
[core] Add SMBF_PAUSE media bug flag to pause an individual media bug.
* [core] Add SMBF_PAUSE media bug flag to pause an individual media bug. [core] Add switch_ivr_record_session_pause() to pause a session recording. [mod_dptools] Add record_session_pause and record_session_resume dialplan APPs. [mod_commands] Add pause/resume sub-commands to uuid_record API.
This commit is contained in:
1 parent
a162cf86e8
commit
60c4b62254
11 files changed
+232
-14
No files matched your search
@@ -4781,6 +4781,18 @@ SWITCH_STANDARD_API(session_record_function)
|
||||
} else {
|
||||
stream->write_function(stream, "+OK Success\n");
|
||||
}
|
||||
} else if (!strcasecmp(action, "pause")) {
|
||||
if (switch_ivr_record_session_pause(rsession, path, SWITCH_TRUE) != SWITCH_STATUS_SUCCESS) {
|
||||
stream->write_function(stream, "-ERR Cannot pause recording session!\n");
|
||||
} else {
|
||||
stream->write_function(stream, "+OK Success\n");
|
||||
}
|
||||
} else if (!strcasecmp(action, "resume")) {
|
||||
if (switch_ivr_record_session_pause(rsession, path, SWITCH_FALSE) != SWITCH_STATUS_SUCCESS) {
|
||||
stream->write_function(stream, "-ERR Cannot resume recording session!\n");
|
||||
} else {
|
||||
stream->write_function(stream, "+OK Success\n");
|
||||
}
|
||||
} else if (!strcasecmp(action, "mask")) {
|
||||
if (switch_ivr_record_session_mask(rsession, path, SWITCH_TRUE) != SWITCH_STATUS_SUCCESS) {
|
||||
stream->write_function(stream, "-ERR Cannot mask recording session!\n");
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005-2015, Anthony Minessale II <anthm@freeswitch.org>
|
||||
* Copyright (C) 2005-2020, Anthony Minessale II <anthm@freeswitch.org>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
@@ -3317,6 +3317,16 @@ SWITCH_STANDARD_APP(record_session_unmask_function)
|
||||
switch_ivr_record_session_mask(session, (char *) data, SWITCH_FALSE);
|
||||
}
|
||||
|
||||
SWITCH_STANDARD_APP(record_session_pause_function)
|
||||
{
|
||||
switch_ivr_record_session_pause(session, (char *) data, SWITCH_TRUE);
|
||||
}
|
||||
|
||||
SWITCH_STANDARD_APP(record_session_resume_function)
|
||||
{
|
||||
switch_ivr_record_session_pause(session, (char *) data, SWITCH_FALSE);
|
||||
}
|
||||
|
||||
SWITCH_STANDARD_APP(record_session_function)
|
||||
{
|
||||
char *array[5] = {0};
|
||||
@@ -6679,7 +6689,9 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_dptools_load)
|
||||
SWITCH_ADD_APP(app_interface, "stop_record_session", "Stop Record Session", STOP_SESS_REC_DESC, stop_record_session_function, "<path>", SAF_NONE);
|
||||
SWITCH_ADD_APP(app_interface, "record_session", "Record Session", SESS_REC_DESC, record_session_function, "<path> [+<timeout>]", SAF_MEDIA_TAP);
|
||||
SWITCH_ADD_APP(app_interface, "record_session_mask", "Mask audio in recording", SESS_REC_MASK_DESC, record_session_mask_function, "<path>", SAF_MEDIA_TAP);
|
||||
SWITCH_ADD_APP(app_interface, "record_session_unmask", "Resume recording", SESS_REC_UNMASK_DESC, record_session_unmask_function, "<path>", SAF_MEDIA_TAP);
|
||||
SWITCH_ADD_APP(app_interface, "record_session_unmask", "Stop masking audio in recording", SESS_REC_UNMASK_DESC, record_session_unmask_function, "<path>", SAF_MEDIA_TAP);
|
||||
SWITCH_ADD_APP(app_interface, "record_session_pause", "Pause recording", "Temporarily pause writing call recording audio to file", record_session_pause_function, "<path>", SAF_MEDIA_TAP);
|
||||
SWITCH_ADD_APP(app_interface, "record_session_resume", "Resume paused recording", "Resume writing call recording audio to file", record_session_resume_function, "<path>", SAF_MEDIA_TAP);
|
||||
SWITCH_ADD_APP(app_interface, "record", "Record File", "Record a file from the channels input", record_function,
|
||||
"<path> [<time_limit_secs>] [<silence_thresh>] [<silence_hits>]", SAF_NONE);
|
||||
SWITCH_ADD_APP(app_interface, "preprocess", "pre-process", "pre-process", preprocess_session_function, "", SAF_NONE);
|
||||
|
||||
Reference in new issue
Block a user