Unable to answer call via .NET SDK

Hi all,

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

I found article https://developer.mypurecloud.com/forum/t/answer-incoming-call-using-the-api/1812 on which I based the first piece of code. I found however no reference anywhere to "PURE-1848", can I check somewhere what the result was of this ticket? We really need to functionality of answering a call.

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

{"state":"connected"}

Can you describe the problem you're having? Are you getting an error of some sort?

Hi Tim,

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.

Be sure you've enabled the "placing calls with another app" setting https://help.mypurecloud.com/articles/select-purecloud-webrtc-phone-as-your-phone/

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).

Hi Tim,

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.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.