Robert Sinclair
Robert Sinclair

Reputation: 5406

The source phone number provided is not yet verified for your account

Getting an error that phone number is not verified when I add a callerId.

When placing a call it returns:

Fatal error: Uncaught Twilio\Exceptions\RestException: [HTTP 400] Unable to create record: The source phone number provided, XXXX, is not yet verified for your account.

The strange part is that it only gives this error when callerId value is set.

So for example

$call = $client->calls
    ->create(
        "+x", // to
        "+x", // from
        [
            "url" => "http://demo.twilio.com/docs/voice.xml",
        ]
    );

Does work

but the following produces that error.

$call = $client->calls
    ->create(
        "+x", // to
        "+x", // from
        [
            "url" => "http://demo.twilio.com/docs/voice.xml",
            "callerId" => 'SomeValue',
        ]
    );

The only difference is that callerId gets set.

From number was purchased, account is not trial and SID is valid since it works without callerId field

Upvotes: 0

Views: 1217

Answers (1)

Robert Sinclair
Robert Sinclair

Reputation: 5406

Error is returned because it looks like Twilio is trying to use the value of callerId as the phone number. So it looks like you can't set a caller ID in the form of a word, it has to be a numeric value

I'm sorry the docs are not clear about this, but CallerId works the same a From. It must be Twilio phone number or verified non-Twilio phone number in your account. It cannot be a word or name. Twilio phone numbers do not support CNAM (caller name) database entries, so it is not possible to specify a name that the call recipient sees, if their carrier does CNAM lookups.

When you specify From, you do not need to pass CallerId.

Upvotes: 1

Related Questions