Voiceflow PartnersVPVoiceflow Partners
Powered by
Btfu80B
Voiceflow Partners•8mo ago•
4 replies
Btfu80

DTMF to capture a phone number isn't working

I'm trying to create a path for someone to enter their phone number into the voiceflow using dtmf. I'm using the JS below and I've attached a screenshot of the buildout and the results. It isn't ever triggering the complete path when the 10th number is entered. I've tried multiple versions of the JS based on the help webstie that VF provides and they are all doing the same thing. Caputring the numbers but never triggering complete. What am I missing?

/* runs right after the DTMF custom-action step /
if (typeof caller_phone !== 'string') caller_phone = '';
const digitMatch = (last_event?.name ?? '').match(/DTMF\s(\d)/);
if (digitMatch) caller_phone += digitMatch[1];

/
once we have 10 digits break the loop */
if (caller_phone.length === 10) return 'complete';

I got this directly from the VF chatbot. I can't get the (caller_phone.length === 10) to trigger.

caller_phone is my variable.

Any help would be appreciated.
image.png
image.png
Voiceflow Partners banner
Voiceflow PartnersJoin
Exclusive community for Voiceflow Solutions Providers & Content Creators.
13,076Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?
Recent Announcements
jacklyn

# Let your agents search the web 🔎 Hey everyone! We just released the web search tool for the agent step! Your agents can now automatically search the web for information, letting your agent supplement the LLM's knowledge and the data in its knowledge base with live, up-to-date information. Plus.... * You can restrict searches to specific domains, so your agent only searches sites that you own * This is a tool, so you remain in control of when the agent searches the web * Results are automatically summarized in a way that your agent can automatically understand Under the hood, we're using OpenAI's web search API. Give it a try, and let us know what you think! https://docs.voiceflow.com/changelog/native-web-search-tool

jacklyn · 4mo ago

jacklyn

jacklynbiggin's Thread

jacklyn · 4mo ago

hurt-tomato

connor_maclean's Thread

hurt-tomato · 4mo ago

Similar Threads

Vonage Phone Number not working
Hi HumanHHi Human / ❓┃ask-a-question
4mo ago
phone number
primary-violetPprimary-violet / ❓┃ask-a-question
2y ago
valid phone number
DrBannyDDrBanny / ❓┃ask-a-question
2y ago
DTMF struggles
Samuel WarrieSSamuel Warrie / ❓┃ask-a-question
4mo ago