deejayjay | 2021-11-03 16:28:53 UTC | #1
Hello, I am trying to answer an inbound call using the code below:
function connect(callId, participantId) { // Create request body, only set desired properties const body = { state: "connected", };
// Invoke API conversationsApi .patchConversationsCallParticipant(callId, participantId, body) .then(() => { console.log("Call connected successfully!"); }) .catch(err => { console.log( "There was a failure calling postConversationsCalls" ); console.error(err); }); }
This code works most of the time. However, if the agent tries to answer a call the first time after he logs in, the call is not answered despite displaying the message Call connected successfully!. I will need to place a dummy call and answer it from the Genesys Workspace. Once that is done, this code works fine.
Is there a way to fix this? Thanks in advance
anon11147534 | 2021-11-08 08:57:17 UTC | #2
Hi,
If you are using a WebRTC station, the following forum topic should be a help: https://developer.genesys.cloud/forum/t/answering-inbound-calls-via-js-sdk-with-webrtc-station/7026
deejayjay | 2021-11-08 14:06:49 UTC | #3
Thank you for the reply @anon11147534. We are using WebRTC station, and I was able to answer the calls using same pure cloud API that is mentioned in the solution of that thread. The question I have is 'whether it is possible to automate the activation of the WebRTC other than by placing a dummy call'. Thanks once again.
system | 2021-12-09 14:07:17 UTC | #4
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 12549