A computer-implemented method for providing streaming audio over a network from a client, which comprises a contact center cloud platform, to a server associated with a third-party service, wherein the streaming audio comprises audio derived from an ongoing conversation occurring via the contact center cloud platform between an agent and a customer, the agent comprising a representative of a tenant of the contact center cloud platform and the customer being a customer of the tenant, the method comprising the steps of:
- receiving, by the contact center cloud platform, configuration data from the tenant regarding establishing a connection with the server of the third-party service, the configuration data including at least a network address of the server;
- in relation to streaming the audio of the ongoing conversation, establishing, by the contact center cloud platform, a connection with the server of the third-party service via a connection process given the configuration data provided by the tenant, wherein the connection process includes sending a connection request that comprises:
- a bidirectional communication protocol configured to transmit data from the client to the server and from the server to the client by reusing an established connection channel;
- a tenant-Id parameter that identifies the tenant;
- and
- a session-Id parameter that identifies an audio streaming session to which the connection request pertains;
- in response to establishing the connection with the server of the third-party service, implementing, by the contact center cloud platform, an open transaction for initiating the streaming of the audio of the ongoing conversation to the server, wherein the open transaction comprises:
- transmitting an open message to the server that includes:
- participant parameters identifying the customer;
- and
- at least one choice regarding an audio format for the audio streaming;
- receiving an opened message from the server that indicates:
- a readiness to receive the streaming audio of the ongoing conversation;
- and
- a selection in regard to the at least one choice regarding the audio format;
- streaming, by the contact center cloud platform, the audio of the ongoing conversation pursuant to a streaming protocol, wherein the streaming protocol comprises sending successive messages per the bidirectional communication protocol that each includes:
- raw audio data consistent with the selection regarding the audio format;
- a position property that indicates a current position in the audio stream from a perspective of the client when the client sent the message.