Voice recording in the handset (android and iOS)

mbedial

Member
Hi,
we are using WCS 5.2 and asterisk for offering our customers voip calls from iOS and android apps to normal phones.
We are considering to include a recording feature in the app. It'd be easy to do it in the WCS or asterisk, but we'd like to do it in the handset, recording the stream.
I'd like to know if the libraries include any funcionality like that.
Thanks in advance.
M
 

Max

Administrator
Staff member
Good day.
We are considering to include a recording feature in the app. It'd be easy to do it in the WCS or asterisk, but we'd like to do it in the handset, recording the stream.
Unfortunally, voice call recording does not work on all Android devices in latest Android versions. Thus, recording usually works in 8 and 8.1, but is forbidden by Google since 9. Some vendors can bypass the restriction, but not all the vendors.
That's why server side recording is the most preferrable way.
 

mbedial

Member
Thanks Max for your quick answer.
Actually we don't want to record the voice call in both ways but just the incoming stream that we receive. In fact we are cheking it, but we have this question:
Is there a way to get a stream of a Call object in wcs Android client in order to dump data to a file? We have tried getRtmpStream(), getRtmpUrl() but these are empty during the call.

Thanks again.
 

mbedial

Member
So far, we have used the WCS library to make voice calls creating the Object type Session, obtaining object Call and making Call.call().
I have an additional question, with this scenario of making calls, if we want to record in the server side, can we send in each call if we want to record it? I know that we can use the record parameter into the createStream, but actually we don't use createStream.
On the other hand, is the recorded file available in the server during the call even when is not closed?
 

Max

Administrator
Staff member
I have an additional question, with this scenario of making calls, if we want to record in the server side, can we send in each call if we want to record it? I know that we can use the record parameter into the createStream, but actually we don't use createStream.
The record parameter affects stream publishing only, but not SIP calls.
To record SIP call streams, you should rework backend:
1. Arrange conference on Asterisk
2. Clients makes SIP call to the conference using WCS Android SDK
3. Cilent side or backend initiates SIP as stream call from WCS to the conference using REST API query /call/startup, them starts recording using REST API query /stream/startRecording for the SIP as stream call. Another option is to record all the SIP streams using configuration parameter
Code:
sip_record_stream=true
On the other hand, is the recorded file available in the server during the call even when is not closed?
The stream recording file becomes available to play after recording is stopped by REST API query /stream/stopRecording or by stopping a call (or, commonly, a stream)
 

mbedial

Member
Thanks again,
we are going to test sip_record_stream=true, but I can't find in the documentation where the recorded files are located.
Setting this variable, Will all the SIP calls be recored?
 

Max

Administrator
Staff member
I can't find in the documentation where the recorded files are located
All the recordings are stored to /usr/local/FlashphonerWebCallServer/records folder
Setting this variable, Will all the SIP calls be recored?
sip_record_stream parameter enables only SIP as stream recording, i.e. this call should be started by REST API query /call/startup with toStream option, for example:
Code:
POST /rest-api/call/startup HTTP/1.1
HOST: 192.168.1.59:8081
content-type: application/json
 
{
    "callId":"123456711",
    "callee":"10000",
    "toStream":"stream1",
    "hasAudio":"true",
    "hasVideo":"true",
    "sipLogin":"10009",
    "sipAuthenticationName":"10009",
    "sipPassword":"1234",
    "sipDomain":"226.226.225.226",
    "sipOutboundProxy":"226.226.225.226",
    "sipPort":"5060",
    "appKey":"defaultApp",
    "sipRegisterRequired":"false",
    "visibleName":"WCS_10009"
}
 
Top