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:
Michael Jerris
2007-06-20 14:35:22 +00:00
parent c31639279a
commit bd2c91b028
4 changed files with 94 additions and 0 deletions
+14
View File
@@ -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) {