Recording Call streams separately in FreeSWITCH - freeswitch

I am running a FreeSWITCH server that will function as a call-in radio show. What I want to do is create a platform that will enable the user to edit the show in post-production, which includes creating a custom show/object using the recorded audio.
How I want to do this is record each leg of the call separately, so that way I can record the host separately to the listener calling in. Is this recording action available in FreeSWITCH?
This Question on SO is related:
Call Recording in Freeswitch
and one of the answers mentions the
which according to the official wiki "is used for recording messages, like in a voicemail system".
The question is, Am I able to invoke this record action on both legs of the call? Or any equivalents that exist within FreeSWITCH?

if you set the variable RECORD_STEREO=true and use a FILENAME.wav file as recording destination, the resulting file will have two audio channels, for receiving and sending sides respectively. Then later you can split the channels by your favorite audio editing tool and do what is needed.

Related

Recreating display output from X11 Stream

I do have two computers which are used to control an industrial plant. One of them controls the plant, the other is used as a failsafe. They are directly connected over ethernet, and the inactive" one just mirrors the display of the main controller.
I did capture the network traffic between the two and when i open it up in wireshark i see its all X11 traffic. It does include the initial connection request and also includes all the "draw calls" in plain text.
I now want to "replay" this captured stream and recreate the screen content from it. Is there any program available which can do so? Ideally directly from the wireshark capture file
My thoughts so far:
I can easily replay the network data itself and send it to some socket, but the communication is specific to the session, e.g. some commands refer to specific handle values set up earlier. Its unlikely a new session would work with the same values so i cant just pipe it into some program
What you see from your connection is only your connection requests + events relevant to the windows created by you ( or other's client windows where your connection sets an event mask ), and because of that quite a lot is lost. I'm not aware of the programs that can reconstruct best possible version of the screen from one client traffic but it's certainly not possible to have 100% accurate copy of the screen and best possible model will be far away from real screen (unless your connection periodically polls for backing store content of each mapped window).

if of-hook agents in freeswitch can confirm incoming call from queue?

in default configuration in freeswitch, when a call falls into the queue and is routed to an agent, he immediately answers, I want to change that ...
so is there a way (is this possible) for off-hook agents (always connected agents) to acknowledge the call before bridge (for example by pressing DTMF code) ?
Yes, this is possible. In Freeswitch callcenter module (mod_callcenter.c), you can change it according to your need before bridge to agent. And you can write the code for sending dtmf to off-hook agents. I used to do the changes as per my requirement and I also wrote many custom specific modules.
you can achieve exporting group_confirm variables before executing the callcenter app.
-- first set the variables that you want to export
session:setVariable('group_confirm_file', 'file_string:///var/lib/freeswitch/confirm.wav')
session:setVariable('group_confirm_key', '1')
session:setVariable('confirm', 'true')
-- Exporting varibles, this variables the callcenter app will use and add to agents
session:setVariable('cc_export_vars', 'group_confirm_file,group_confirm_key,confirm')
-- Then now execute the callcenter app
session:execute('callcenter', 'QUEUE-NAME-HERE')
Note: This example I used LUA, but it will be the same on XML

Access the name of agent who received the call in a Queue

Is there any way by which i can receive the information about which agent received the call in queue and what is the duration of call and other information.
I read about the variables that hold this information like cc_agent, cc_queue_answered_epoch etc but how can i access them through freeswitch API in Lua OR it must be evaluated from dialplan only by setting action application to "luarun" with required data.! I am simply forwarding the call to queue
Session:execute("callcenter","Sales")
Basically what i am trying to do is recording all this information in a database after agent hangup the call. Any clue or a direction will be very helpful
Depending on how you have your callcenter app setup, you could parse the CDR data for the following:
cc_agent
That value should be something like:
agent007#pbx.widgetets.local
Given this, you can you simple use regex in your scripting language and you'll be able to quickly see the agent that answered the calls.

Is it possible to capture the rendering audio session from another process?

I am taking my first dives in to the WASAPI system of windows and I do not know if what I want is even possible with the windows API.
I am attempting to write program that will record the sound from various programs and break each in to a separate recorded track/audio file. From the reseacrch I have done I know the unit I need to record is the various audio sessions being rendered to a endpoint, and the normal way of recording is by taking the render endpoint and performing a loopback. However from what I have read so far in the MSDN the only interaction with sessions I can do is through IAudioSessionControl and that does not provide me with a way to get a copy of the stream for the session.
Am I missing something that would allow me to do this with the WASAPI (or some other windows API) and get the individual sessions (or individual streams) before they are mixed together to form the endpoint or is this a imposable goal?
The mixing takes place inside the API (WASAPI) and you don't have access to buffers of other audio clients, esp. that they don't exist in the context of the current process in first place. Perhaps one's best (not so good, but there are no better alternatives) way would be to hook the API calls and intercept data on its way to WASAPI, if the task in question permits dirty tricks like this.

Check webcamera status

I need a way to check if a specific webcamera device is currently active (used by another application, for example Skype). Is there any method in WIA, DirectX or other API to accomplish this check?
For example, I have a software which pops up when capture is started and closes automatically upon disconnection.

Resources