SimplGy
SimplGy

Reputation: 20437

Should I be able to hear the DTMF codes Twilio plays?

I am setting up an auto-answer in Twilio that plays the DTMF code "9".

When I call the number, it answers correctly, but in testing, I cannot audibly hear that it is playing a DTMF tone.

I can hear other commands like twiml.say('hello').

I have validated that the more w chars I add, the longer the line stays open.

Q: Is that how DTMF codes are supposed to work, or they should be audible?

Example code:

exports.handler = function (context, event, callback) {
  const twiml = new Twilio.twiml.VoiceResponse();
  twiml.say('Hello!');

  // Dial "9" three times, with pauses between each
  twiml.play({ digits: 'w9w9w9' });

  return callback(null, twiml);
};

Upvotes: 0

Views: 564

Answers (1)

philnash
philnash

Reputation: 73100

Twilio developer evangelist here.

When Twilio plays DTMF tones, it does so out-of-band, so you will not be able to hear them yourself on the audio line.

Upvotes: 1

Related Questions