How to end call?

Hi,

I want to ask what are the different options for a remote operator to end a call through a web browser via purecloud sdk. I am aware that if the individual on other side of the call ends the call, the SessionEnd event is triggered which makes it easy to alert the remote operator of the call end state.

I came across this post: https://developer.mypurecloud.com/forum/t/determining-call-start-and-call-end/2082 but this is about knowing when the call is ended as opposed to actually ending the call.

The conversations api documentation had a few good methods but the distinction between them didn't seem clear. Can anyone provide greater nuance + use cases for these?

  1. Post conversation disconnect
    https://developer.mypurecloud.com/api/rest/client-libraries/javascript/ConversationsApi.html#postConversationDisconnect
    In the notes for this method, it says "This is not intended to be the normal way of ending interactions" so what method is suggested then?

  2. patchConversationsCallback (I am leaning towards this option.)

  3. patchConversationsCall

Thank you in advance for the help.

I think you'd be best (for a call) to use patchConversationsCall - assuming it's a call and not a callback.

Basically more like having that participant disconnect and let PureCloud do what it wants to do instead of trying to force everything down.

PATCH /api/v2/conversations/{conversationId}/participants/{participantId} is the correct resource to use for a participant to disconnect themselves.

1 Like

Thank you for your responses.

Would both options be appropriate if I wanted to end the call on the other side, as that is my goal. So if one participant disconnects themselves does that mean the other participant is in an ongoing 1 person phone call or will purecloud detect it and automatically end the call?

or will purecloud detect it and automatically end the call?

Correct.

1 Like

Awesome - thank you.

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