【问题标题】:twilio get conference participants information from conference SID name in phptwilio 从 php 中的会议 SID 名称获取会议参与者信息
【发布时间】:2015-12-18 16:16:14
【问题描述】:

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

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

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

【问题讨论】:

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


    【解决方案1】:

    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

    【讨论】:

    • 我已经尝试了上述方法,但我仍然只能获得最后一次参与信息。但是在我的会议中,有两个人参加,会议也正常运行
    • 您能分享您编写的只让您参与的代码吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-05-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多