Answer incoming call using the API

Hi,

Is seems that its not possible to answer incoming calls thru the API.

I am currently using the .NET SDK and I can see the call being sendt using Fiddler, but it dosent seem to connect the call.

var conversationApi = new ConversationsApi();
conversationApi.PatchConversationsCallParticipant(currentConversation.Id,
participantid, new MediaParticipantRequest { State = MediaParticipantRequest.StateEnum.Connected });

This is my c# code and in fiddler I'm getting this:

PATCH https://api.mypurecloud.ie/api/v2/conversations/calls/{callId}/participants/{participantId} HTTP/1.1
Accept: application/json
Authorization: Bearer {token}
purecloud-sdk: 18.1.0
User-Agent: PureCloud SDK/dotnet
Content-Type: application/json
Host: api.mypurecloud.ie
Content-Length: 21
Accept-Encoding: gzip, deflate

{"state":"connected"}

So I'm wondering what I'm doing wrong or isn't it possible to answer thru the SDK?

Are you using a webrtc station?

Yes we are using webrtc

Don't forget step #5 every time you open the web app: https://help.mypurecloud.com/articles/select-purecloud-web-based-phone-as-your-phone/. Yes, you do have to do this every time and there is no way to automate or remember this setting.

Edit 2024: this is now step 2 under Configure the Genesys Cloud WebRTC phone settings Select and configure the Genesys Cloud WebRTC phone - Genesys Cloud Resource Center

That option is checked and I still can't answer a conversation

Can you provide the correlation ID from the response?

ININ-Correlation-Id: 43d3a9dc-2de6-40fa-ba2e-22e03e63aa32

Your request is being handled successfully as far as I can tell. The API/conversation service is sending a command to the edge to answer the call, but that's as far as I have the ability to see. You'll need to open a ticket with PureCloud Support to troubleshoot further (look into the edge logs). Be sure to mention that you have done troubleshooting on the forum and that the API request is correct and successful, but the edge isn't connecting the call.

Ok ill do that.
Thanks for your help!

To follow up on this, answering calls via the API when using a WebRTC station isn't currently possible. The only way to answer an incoming call when using a WebRTC station is to have the call be auto-answered. The ability to answer incoming calls using a WebRTC station is being tracked as PURE-1848.

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