mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-20 00:08:33 +00:00
Add recordFile method. merge svn r5149 from branch.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5420 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
c31639279a
commit
bd2c91b028
4 files changed
+94
No files matched your search
@@ -303,6 +303,20 @@ int CoreSession::originate(CoreSession *aleg_session,
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
int CoreSession::recordFile(char *file_name, int max_len, int silence_threshold, int silence_secs)
|
||||
{
|
||||
switch_file_handle_t fh = { 0 };
|
||||
switch_status_t status;
|
||||
|
||||
fh.thresh = silence_threshold;
|
||||
fh.silence_hits = silence_secs;
|
||||
store_file_handle(&fh);
|
||||
begin_allow_threads();
|
||||
status = switch_ivr_record_file(session, &fh, file_name, &args, max_len);
|
||||
end_allow_threads();
|
||||
return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
|
||||
|
||||
}
|
||||
|
||||
void CoreSession::setCallerData(char *var, char *val) {
|
||||
|
||||
|
||||
Reference in new issue
Block a user