Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Monitoring Agent Chats Using Amazon Connect Streams API #919

Open
SaqibOctave opened this issue Aug 26, 2024 · 6 comments
Open

Comments

@SaqibOctave
Copy link

Hi,

I'm developing a custom supervisor dashboard using the Amazon Connect Streams API. The dashboard is designed to enable supervisors to monitor voice calls and chat interactions of agents. While the voice call monitoring and barge-in functionalities are working perfectly, I'm encountering an issue when trying to monitor chat sessions.

contact.getAgentConnection().getMediaController()

According to the documentation, getMediaController() should return the chatController promise for chat monitoring. However, when I attempt to monitor an agent's chat session, I receive the following error:

Media Controller is no longer available for this connection.

I'm not sure why this error is occurring. The voice monitoring works as expected, but chat monitoring fails with this error. Has anyone else encountered this issue or know what might be causing it? Any insights or suggestions on how to resolve this would be greatly appreciated.

@seiyako
Copy link
Contributor

seiyako commented Aug 26, 2024

Hi, did you load ChatJS as well?

@SaqibOctave
Copy link
Author

hi @seiyako Yes, I have added the Chat_js streams as well, My whole functionality works perfect in normal cases but errors occure while monitoring

@SaqibOctave
Copy link
Author

@jagadeeshaby

@SaqibOctave
Copy link
Author

Hi @seiyako
this is what i am doing
if(contact.getAgentConnection() && contact.getAgentConnection().getStatus().type === 'silent_monitor'){

      console.log("[Chat Controllers ] >>  agent connectipon", contact.getAgentConnection())

     
        // chat users
            contact.getAgentConnection().getMediaController()
            .then((controller : any)=>{
             console.log("[Chat Controllers ] >>  controller", controller)
            }).catch((error)=>{
             console.log("[Chat Controllers ] >>  controller", error)

            });
            and i got this
            Media Controller is no longer available for this connection.

@tannera926
Copy link
Contributor

Instead of checking if the agent connection status is 'silent_monitor', I would use the connection.isSilentMonitor() API. This is what we use in the CCP and is more reliable than checking the connection status.

@vvgoyal
Copy link

vvgoyal commented Oct 23, 2024

@SaqibOctave have you tried the api mentioned above?
are you still facing this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@tannera926 @seiyako @SaqibOctave @vvgoyal and others