twilio从php中的会议SID名称获取会议参与者信息

时间:2015-12-18 16:16:15

标签: php api twilio phone-call twilio-php

我正在创建一个使用twilio会议的应用程序,我可以使用以下代码获取会议SID

$client = new Services_Twilio('AC123', '123');
foreach ($client->account->conferences->getIterator(0, 50, array(
   'FriendlyName' => 'yourConf'
)) as $conf) {
    print $conf->sid;
}

现在我希望所有人都参与SID,以便我能够继续前进

1 个答案:

答案 0 :(得分:0)

Twilio开发者福音传教士再次来到这里:)

一旦你有了会议SID,就可以得到这样的参与者:

$client = new Services_Twilio('AC123', '123');
foreach ($client->account->conferences->getIterator(0, 50, array(
   'FriendlyName' => 'yourConf'
)) as $conf) {
    print $conf->sid;
    $participants = $client->account->conferences->get(sid)->participants
    foreach ($participants as $participant) {
        // Do something with the participant
    }
}

您可以看到the documentation and examples for this method in the Twilio docs