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

Nikolaj Woljke 20 Reputation points
2024-03-22T14:48:33.33+00:00

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":{}}

Why?

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
    2024-03-22T17:31:39.91+00:00

    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​.
      https://learn.microsoft.com/en-us/azure/communication-services/how-tos/call-automation/control-mid-call-media-actions
    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​.
      https://learn.microsoft.com/en-us/azure/communication-services/how-tos/call-automation/control-mid-call-media-actions
    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​.
      https://learn.microsoft.com/en-us/azure/communication-services/how-tos/call-automation/recognize-action
    0 comments No comments

0 additional answers

Sort by: Most helpful