How to create a simple "sendDigits" attribute on an outgoing call via functions

98 views
Skip to first unread message

Thomas Maxon

unread,
Jul 1, 2020, 6:37:52 PM7/1/20
to Twilio Functions
I am not sure if this is the best method to do so, but functions could make things very simple. I've already included the callback function into my studio flow and would like to add some more functionality for menus. 

For example this is my 5 second callback function if I encounter a busy or no-answer outgoing call:

exports.handler = function(context, event, callback) {
    setTimeout(callback, 5000);
};

However, when I face a menu I want to navigate that menu via DTMF tones, something  like w1w0. 

Alan

unread,
Jul 1, 2020, 7:02:29 PM7/1/20
to Twilio Functions
Is there a particular call flow you can share / walk us through? At a higher level, what is happening?

I know the Connect Call To Widget doesn't support sending digits like the <Number> TwiML noun, is that what you are trying to do but using Studio?

Thomas Maxon

unread,
Jul 1, 2020, 7:13:12 PM7/1/20
to Twilio Functions
Screen Shot 2020-07-01 at 4.05.54 PM.png

In here, I have a basic automation to call back a number that has not directly answered my Twilio call which was built using functions. But if I want to navigate a menu, I need to be able to 'dial' the number in the menu. 

Not sure how to actually build this function into my studio flow. 

Alan

unread,
Jul 1, 2020, 7:35:46 PM7/1/20
to Twilio Functions
So are the digits sent on the Connect Call To Widget side or the the Make Outgoing Call Widget side? The Make Outgoing Call Widget can already Send Digits.


Send Digits

A string of keys to dial after connecting to the number, maximum of 32 digits. Valid digits in the string include: any digit (0-9), '#', '*' and 'w', to insert a half second pause. For example, if you connected to a company phone number and wanted to pause for one second, and then dial extension 1234 followed by the pound key, the value of this parameter would be ww1234#."

Reply all
Reply to author
Forward
0 new messages