Issue
When using Twilio Studio to forward calls especially in flows that accept calls from both Twilio-owned numbers and SIP numbers you may encounter the error:
Error 13214: Dial: Invalid callerId value
This article explains why this error occurs and how to resolve it, ensuring your call forwarding works reliably regardless of the incoming call source.
Symptoms
- Call forwarding in a Twilio Studio flow works when the incoming call is to a Twilio-owned number.
- When the incoming call is routed from a SIP number (not owned by Twilio), the call ends unexpectedly at the forwarding step.
- Call logs show Error 13214: Dial: Invalid callerId value.
- The
callerIdparameter in the<Dial>verb is set to a SIP URI (e.g.,sip:+XXXXXX@XXXXXX).
Note: This article is based on real-world support cases and aims to help you quickly resolve common call forwarding issues in Twilio Studio.
Cause
Twilio requires the callerId value used in the <Dial> verb (or Studio's "Connect Call To" widget) to be a valid E.164 formatted phone number when forwarding calls to the PSTN (regular phone numbers). If a SIP URI or an unverified number is used as the callerId, Twilio will reject the call with Error 13214.
This issue often arises when the Studio flow is configured to use the incoming caller's number (which may be a SIP URI) as the callerId for the outbound leg.
Resolution
To resolve this error:
-
Edit the Studio Flow:
- Open your Studio flow in the Twilio Console.
- Locate the widget responsible for forwarding the call (e.g., "Connect Call To" or "Dial" widget).
-
Set a Valid Caller ID:
- In the widget's settings, find the field for "Caller ID" (sometimes labeled as
callerId). -
Do not use a dynamic value like
{{contact.channel.address}}if it may be a SIP URI. -
Instead, enter a Twilio phone number that is owned by your account and is in E.164 format (e.g.,
+1234567890). - Alternatively, use a number that has been verified as a caller ID in your Twilio account.
- In the widget's settings, find the field for "Caller ID" (sometimes labeled as
-
Save and Publish:
- Save your changes and publish the Studio flow.
-
Test the Flow:
- Place a test call from both a Twilio-owned number and a SIP number to confirm that call forwarding now works as expected.
Additional Information
- You can find more details about Error 13214 in the Twilio Error Documentation.
- If you need to use a non-Twilio number as the caller ID, make sure it is verified in your Twilio account.
- Using a valid Twilio number as the caller ID is the most reliable approach for outbound calls to the PSTN.
Summary Table
| Scenario | Caller ID Value | Result |
|---|---|---|
| Twilio number as caller ID | +1234567890 (E.164) | Success |
| SIP URI as caller ID | sip:+32478258221@... | Error 13214 |
| Unverified number as caller ID | +1987654321 (not verified) | Error 13214 |
| Verified non-Twilio number | +1987654321 (verified) | Success |
Below you will find references to useful documents:
If you continue to experience issues after following these steps, review your call logs for additional error details or consult Twilio's documentation for further troubleshooting.