简体   繁体   English

Twilio Studio - 从一个访问 DTMF 数字<gather>由函数返回?</gather>

[英]Twilio Studio - Access DTMF Digits from a <gather> returned by a function?

Is there any way while inside a Twilio Studio Flow to access Digits from a TwiML Gather that has been returned from a function inside the flow?在 Twilio Studio Flow 中,有什么方法可以从 TwiML Gather 中访问从流中的函数返回的数字吗?


I am using Twilio Studio to create a rather complex call flow.我正在使用 Twilio Studio 创建一个相当复杂的呼叫流程。 At one point in the flow, I need to create a TwiML Gather with a dynamic number of options (there can be anywhere between 3 and 10 valid DTMF options).在流程中的某个时刻,我需要创建一个具有动态数量选项的 TwiML Gather(可以有 3 到 10 个有效的 DTMF 选项)。

The Twilio Function I have created works, and returns the TwiML Gather properly, but I cannot find a way to access the "Digits" result of this function's Gather once the user presses a key.我创建的 Twilio 函数可以正常工作,并正确返回 TwiML Gather,但是一旦用户按下某个键,我就无法找到访问该函数 Gather 的“数字”结果的方法。

Thanks.谢谢。

Twilio developer evangelist here. Twilio 开发者传播者在这里。

Currently once you pass a call off to a Function you can't return control to a Studio Flow.目前,一旦您将调用传递给 Function,您就无法将控制权返回给 Studio Flow。

However, the good news is that the feature is in progress.但是,好消息是该功能正在进行中。 I don't have an ETA for it yet though, but I will report back here when it is possible with instructions on how.虽然我还没有它的预计到达时间,但如果可能的话我会在这里报告如何操作。

You can now return back to the studio flow and call the digits with {{widgets.YOUR_FUNCTION_WIDGET_NAME.body}} which will return the response body.您现在可以返回工作室流程并使用 {{widgets.YOUR_FUNCTION_WIDGET_NAME.body}} 调用数字,这将返回响应正文。

there are more options you can find in widget docs您可以在小部件文档中找到更多选项

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM