Skip to main content
Participant
January 27, 2011
Question

How record conversation?

  • January 27, 2011
  • 1 reply
  • 777 views

hi,

i'm develop a call-center with FMS and FMG, and I want save files of conversation. It's possible create a file with the conversation?

In the file main.asc in the function sendOnLeg, i'm doing:

                if (application.stream)
                {
    application.stream.record();
                    application.stream.play(obj.incomingStream);
                }

but the file only have the sound of inputstream (Microphone).

Thank you
              

This topic has been closed for replies.

1 reply

January 28, 2011

In FMG, you cannot record the conversation in one file, because for the incoming and the outgoing calls there are two different streams on FMS.

You can record these two streams separately.

The name of the outgoing stream for RTMP is fixed by the client and if you are using the sample flashphone available with FMG, it publishes stream with name - phoneID,

So,

the "info" object of the function in main.asc:

application.legService.onLeg = function(info)

has the property info.incomingStream which is the incoming stream

and for outgoing stream the phoneID which is obtained by the client in below function in main.as, can be used as name for recording outgoing stream.

Client.prototype.getPhoneID = function()

Also, For recording a video stream , code can be used as:

var s=Stream.get("mp4:"+info.incomingStream+"_record");

if(s)

{

s.play(info.incomingStream);

s.record();

trace("--- s stream got - starting recording");

}

Participant
January 28, 2011

Hi,

Thank you for your answer.

Ok. Now I have the conversation in two files. But how i can relate the files the client and the server ? It's possible join/mix the files in one only?

January 28, 2011

Hi,

There is no possible way in FMG to mix these two files.

If you are asking about relating the two files recorded for the same call, then this can be done by using an identifier in main.asc and using the same identifier as part of the name for recording  both the streams. This identifier should change for every call.

Did this answer your question?

Thanks,

Shruti