ACS: Dtmf-Recognition - Event received but no tones?

Nikolaj Woljke 20 Reputation points

Hello. My app receives incoming calls from a pstn and after the call is connected, it starts DTMF-Recognition:

var dtmfRecOptions = new ContinuousDtmfRecognitionOptions(comId)
    OperationContext = "dtmf-reco-on-c2"
await callMedia.StartContinuousDtmfRecognitionAsync(dtmfRecOptions);

If the caller pushes the buttons, my app receives a Azure.Communication.CallAutomation.ContinuousDtmfRecognitionToneReceived-event but it is missing the tones.

app.MapPost("/api/calls/{contextId}", async (
    [FromBody] CloudEvent[] cloudEvents,
    [FromRoute] string contextId,
    [Required] string callerId,
    ILogger<Program> logger) =>
    callerId = sWhitespace.Replace(callerId, "+");
    logger.LogInformation($"1callerId: {callerId}");
    foreach (var cloudEvent in cloudEvents)
        logger.LogInformation($"cloudEvent received: {JsonConvert.SerializeObject(cloudEvent)}");

the logger gets:

cloudEvent received: {"Data":{},"Id":"<id>","Source":"calling/callConnections/<>","Type":"Microsoft.Communication.ContinuousDtmfRecognitionToneReceived","Time":"2024-03-22T14:06:26.2796873+00:00","DataSchema":null,"DataContentType":"application/json","Subject":"calling/callConnections/<>","ExtensionAttributes":{}}


Azure Communication Services
Azure Communication Services
An Azure communication platform for deploying applications across devices and platforms.
676 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sedat SALMAN 13,075 Reputation points

    you can consider following issues

    1. Verify the ContinuousDtmfRecognitionOptions settings in your setup to ensure they align with your requirements and are correctly implemented. This includes the operationContext and target participant settings​.
    2. Check the event handling logic for the ContinuousDtmfRecognitionToneReceived event to confirm that it is correctly capturing and logging the DTMF tones. Ensure your logic is properly deserializing the event and extracting the tone information​.
    3. Review the technical specifications and ensure all required parameters are correctly set, such as RecognizeInputsType, MaxTonesToCollect, and other relevant settings that could impact DTMF tone recognition​.
    0 comments No comments

0 additional answers

Sort by: Most helpful