[Freeswitch-dev] Please help with session recording
steveayre at gmail.com
Thu Sep 16 06:09:44 PDT 2010
You don't need to reinvent the wheel.
Check out these functions:
switch_ivr_record_file(switch_core_session_t *session, switch_file_handle_t
*fh, const char *file, switch_input_args_t *args, uint32_t limit)
switch_ivr_record_session(switch_core_session_t *session, char *file,
uint32_t limit, switch_file_handle_t *fh)
I don't think they're in the documentation. For an example of using them,
the record and record_session apps in mod_dptools.c use them.
Using one of those will handle all the recording for you, so you just need
to create an event handler that starts the recording.
Alternatively, you could base the code in your module on those functions and
On 16 September 2010 06:22, Farhan Husain <farhan.husain at csebuet.org> wrote:
> I am trying to write a module which would record all the media sessions.
> What I did so far is as following:
> 1. Subscribed to channel events
> 2. On SWITCH_EVENT_CHANNEL_CREATE I install a callback function using the
> "switch_core_media_bug_add" function.
> At this point, my callback method is being called. I can see my debug
> printout when I leave a voicemail for an offline user. I want to write the
> media data to a file. The callback method signature is like this:
> switch_bool_t my_callback(switch_media_bug_t *bug, void *user_data,
> switch_abc_type_t type)
> However, I tried to find what "switch_media_bug_t" and "switch_abc_type_t"
> are in the API reference doc and found their definition. But it seems hard
> to understand what the fields mean, specially for the first struct. Can
> anyone help me by describing these two data types?
> FreeSWITCH-dev mailing list
> FreeSWITCH-dev at lists.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the FreeSWITCH-dev