将拨出 API 呼叫标记为子呼叫
Mark Outgoing API Calls as Child Calls
如何从触发它们的来电中将去电 API 标记为子 。 (假设$request->Input('CallSid')
是来电的CallSid
)
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;
// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "AC6ad3d3d3f5ed08ebf2b662cae36b4d32";
$token = "your_auth_token";
$client = new Client($sid, $token);
$call = $client->calls->create(
"+14155551212", "+14158675310",
array("url" => "http://demo.twilio.com/docs/voice.xml")
);
echo $call->sid;
此处为 Twilio 开发人员布道师。
无法通过 API 设置调用的 ParentCallSid
属性。 ParentCallSid
在 TwiML 中生成调用时设置,通常与 <Dial>
一起作为另一个调用的一部分。
当您从 REST 创建调用时 API 该调用没有父级。
如何从触发它们的来电中将去电 API 标记为子 。 (假设$request->Input('CallSid')
是来电的CallSid
)
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;
// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "AC6ad3d3d3f5ed08ebf2b662cae36b4d32";
$token = "your_auth_token";
$client = new Client($sid, $token);
$call = $client->calls->create(
"+14155551212", "+14158675310",
array("url" => "http://demo.twilio.com/docs/voice.xml")
);
echo $call->sid;
此处为 Twilio 开发人员布道师。
无法通过 API 设置调用的 ParentCallSid
属性。 ParentCallSid
在 TwiML 中生成调用时设置,通常与 <Dial>
一起作为另一个调用的一部分。
当您从 REST 创建调用时 API 该调用没有父级。