Hello,
How can i accept a incoming call using the JS api?
The notifications send the conversation with the participants list, but i don't know how to pick up the call.
Thank you
Best Regards.
Herlander Pires
Hello,
How can i accept a incoming call using the JS api?
The notifications send the conversation with the participants list, but i don't know how to pick up the call.
Thank you
Best Regards.
Herlander Pires
Use PATCH /api/v2/conversations/calls/{conversationId}/participants/{participantId} to answer a call. There's also a tutorial on call handling, though it's still using the old JavaScript SDK so the API calls won't match up exactly with the latest version.
Hello Tim.
Thank u for answering.
I forgot to mention that we were trying to accept a callback. Is it the same but using /api/v2/conversations/callbacks (...) ?
The tutorial mentions the accept in the "disconnect the call" section. That's why we miss it.
Also, in the tutorial, the participant id is obtained assuming a given index. When changing the call state for a participant that corresponds to the "agent" can we assume an index? Or do we have to traverse the list until we find a participant that matches our user id?
Thanks again.
Regards,
Herlander
I forgot to mention that we were trying to accept a callback. Is it the same but using /api/v2/conversations/callbacks (...) ?
Yes.
Also, in the tutorial, the participant id is obtained assuming a given index. When changing the call state for a participant that corresponds to the "agent" can we assume an index? Or do we have to traverse the list until we find a participant that matches our user id?
There is no guarantee that the order of the participants will be the same in all situations; the tutorial is making an assumption because it only expects to encounter a single scenario. As a best practice, you should iterate through the list of participants until you find the one you're looking for.
Thanks.
Regards,
Herlander
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.