[Spice-devel] Question about bidirectional audio

Frediano Ziglio fziglio at redhat.com
Thu Oct 10 13:22:52 UTC 2019


> 
> 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