| title | call: senddtmftones |
|---|---|
| description | Send DTMF tones in a call. |
| author | jackry2023 |
| ms.localizationpriority | medium |
| ms.subservice | cloud-communications |
| doc_type | apiPageType |
| ms.date | 04/05/2024 |
Namespace: microsoft.graph
[!INCLUDE beta-disclaimer]
Send DTMF tones in a call.
For more information about how to handle operations, see commsOperation
[!INCLUDE national-cloud-support]
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 a 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.
POST /app/calls/{id}/sendDtmfTones
POST /communications/calls/{id}/sendDtmfTonesNote: The
/apppath is deprecated. Going forward, use the/communicationspath.
| Name | Description |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
In the request body, provide a JSON object with the following parameters.
| Parameter | Type | Description |
|---|---|---|
| tones | ToneInfo collection | The tones to be sent. |
| delayBetweenTonesMs | Int32 | The milliseconds delay between tones. |
| clientContext | String | Unique client context string. Can have a maximum of 256 characters. |
If successful, this method returns a 200 OK response code and a sendDtmfTonesOperation object in the response body.
The following example shows how to call this API.
The following example shows the request.
POST https://graph.microsoft.com/beta/communications/calls/481f3600-983e-4276-9b59-c1b30ec8d125/microsoft.graph.sendDtmfTones
Content-Type: application/json
Content-Length: 166
{
"tones": [
"tone1",
"tone2",
"tone3",
"tone4",
"tone5",
"tone6",
"tone7",
"tone8",
"tone9",
"tone0",
"star",
"pound"
],
"delayBetweenTonesMs": 1000,
"clientContext": "e0be71f1-a14f-4cec-b65a-e7aba5db7c53"
}[!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]
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Location: https://graph.microsoft.com/beta/communications/calls/57dab8b1-894c-409a-b240-bd8beae78896/operations/d36fe651-9f50-484d-bd4b-1e6415eae448
{
"@odata.type": "#microsoft.graph.sendDtmfTonesOperation",
"status": "running",
"clientContext": "e0be71f1-a14f-4cec-b65a-e7aba5db7c53",
"id": "d36fe651-9f50-484d-bd4b-1e6415eae448"
}
POST https://bot.contoso.com/api/calls
Content-Type: application/json{
"@odata.type": "#microsoft.graph.commsNotifications",
"value": [
{
"@odata.type": "#microsoft.graph.commsNotification",
"changeType": "deleted",
"resourceUrl": "/communications/calls/481f3600-983e-4276-9b59-c1b30ec8d125/operations/d36fe651-9f50-484d-bd4b-1e6415eae448",
"resourceData": {
"@odata.type": "#microsoft.graph.sendDtmfTonesOperation",
"status": "completed",
"completionReason": "completedSuccessfully",
"clientContext": "e0be71f1-a14f-4cec-b65a-e7aba5db7c53",
"id": "d36fe651-9f50-484d-bd4b-1e6415eae448"
}
}
]
}POST https://bot.contoso.com/api/calls
Content-Type: application/json{
"@odata.type": "#microsoft.graph.commsNotifications",
"value": [
{
"@odata.type": "#microsoft.graph.commsNotification",
"changeType": "deleted",
"resourceUrl": "/communications/calls/481f3600-983e-4276-9b59-c1b30ec8d125/operations/d36fe651-9f50-484d-bd4b-1e6415eae448",
"resourceData": {
"@odata.type": "#microsoft.graph.sendDtmfTonesOperation",
"status": "completed",
"completionReason": "mediaOperationCanceled",
"clientContext": "e0be71f1-a14f-4cec-b65a-e7aba5db7c53",
"id": "d36fe651-9f50-484d-bd4b-1e6415eae448"
}
}
]
}POST https://bot.contoso.com/api/calls
Content-Type: application/json{
"@odata.type": "#microsoft.graph.commsNotifications",
"value": [
{
"@odata.type": "#microsoft.graph.commsNotification",
"changeType": "deleted",
"resourceUrl": "/communications/calls/481f3600-983e-4276-9b59-c1b30ec8d125/operations/d36fe651-9f50-484d-bd4b-1e6415eae448",
"resourceData": {
"@odata.type": "#microsoft.graph.sendDtmfTonesOperation",
"status": "completed",
"completionReason": "unknown",
"clientContext": "e0be71f1-a14f-4cec-b65a-e7aba5db7c53",
"id": "d36fe651-9f50-484d-bd4b-1e6415eae448"
}
}
]
}