Auto answer call via API

Hi,
I am trying to auto answer the call via .NET SDK.

This is the code I am using

var conversationApi = new ConversationsApi();

            conversationApi.PatchConversationsCallParticipant(
                conversationId,
                participantId,
                new MediaParticipantRequest { State = MediaParticipantRequest.StateEnum.Connected });

The API call returns 202, but nothing happens to the call.
This is the active call details that I get from the API. Can you tell me which participants id should I use? I tried using both but nothing worked.

{

"entities": [
{
"id": "5e0654f7-c540-4ed3-a23f-xxxxxxxxx",
"participants": [
{
"id": "42e00d22-c588-4896-xxxx-xxxxxxx",
"state": "dialing",
},
{
"id": "43b51812-dd82-43bd-xxxxxxxx-xxxxxx",
"state": "alerting"
}
],
"otherMediaUris": [],
"recordingState": "none",
"selfUri": "/api/v2/conversations/calls/5e0654f7-c540-4ed3-a23f-b7e608c88a60"
}
]
}

Can you help on this, please?

Thanks

You need to use the participant that is your user. If you believe you're using the correct one, please open a case with Genesys Cloud Care to investigate further since the API request is successful but is not causing the expected effect.

That can be related to that.

Hi,
State = MediaParticipantRequest.StateEnum.Disconnected
is working fine, but auto connect is not working.
I get the following screen, and nothing happens.

Hi @tim.smith , The above issues is not solved but our use case have changed and now we want to auto answer the call via API where customer calls our agents on DID number. I get the the same 202 but nothing happens. For disconnecting calls, it works fine.
For 202, I got inin-correlation-id = 00efd3a1-056b-411c-b00c-65991f0b9289.

Can the API request be traced by this correlation id to check what's wrong with the request?

I have attached the conversation response of the active calls, if that helps.
active-call-response.json (2.5 KB)

Can you tell me if it possible to achieve via API? If not, any alternatives to achieve the same.

Thank you.

@Nandkishor_Yadav please open a case with Genesys Cloud Care to investigate further since the API request is successful but is not causing the expected effect.

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