1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-16 03:42:41 +01:00
phorge-phorge/externals/twilio-php/docs/usage/rest/conferences.rst
Bob Trahan e96c363eef Add SMS support
Summary:
Provides a working SMS implementation with support for Twilio.

This version doesn't really retry if we get any gruff at all. Future versions should retry.

Test Plan: used bin/sms to send messages and look at them.

Reviewers: chad, epriestley

Reviewed By: epriestley

Subscribers: aurelijus, epriestley, Korvin

Maniphest Tasks: T920

Differential Revision: https://secure.phabricator.com/D8930
2014-05-09 12:47:21 -07:00

48 lines
1.3 KiB
ReStructuredText
Executable file

=============
Conferences
=============
List All Conferences
====================
.. code-block:: php
$client = new Services_Twilio('AC123', '123');
foreach ($client->account->conferences as $conference) {
print $conference->friendly_name;
}
For a full list of properties available on a conference, as well as a full list
of ways to filter a conference, please see the `Conference API Documentation
<http://www.twilio.com/docs/api/rest/conference>`_ on our website.
Filter Conferences by Status
============================
.. code-block:: php
$client = new Services_Twilio('AC123', '123');
foreach ($client->account->conferences->getIterator(0, 50, array(
'Status' => 'in-progress'
)) as $conf) {
print $conf->sid;
}
Mute all participants
=====================
At the moment, using an iterator directly will cause this method to infinitely
loop. Instead, use the getPage function. As conferences are limited to 40
participants, getPage(0, 50) should return a list of every participant in
a conference.
.. code-block:: php
$sid = "CO119231312";
$client = new Services_Twilio('AC123', '123');
$conference = $client->account->conferences->get($sid);
$page = $conference->participants->getPage(0, 50);
$participants = $page->participants;
foreach ($participants as $p) {
$p->mute();
}