在 twilio call REST API creating calls 中显示不同的号码

Show different number in twilio call REST API creating calls

假设我正在使用 REST 创建一个新调用 API 并设置如下参数:

$client->account->calls->create("+15017250604", "+14155551212", $urlCallback);

当 phone 响铃时,我不想将 +15017250604 显示为来电者,但我想显示一个不同的号码。我该怎么做?

查看 FAQ 以添加经过验证的去电呼叫者 ID。

要使用 REST API,POST 您的 phone 号码到 Outgoing Caller IDs list resource

以下是在 PHP 中添加新的拨出呼叫者 ID 的示例:

<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Services_Twilio($sid, $token);

$caller_id = $client->account->outgoing_caller_ids->create("+14158675309", array(
        "FriendlyName" => "My Home Phone Number"
    ));
echo $caller_id->validation_code;