0
我使用PHP来获取我twilio日志的详细信息。如何在twilio PHP中获取acount持有者名称?
代码:
foreach ($client->account->calls as $call)
{
$sid = $call->sid;
$call_sid = $call->parent_call_sid;
$tocaller = $call->to;
$fromcaller = $call->from;
$caller_name = $call->caller_name;
$direction = $call->direction;
$account_sid = $call->account_sid;
$nosid = $call->phone_number_sid;
$status = $call->status;
$duration = $call->duration;
$date_created = $call->date_created;
$price = $call->price;
}
但$call->from
我得到一个电话号码,基本上我想为来电者,因为它是在从列twilio日志详细信息页面给名字的用户名
你为什么要给'$ something'分配'$ call-> something'?如果你在'foreach()'中使用它似乎有点毫无意义?只需直接引用$ call-> something ...或者我错过了一些东西。 – Jakub
基本上我插入所有通话记录到我的数据库中,并且在我的通话记录中有大约100个条目 – Omega