Skip to content

Latest commit

 

History

History
218 lines (178 loc) · 9.15 KB

File metadata and controls

218 lines (178 loc) · 9.15 KB
titledescriptionauthorms.localizationpriorityms.subservicedoc_typems.date
Delete call
Delete or hang up an active call.
rahulva-msft
medium
cloud-communications
apiPageType
04/04/2024

Delete call

Namespace: microsoft.graph

Delete or hang up an active call. For group calls, this will only delete your call leg and the underlying group call will still continue.

[!INCLUDE national-cloud-support]

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

[!INCLUDE permissions-table]

Note: Permissions are checked when the call is created; no additional permission check is made when calling this API. Calls.AccessMedia.All is only necessary for calls that use app-hosted media.

HTTP request

DELETE /communications/calls/{id}

Request headers

NameDescription
AuthorizationBearer {token}. Required. Learn more about authentication and authorization.

Request body

Don't supply a request body for this method.

Response

If successful, this method returns 204 No Content response code. It doesn't return anything in the response body.

Example

Request

The following example shows the request.

DELETE https://graph.microsoft.com/v1.0/communications/calls/57dab8b1-894c-409a-b240-bd8beae78896

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]


Response

Note: The response object shown here might be shortened for readability.

HTTP/1.1 204 No Content

Notification - terminating

POST https://bot.contoso.com/api/callsContent-Type: application/json
{ "@odata.type": "#microsoft.graph.commsNotifications", "value": [ { "@odata.type": "#microsoft.graph.commsNotification", "changeType": "updated", "resourceUrl": "/communications/calls/57dab8b1-894c-409a-b240-bd8beae78896", "resourceData": { "@odata.type": "#microsoft.graph.call", "state": "terminating" } } ] } 

Notification - terminated

POST https://bot.contoso.com/api/callsContent-Type: application/json
{ "@odata.type": "#microsoft.graph.commsNotifications", "value": [ { "@odata.type": "#microsoft.graph.commsNotification", "changeType": "deleted", "resourceUrl": "/communications/calls/57dab8b1-894c-409a-b240-bd8beae78896", "resourceData": { "@odata.type": "#microsoft.graph.call", "state": "terminated", "resultInfo": { "@odata.type": "#microsoft.graph.resultInfo", "code": "200", "subcode": "5001", "message": "The conversation has ended." } } } ] }

Call end reason codes

These are some of the common error codes received via notification when call is terminated.

CodeSub-codeTermination reason
2004097Call ended by the other participant in the call.
2004521Call ended by the other participant in peer-to-peer call.
2005000Removed from the conversation by another participant.
2005001The conversation has ended.
2005002The conversation has ended as all other participants have left the call.
2005003The conversation has ended.
2005007The conversation has ended as the initiator of the group call left the conversation.
2005010The conversation has ended as only one participant remained in the conversation.
2005012The conversation has ended as there are no participants in the incoming roster.
2005013The conversation has ended as no one else has joined the group call.
2005014The conversation has ended because we were unable to determine a potential host for the group call.
2005020The conversation has ended as there are no non-hidden participants in the incoming roster.
2005030The conversation has ended as the breakout room duration has elapsed.
2005300Participant was removed from the conversation by another participant.
2005855Participant waiting in lobby was removed from the conversation after lobby inactivity timeout.
2007000The conversation has ended by bot.
2007015Call ended as the transfer completed successfully.
20010550The conversation has ended by bot.
20018503The other participant in the peer-to-peer call left the conversation.
200540000/560000Call ended by the PSTN User.
4088537Keep Alive timeout, cleaned up inactive call.
4081106An acknowledgment wasn't received for the call acceptance in the allotted time.
40810057Call timed out due to no signaling from callee endpoints.
410301005Media connectivity failure.
48010037No callee endpoints were found.
48010076Callee couldn't be reached.
48010134Call rejected due to inability to route the call.
48010199Call rejected as private calling is disabled for the user.
5001005Server encountered connectivity error with Bot's media. Check media connectivity between Bot and Microsoft.
close