FS-4625 --resolve
This commit is contained in:
parent
a39ba84f5e
commit
07ed03c458
|
@ -567,6 +567,22 @@ SWITCH_STANDARD_APP(mkdir_function)
|
|||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "%s MKDIR: %s\n",
|
||||
switch_channel_get_name(switch_core_session_get_channel(session)), data);
|
||||
}
|
||||
#define RENAME_SYNTAX "<from_path> <to_path>"
|
||||
SWITCH_STANDARD_APP(rename_function)
|
||||
{
|
||||
char *argv[2] = { 0 };
|
||||
char *lbuf = NULL;
|
||||
|
||||
if (!zstr(data) && (lbuf = switch_core_session_strdup(session, data))
|
||||
&& switch_split(lbuf, ' ', argv) == 2) {
|
||||
switch_file_rename(argv[0], argv[1], switch_core_session_get_pool(session));
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "%s RENAME: %s %s\n",
|
||||
switch_channel_get_name(switch_core_session_get_channel(session)), argv[0], argv[1]);
|
||||
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Usage: %s\n", RENAME_SYNTAX);
|
||||
}
|
||||
}
|
||||
|
||||
#define SOFT_HOLD_SYNTAX "<unhold key> [<moh_a>] [<moh_b>]"
|
||||
SWITCH_STANDARD_APP(soft_hold_function)
|
||||
|
@ -5103,6 +5119,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_dptools_load)
|
|||
SWITCH_ADD_APP(app_interface, "enable_heartbeat", "Enable Media Heartbeat", "Enable Media Heartbeat",
|
||||
heartbeat_function, HEARTBEAT_SYNTAX, SAF_SUPPORT_NOMEDIA);
|
||||
SWITCH_ADD_APP(app_interface, "mkdir", "Create a directory", "Create a directory", mkdir_function, MKDIR_SYNTAX, SAF_SUPPORT_NOMEDIA);
|
||||
SWITCH_ADD_APP(app_interface, "rename", "Rename file", "Rename file", rename_function, RENAME_SYNTAX, SAF_SUPPORT_NOMEDIA | SAF_ZOMBIE_EXEC);
|
||||
SWITCH_ADD_APP(app_interface, "soft_hold", "Put a bridged channel on hold", "Put a bridged channel on hold", soft_hold_function, SOFT_HOLD_SYNTAX,
|
||||
SAF_NONE);
|
||||
SWITCH_ADD_APP(app_interface, "bind_meta_app", "Bind a key to an application", "Bind a key to an application", dtmf_bind_function, BIND_SYNTAX,
|
||||
|
|
|
@ -3274,7 +3274,7 @@ static void do_execute_on(switch_channel_t *channel, const char *variable)
|
|||
app = switch_core_session_strdup(channel->session, variable);
|
||||
|
||||
for(p = app; p && *p; p++) {
|
||||
if (*p == ' ') {
|
||||
if (*p == ' ' || (*p == ':' && (*(p+1) != ':'))) {
|
||||
*p++ = '\0';
|
||||
arg = p;
|
||||
break;
|
||||
|
|
|
@ -1083,16 +1083,7 @@ static switch_bool_t record_callback(switch_media_bug_t *bug, void *user_data, s
|
|||
switch_event_fire(&event);
|
||||
}
|
||||
|
||||
if ((var = switch_channel_get_variable(channel, "record_post_process_exec_app"))) {
|
||||
char *app = switch_core_session_strdup(session, var);
|
||||
char *data;
|
||||
|
||||
if ((data = strchr(app, ':'))) {
|
||||
*data++ = '\0';
|
||||
}
|
||||
|
||||
switch_core_session_execute_application(session, app, data);
|
||||
}
|
||||
switch_channel_execute_on(channel, "record_post_process_exec_app");
|
||||
|
||||
if ((var = switch_channel_get_variable(channel, "record_post_process_exec_api"))) {
|
||||
char *cmd = switch_core_session_strdup(session, var);
|
||||
|
|
Loading…
Reference in New Issue