I am trying to answer an incoming call through the .NET SDK of purecloud.
I tried below code to answer a call:
ConversationsApi.PatchConversationsCallParticipant(conversation.Id, participantIdOfLoggedOnUserForActiveCall, new MediaParticipantRequest()
{
State = MediaParticipantRequest.StateEnum.Connected,
});
ConversationsApi.PatchConversationParticipant(conversation.Id, participantIdOfLoggedOnUserForActiveCall, new MediaParticipantRequest()
{
State = MediaParticipantRequest.StateEnum.Connected,
});
the 2e piece code works to disconnect a call when passingStateEnum.disconnected
below is what I see with fiddler for my outgoing request:
PATCH xxx (can only post 1 link in a post at this time...)
Accept: application/json
Authorization: Bearer xxxx
purecloud-sdk: 65.0.0
User-Agent: PureCloud SDK/dotnet
Content-Type: application/json
Host: api.mypurecloud.de
Content-Length: 21
Accept-Encoding: gzip, deflate
No error, just nothing happens (as far as I can see). I seem to be having the same issue as in the link I posted. I get a 202 response, but nothing happens. That is why I am interested to see what solution was found for the issue that answering a call through the API was not possible with WebRTC.
If that setting is enabled and you're still seeing issues, please open a case with PureCloud Care to investigate further as the API is working as expected (successful response).
After testing it turns out the soft phone of purecloud (via chrome extension or the purecloud web app) needs to establish a connection first.
So through the API (.NET SDK) we receive in our software an incoming call event, which we are unable to answer through the API at this point. If we answer that call via the chrome extension for example and end the call, we are able to answer the next incoming call via the API.
A intermediate solution we are looking into is to place a dummy call when a user logs on so the connection is established.
We opened a ticket at Genesys to look into the matter, will update this post with the outcome as a reference for other users having this problem.