Escolha a permissão ou as permissões marcadas como menos privilegiadas para essa API. Use uma permissão ou permissões privilegiadas mais altas somente se o aplicativo exigir. Para obter detalhes sobre permissões delegadas e de aplicativo, consulte Tipos de permissão. Para saber mais sobre essas permissões, consulte a referência de permissões.
Tipo de permissão
Permissões menos privilegiadas
Permissões privilegiadas mais altas
Delegado (conta corporativa ou de estudante)
Sem suporte.
Sem suporte.
Delegado (conta pessoal da Microsoft)
Sem suporte.
Sem suporte.
Application
Calls.Initiate.All
Calls.AccessMedia.All
Nota: As permissões são verificadas quando uma chamada é criada; nenhuma marcar de permissão adicional é feita ao chamar essa API. Calls.AccessMedia.All só é necessário para chamadas que usam mídia hospedada por aplicativo.
Solicitação HTTP
POST /app/calls/{id}/sendDtmfTones
POST /communications/calls/{id}/sendDtmfTones
Observação: o caminho /app foi preterido. Daqui em diante, use o caminho /communications.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Communications.Calls.Item.SendDtmfTones;
using Microsoft.Graph.Models;
var requestBody = new SendDtmfTonesPostRequestBody
{
Tones = new List<Tone?>
{
Tone.Tone1,
Tone.Tone2,
Tone.Tone3,
Tone.Tone4,
Tone.Tone5,
Tone.Tone6,
Tone.Tone7,
Tone.Tone8,
Tone.Tone9,
Tone.Tone0,
Tone.Star,
Tone.Pound,
},
DelayBetweenTonesMs = 1000,
ClientContext = "e0be71f1-a14f-4cec-b65a-e7aba5db7c53",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Communications.Calls["{call-id}"].SendDtmfTones.PostAsync(requestBody);
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphcommunications "github.com/microsoftgraph/msgraph-sdk-go/communications"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphcommunications.NewSendDtmfTonesPostRequestBody()
tones := []graphmodels.Toneable {
tone := graphmodels.TONE1_TONE
requestBody.SetTone(&tone)
tone := graphmodels.TONE2_TONE
requestBody.SetTone(&tone)
tone := graphmodels.TONE3_TONE
requestBody.SetTone(&tone)
tone := graphmodels.TONE4_TONE
requestBody.SetTone(&tone)
tone := graphmodels.TONE5_TONE
requestBody.SetTone(&tone)
tone := graphmodels.TONE6_TONE
requestBody.SetTone(&tone)
tone := graphmodels.TONE7_TONE
requestBody.SetTone(&tone)
tone := graphmodels.TONE8_TONE
requestBody.SetTone(&tone)
tone := graphmodels.TONE9_TONE
requestBody.SetTone(&tone)
tone := graphmodels.TONE0_TONE
requestBody.SetTone(&tone)
tone := graphmodels.STAR_TONE
requestBody.SetTone(&tone)
tone := graphmodels.POUND_TONE
requestBody.SetTone(&tone)
}
requestBody.SetTones(tones)
delayBetweenTonesMs := int32(1000)
requestBody.SetDelayBetweenTonesMs(&delayBetweenTonesMs)
clientContext := "e0be71f1-a14f-4cec-b65a-e7aba5db7c53"
requestBody.SetClientContext(&clientContext)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
sendDtmfTones, err := graphClient.Communications().Calls().ByCallId("call-id").SendDtmfTones().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.communications.calls.item.senddtmftones.SendDtmfTonesPostRequestBody sendDtmfTonesPostRequestBody = new com.microsoft.graph.communications.calls.item.senddtmftones.SendDtmfTonesPostRequestBody();
LinkedList<Tone> tones = new LinkedList<Tone>();
tones.add(Tone.Tone1);
tones.add(Tone.Tone2);
tones.add(Tone.Tone3);
tones.add(Tone.Tone4);
tones.add(Tone.Tone5);
tones.add(Tone.Tone6);
tones.add(Tone.Tone7);
tones.add(Tone.Tone8);
tones.add(Tone.Tone9);
tones.add(Tone.Tone0);
tones.add(Tone.Star);
tones.add(Tone.Pound);
sendDtmfTonesPostRequestBody.setTones(tones);
sendDtmfTonesPostRequestBody.setDelayBetweenTonesMs(1000);
sendDtmfTonesPostRequestBody.setClientContext("e0be71f1-a14f-4cec-b65a-e7aba5db7c53");
var result = graphClient.communications().calls().byCallId("{call-id}").sendDtmfTones().post(sendDtmfTonesPostRequestBody);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.communications.calls.item.send_dtmf_tones.send_dtmf_tones_post_request_body import SendDtmfTonesPostRequestBody
from msgraph.generated.models.tone import Tone
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = SendDtmfTonesPostRequestBody(
tones = [
Tone.Tone1,
Tone.Tone2,
Tone.Tone3,
Tone.Tone4,
Tone.Tone5,
Tone.Tone6,
Tone.Tone7,
Tone.Tone8,
Tone.Tone9,
Tone.Tone0,
Tone.Star,
Tone.Pound,
],
delay_between_tones_ms = 1000,
client_context = "e0be71f1-a14f-4cec-b65a-e7aba5db7c53",
)
result = await graph_client.communications.calls.by_call_id('call-id').send_dtmf_tones.post(request_body)