Last digits of Phone numbers are read as dates
# support
p
I am trying to get the caller's number using customer.number variable. After getting the number I ask the assistant to repeat it but it says the last two digits as a date, for e.g. a number ending with 22 is converted to 2nd February. It is a German phone number starting with +49 Reasoning model: Azure Open AI GPT 4o mini Voice: Azure tts model For security reasons I need to use models hosted in azure in EU. When saving the phone number it is saved correctly but there is this issue only when the assistant speaks the number. How do I make sure that I get the phone number only as a number but not as a date?
c
Hello, Here's how you can handle phone number formatting in your prompt:
Copy code
[Response Guidelines]When speaking phone numbers:- Break the number into smaller groups- Speak each digit individually- For German numbers (+49), format as "plus four nine" followed by individual digits- Never interpret numbers as dates- Use "zero" instead of "oh" for clarityExample format:"+49 123 456 789" should be spoken as "plus four nine, one two three, four five six, seven eight nine"
You can add this to your system prompt's Response Guidelines section to ensure proper number handling [1](https://docs.vapi.ai/prompting-guide). For numbers ending in digits that could be interpreted as dates (like 22), make sure to clearly specify in your prompt that all digits should be spoken individually and never grouped or interpreted as dates.
a
@Vapi have the very same issue - if the user says e.g. (German) fourteen twenty five for the last digits in phone no the assistant makes it 2nd of may - Prompting will only slightly help - I have tried 100 of variants - Vapi AI Bot says: Let me search the documentation for specifics about phone number and date formatting. Looking at the documentation, there might be a conflict in the formatting steps. According to the formatting plan table, both phone number formatting and date formatting are applied (steps 10-11), but there's no explicit mention of handling this specific edge case where periods in phone numbers are interpreted as dates. This appears to be an unexpected behavior that isn't addressed in the current documentation. Since the system is interpreting the period as a date separator rather than part of the phone number format, this could be a bug. I apologize, but I don't see a direct solution in the documentation for this specific issue. I would recommend: Reporting this as a bug to Vapi support since it appears to be unintended behavior As a temporary workaround, you might try using custom replacements to handle phone number formatting differently, though the specific format would need to be tested If you need immediate assistance with this issue, you should contact Vapi support directly as this seems like a behavior that needs to be addressed at the system level.
Somewhere on the transcript Vapi puts a '.' Behind the last term the user spelled even if punctuation setting is of of in deepgram - it seems to happen on the Vapi side. Then when re reading the number assistant says fifth or 2nd of may.
c
Please provide a call id so we can review the logs
a
Sorry, Kyle, I forgot the IDs in my post, mybad... Here are two out of many call IDs, one where it scrambles either license plate numbers as a date, when reading back to the user, or with phone numbers -> 1) License Plate number as date: CALL ID 0199c438-6fb4-755d-8044-46bf90ef2c8c . 2) Phonenumber as a date - Call ID : 0199c425-fc0f-7662-97cd-1694bc65c297. This happens somehow due to VAPI normalizing / formatting the LLM output I guess - it does not seem related to deepgrame Nova 3 (also happens with Nova2). I can not find any "switch" to tell VAPI normalization / formatting to not set "." behind numbers anywhere. The following prompt apparently enables it to repeat the number correctly sometimes, but it is not always woriking and if so only on FIRST Re-read attempt..once client corrects the reread number / information again the Assistant falls back to reading dates at the end of the number sequence like 100% of the time, be it a phone number or a license plate number.
Prompt excerpt (same syntax with phone numbers) -> ----------------------------------------------------------------- Ask: “Please tell me your license plate number slowly, character by character, and the number at the end as individual digits, please?” - Analyze the user input, remove all punctuation marks such as “.” from the string, and format it into “XXX-XX-1 2 3 4”. Map the result to {{license_plate}} → then read {{license_plate}} slowly, character by character and digit by digit. Repeat the digits exactly as if they were in “[number]”. Any help on this WOULD BE GREATLY APPRECITATED! I asked Arvind yesterday and he mentioned the pronounciation options but those are only for Eleven Labs and not for Azure, which is what we use. A "switch" in Vapi to stop formatting numbers automatically with a "." at the end would be the best solution, I guess?
@Vapi any answer on this available ?
c
We apologize for the delay in responses lately. We are in process of making some changes to our workflow in how we handle support requests. The good news is that we are starting to get back on track of having a 48 hour response time and we would like to start cleaning up anything old. With that being said, just wanted to check in with you to see if you have made any progress or changes to your project since support has last reached out.