mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-01 11:02:53 +00:00
part two of FSCORE-193
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9680 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
1bd4fa6115
commit
c4d43fbf06
@ -1421,9 +1421,17 @@ SWITCH_STANDARD_API(session_record_function)
|
||||
}
|
||||
|
||||
if (!strcasecmp(action, "start")) {
|
||||
switch_ivr_record_session(rsession, path, limit, NULL);
|
||||
if (switch_ivr_record_session(rsession, path, limit, NULL)!= SWITCH_STATUS_SUCCESS) {
|
||||
stream->write_function(stream, "-ERR Cannot record session!\n");
|
||||
} else {
|
||||
stream->write_function(stream, "+OK Success\n");
|
||||
}
|
||||
} else if (!strcasecmp(action, "stop")) {
|
||||
switch_ivr_stop_record_session(rsession, path);
|
||||
if (switch_ivr_stop_record_session(rsession, path) != SWITCH_STATUS_SUCCESS) {
|
||||
stream->write_function(stream, "-ERR Cannot stop record session!\n");
|
||||
} else {
|
||||
stream->write_function(stream, "+OK Success\n");
|
||||
}
|
||||
} else {
|
||||
goto usage;
|
||||
}
|
||||
@ -1481,9 +1489,17 @@ SWITCH_STANDARD_API(session_displace_function)
|
||||
}
|
||||
|
||||
if (!strcasecmp(action, "start")) {
|
||||
switch_ivr_displace_session(rsession, path, limit, flags);
|
||||
if (switch_ivr_displace_session(rsession, path, limit, flags) != SWITCH_STATUS_SUCCESS) {
|
||||
stream->write_function(stream, "-ERR Cannot displace session!\n");
|
||||
} else {
|
||||
stream->write_function(stream, "+OK Success\n");
|
||||
}
|
||||
} else if (!strcasecmp(action, "stop")) {
|
||||
switch_ivr_stop_displace_session(rsession, path);
|
||||
if (switch_ivr_stop_displace_session(rsession, path) != SWITCH_STATUS_SUCCESS) {
|
||||
stream->write_function(stream, "-ERR Cannot stop displace session!\n");
|
||||
} else {
|
||||
stream->write_function(stream, "+OK Success\n");
|
||||
}
|
||||
} else {
|
||||
goto usage;
|
||||
}
|
||||
|
@ -345,7 +345,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_displace_session(switch_core_session_
|
||||
|
||||
if (!switch_channel_media_ready(channel) || !switch_core_session_get_read_codec(session)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can not displace session. Media not enabled on channel\n");
|
||||
return status;
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
if ((bug = switch_channel_get_private(channel, file))) {
|
||||
@ -816,7 +816,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_session(switch_core_session_t
|
||||
|
||||
if (!switch_channel_media_ready(channel) || !switch_core_session_get_read_codec(session)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can not record session. Media not enabled on channel\n");
|
||||
return status;
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
channels = read_codec->implementation->number_of_channels;
|
||||
|
Loading…
x
Reference in New Issue
Block a user