twilio-13225Twiliohigh

Dial: Attempt to Call Restricted Number

Attempt to dial a number on the account's blocked or restricted list.

What this error means

Error 13225 occurs when your TwiML <Dial> verb or outbound call API request attempts to connect to a phone number that Twilio has identified as restricted on your account. Twilio maintains both global fraud-protection blocklists and account-level number restriction lists. The restriction can be applied at the account level (numbers you've added to a blocklist), at the regulatory level (numbers restricted in certain geographic regions), or due to Twilio's automated fraud detection. When this error fires, the call is not connected, which may result in a silent failure or error callback depending on your TwiML configuration.

Root causes

high

Destination number was manually added to the account's number blocklist in the Twilio Console

Common

high

Twilio's fraud detection flagged the number as a known high-risk or scam number

Common

high

Attempting to dial a premium-rate or short-code number that requires additional permissions on the account

Occasional

high

Geographic permissions for the destination country or region not enabled on the account

Occasional

medium

Number falls into a category (e.g., 900 numbers, international premium) blocked by account-level settings

Occasional

medium

Account is in trial mode and destination number is not a verified Twilio-registered number

Rare

How to fix it

  1. 1

    Check the destination number against your account blocklist

    Log into the Twilio Console and navigate to Voice > Settings > Call Restrictions. Review both your outgoing caller ID restrictions and any manually added number blocklists. Check whether the specific destination number or its number range appears on any restriction list.

  2. 2

    Verify geographic permissions for the destination country

    Navigate to Voice > Settings > Geographic Permissions in the Twilio Console. Ensure that outbound calling to the destination country and number type (mobile, landline, toll-free) is enabled. Geographic permissions default to US and Canada only for new accounts.

  3. 3

    Remove the number from your blocklist if it was incorrectly added

    If the number was added to your blocklist by mistake, remove it via the Twilio Console (Voice > Settings > Call Restrictions) or the REST API. Verify the change takes effect by attempting a test call to the number afterward.

  4. 4

    Check account trial mode restrictions

    If your Twilio account is still in trial mode, you can only call verified phone numbers. Upgrade to a paid account or add the destination number as a verified caller ID in the Console under Phone Numbers > Verified Caller IDs.

  5. 5

    Query the Twilio REST API to inspect call capabilities before dialing

    Use the Twilio Lookup API to check a phone number's metadata and routing information before attempting to dial. This can reveal whether a number belongs to a restricted category.

    const twilio = require('twilio');
    const client = twilio(process.env.TWILIO_ACCOUNT_SID, process.env.TWILIO_AUTH_TOKEN);
    
    async function checkNumberBeforeDial(phoneNumber) {
      try {
        const lookup = await client.lookups.v2
          .phoneNumbers(phoneNumber)
          .fetch({ fields: 'line_type_intelligence' });
        
        console.log('Line type:', lookup.lineTypeIntelligence?.type);
        console.log('Country code:', lookup.countryCode);
        return lookup;
      } catch (err) {
        console.error('Lookup failed:', err.message);
        throw err;
      }
    }
  6. 6

    Handle 13225 in your statusCallback webhook

    Configure a statusCallback URL on your <Dial> verb or outbound call and handle the 13225 error code gracefully. Log the blocked call attempt and notify relevant stakeholders rather than silently failing.

    app.post('/call-status', (req, res) => {
      const { CallStatus, ErrorCode, To } = req.body;
      
      if (ErrorCode === '13225') {
        console.warn(`Call to ${To} blocked — number is restricted (13225)`);
        // Alert ops team or update CRM record
        notifyOpsTeam({ event: 'call_blocked', number: To, error: ErrorCode });
      }
      
      res.sendStatus(200);
    });
  7. 7

    Contact Twilio Support for fraud-flagged numbers

    If Twilio's fraud detection flagged a number that you believe is legitimate, open a support ticket with Twilio. Provide the number in E.164 format, your use case, and any business justification. Twilio can review and whitelist numbers on a case-by-case basis.

Prevention

Prevent 13225 errors by implementing a pre-dial validation layer that checks destination numbers against your own internal blocklist and uses the Twilio Lookup API to validate number type and country before initiating calls. Keep geographic permissions tightly scoped to only the regions where your application legitimately operates. Monitor for 13225 errors in your statusCallback webhooks and alert on unusual patterns that may indicate misconfigured call routing logic or unexpected number sources. For trial accounts, maintain a verified number list and ensure all test destination numbers are pre-verified before testing call flows.

Debugging this right now?

Sherlock diagnoses twilio-13225 automatically. Just ask in Slack and get an instant root-cause analysis.

Add to Slack — Free