[Spice-devel] Question about bidirectional audio
Frediano Ziglio
fziglio at redhat.com
Fri Oct 11 11:00:45 UTC 2019
>
> Sorry for not being clear.
>
>
> In this case, the client is Asterisk and the server is a SPICE server.
>
> They want to send audio from the client to the server. The documentation
> says that I need to use
> RED_RECORD_* messages. The server must start requesting the record from
> the client, with a RED_RECORD_START request. How can I trigger this
> request? One of the client's developers said that this message is sent
> from the server right after a link with connection type
> SPICE_CHANNEL_RECORD is made. Is this information true? I cannot find
> anywhere in the documentation how this communication starts.
>
The documentation is a bit outdated, many RED_* stuff was renamed to
SPICE_* time ago. In case of messages should be SPICE_MSGC_RECORD_START
(the C in MSGC means from client).
As said the record channel is like a microphone. The start is triggered
by the line-in enabled in the VM sound card. If the line-in is enabled
before the connection the start message is send after the connection.
Otherwise to trigger the start you need to enable the line-in on the
VM side, that is, you need to start a recording in the VM.
> On 10/10/19 3:22 PM, Frediano Ziglio wrote:
> >> Hello,
> >>
> >> I'm a developer doing a freelance job for a company. They want to
> >> connect Asterisk call center to a vm running Spice. I see that it's
> >> possible to do Bidirectional Audio, according to your user manual.
> >> I want to stream audio from a client to the server, and have that audio
> >> played through the output device of the server. I need to make this code
> >> in C.
> >>
> > Not clear here what the client and server are. Speaking about SPICE
> > the server is the part attached to the VM while the client is usually
> > a GUI client (like remote-viewer).
> >
> >> Looking at your protocol I saw that for audio messages the server always
> >> needs to start the communication, either with RED_PLAYBACK_START or
> >> RED_RECORD_START.
> >>
> > They are 2 separate channels which have one respective TCP connection
> > (can be a Unix socket connection but in this case won't be remote).
> > The playback channel is like, for the SPICE client, a speaker so the
> > VM will send the audio to be played.
> > The record channel is like, still for the client, a microphone so
> > the client will send the audio to be recorder by the VM.
> > The START messages are send from the VM either so say that the audio
> > card is playing something (playback) or trying to record something
> > (record)
> >
> >> My client wants to receive the call in the call center and have it
> >> automatically streamed to the server. But I cannot start messaging
> >> unless the server requests the connection.
> >>
> > What is the server here? It seems it's not SPICE server. It's not
> > clear what you are trying to do. Where is executed Asterisk?
> > And how is Asterisk involved here? Is it not possible to record on
> > Asterisk (I suppose the calls are handled by Asterisk)?
> >
> >> How can I solve that?
> >>
> >> Regards,
> >> Eduardo Hoefel
> >>
> > Frediano
>
More information about the Spice-devel
mailing list