make test 'record' app in app_playback.c

You are best off doing wav (trust me) 
It can record at 8 16 22 and 32 khz if you can manage to have a channel at that speed.

syntax [record /tmp/blah.wav] 

dial * to end (dtmf only works in iax and portaudio {beg file to add it to mod_exosip})



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@453 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2006-01-27 01:46:14 +00:00
parent 954fe31140
commit 48ae14726b
6 changed files with 196 additions and 32 deletions
+16 -2
View File
@@ -641,6 +641,13 @@ SWITCH_DECLARE(switch_status) switch_core_codec_destroy(switch_codec *codec);
*/
SWITCH_DECLARE(switch_status) switch_core_session_set_read_codec(switch_core_session *session, switch_codec *codec);
/*!
\brief Retrieve the read codec from a given session
\param session session to retrieve from
\return a pointer to the codec
*/
SWITCH_DECLARE(switch_codec *) switch_core_session_get_read_codec(switch_core_session *session);
/*!
\brief Assign the write codec to a given session
\param session session to add the codec to
@@ -648,8 +655,15 @@ SWITCH_DECLARE(switch_status) switch_core_session_set_read_codec(switch_core_ses
\return SWITCH_STATUS_SUCCESS if successful
*/
SWITCH_DECLARE(switch_status) switch_core_session_set_write_codec(switch_core_session *session, switch_codec *codec);
///\}
/*!
\brief Retrieve the write codec from a given session
\param session session to retrieve from
\return a pointer to the codec
*/
SWITCH_DECLARE(switch_codec *) switch_core_session_get_write_codec(switch_core_session *session);
///\}
///\defgroup db Database Functions
///\ingroup core1
///\{
@@ -684,7 +698,7 @@ SWITCH_DECLARE(switch_status) switch_core_file_open(switch_file_handle *fh, char
/*!
\brief Read media from a file handle
\param fh the file handle to read from
\param fh the file handle to read from (must be initilized by you memset all 0 for read, fill in channels and rate for write)
\param data the buffer to read the data to
\param len the max size of the buffer
\return SWITCH_STATUS_SUCCESS with len adjusted to the bytes read if successful
+13
View File
@@ -64,6 +64,19 @@ SWITCH_DECLARE(switch_status) switch_ivr_play_file(switch_core_session *session,
char *file,
char *timer_name,
switch_dtmf_callback_function dtmf_callback);
/*!
\brief record a file from the session to a file
\param session the session to record from
\param file the path to the file
\param dtmf_callback code to execute if any dtmf is dialed during the recording
\return SWITCH_STATUS_SUCCESS if all is well
*/
SWITCH_DECLARE(switch_status) switch_ivr_record_file(switch_core_session *session,
char *file,
switch_dtmf_callback_function dtmf_callback);
/** @} */