Skip to contentSkip to navigationSkip to topbar
Page toolsOn this page
Looking for more inspiration?Visit the

13226: Dial: Invalid country code


WARNING: 13226

warning-13226 page anchor
WARNING

You receive this warning when the phone number passed to <Dial> uses a country code that Twilio cannot identify. Destination numbers in <Dial><Number> should be valid phone numbers in E.164 format with a + and country code.

Possible causes

possible-causes page anchor
  • Format the destination number in E.164 before you return <Dial> TwiML. Include +, a valid country code, the area code or national destination code, and the subscriber number. Keep the total length to 15 digits or fewer.
  • If you are converting a local number to E.164, remove any national trunk prefix such as a leading 0 before adding the country code when required for that country. (help.twilio.com(link takes you to an external page))
  • Validate and normalize phone numbers with Twilio Lookup before you place the call or generate <Dial><Number>. Lookup can validate formatting and return invalid country code errors during validation.
  • If you are not dialing a PSTN phone number, use the correct <Dial> noun. Use <Client> for a Voice SDK identity or <Sip> for a SIP endpoint instead of <Number>.

Additional resources

additional-resources page anchor