What happens during a successful session between Genesys Cloud and your AudioHook server?

    Important: It is strongly recommended that you consult the AudioHook Protocol Specification guide in the Genesys Cloud Developer Center. The high-level states mentioned in this section are only a subset of a complete AudioHook session, and do not include all the event types that the AudioHook Protocol supports.
    Notes:
    • Client refers to Genesys Cloud in the following description.
    • Server refers to the AudioHook service with which Genesys Cloud establishes a session and streams the audio to.
    • It is always the client that initiates and terminates the session.

    A successful AudioHook session includes the following high-level states:

    • Genesys Cloud establishes the HTTP WebSocket connection to your services and authenticates the client.
    • After Genesys Cloud has established the WebSocket connection, the client initiates an open transaction. The client does not send audio until the server completes the open transaction and responds with an “opened” message.
    • When the session is open, Genesys Cloud starts sending audio to the server and the server can send event messages to Genesys Cloud.
      Note: AudioHook currently does not support re-establishing session connections.
    • The client or the server can send a “paused” message to notify that the stream is paused. For example, if the stream is in a server-initiated pause and the client initiates its own pause, then the client sends a “paused” message.
    • The server can send a “resume” message to the client to end a pause the server has initiated. If there is a client-initiated pause, then the client responds with a “paused” message to indicate to the server that the stream is still paused.
    • When the interaction ends, which can happen at the server’s request, the client initiates a close transaction to ensure a clean finalization of the session. The client does not send any audio frames after the client issues the “close” message. This enables the server to terminate downstream sessions gracefully, finalize results, and communicate them to the client as appropriate in “event” messages.
    • The client terminates the TLS/TCP connection.