1

I've been following the https://github.com/TwilioDevEd/browser-calls-node project code, and I have it successfully making calls from a browser to a cellular phone, but I can't for the life of me figure out if Twilio's supports DTMF inside that call from the Cell phone.

Calling their sales department just had them create a support ticket and I haven't gotten a response.

Has anyone successfully done this? And if so, how?

This is the code I've added is to call.js, in the /connect endpoint I added:

const gather = twiml.gather({
        input: 'dtmf',
        finishOnKey: 9,
        timeout: 1,
        action: '/call/completed'
    });

    gather.say('Welcome to Twilio, please tell us why you\'re calling');

    console.log(twiml.toString())

As well as added the route:

router.post('/completed', twilio.webhook({ validate: false }), function (req, res, next) {
    console.log(req.toString());
});
T1960CT
  • 407
  • 7
  • 18
  • 2
    What happens when you run the code? Are there errors in your Twilio logs? The URL specified in the action parameter should be getting requested once you press 9 on your keypad. – Devin Rader Nov 07 '19 at 22:04
  • 1
    Your call flow isn't clear. Are you having a two way interactive conversation with the dialed party (the cell phone party you called from your web browser)? Why would DTMF need to be collected during this type of live call? – Alan Nov 08 '19 at 12:20
  • @DevinRader when I run it, there are no errors. Not in the nodejs output, nor in the debug section of the Twilio web console. – T1960CT Nov 08 '19 at 13:17
  • @Alan It's for access management. Like a door buzzer where someone says "I'm the pizza guy" and you press 9 to let them in. – T1960CT Nov 08 '19 at 13:18

1 Answers1

3

Their support team replied saying (tl;dr) they only support sendDigits(digits) in the SDK, and do not support recognizing DTMF in incoming audio stream.

Their response:

The Twilio Client SDK's sendDigits(digits) parameter can used to pass dtmf tones.

The SDK only supports sending DTMF digits. It does not raise events if DTMF digits are present in the incoming audio stream.

Ref:https://www.twilio.com/docs/voice/client/javascript/connection#sendDigits```

T1960CT
  • 407
  • 7
  • 18