Error while creating Phone Number
# support
s
Hi, I am creating a phone number: 340747_DQPP3 This is required by my SIP provider to sent this in contact header. But i keep getting the error: number must match regular expression. Is there a workaround for this? https://cdn.discordapp.com/attachments/1480643971209367573/1480643971704164474/PXL_20260309_1907251552.jpg?ex=69b06ca7&is=69af1b27&hm=9bd23928c34f1d8e28cfdb934e811cde117fdb74dcbac5b8f8df85e39a12d557&
v
The phone number field only accepts alphanumeric characters and an optional leading plus sign—underscores are not allowed. To resolve the error, update your request to use a value like
340747DQPP3
(without the underscore):
Copy code
json
{
  "number": "340747DQPP3",
  "credential_id": "YOUR_CREDENTIAL_ID"
}
If your SIP provider requires the underscore, you may need to handle this mapping outside of the Vapi API, as the API does not support underscores in the phone number field according to the documentation I have found. Source: - [API Reference for Create Phone Number](https://docs.vapi.ai/api-reference/phone-numbers/create?explorer=true)
c
Currently, there is no workaround for this field. You will need to handle the routing outside of VAPI like in the example posted above.