将多个人添加到呼叫者Twilio的电话会议中 [英] Adding multiple people to a conference call from caller Twilio

查看:115
本文介绍了将多个人添加到呼叫者Twilio的电话会议中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我阅读了许多有关Twilio电话会议的文章.我创建了一个php函数,该函数创建了一个Twilio会议,可以使用有关使用Twilio同时拨打多个号码的文章.

I read lots of articles about Twilio conference call. I created a php function which creates a Twilio conference which can add any one who have access to that link to the Conference with this link. so then I read this article about Dialing Multiple Numbers Simultaneously with Twilio.

本文介绍了如何同时拨打多个客户或号码,但第一个接听电话的人将接通而其他人则挂断电话.

This article shows how to dial multiple clients or numbers in the same time but the first one who accept the call will connect while the others will be hung up on.

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Dial>
    <Number>877-555-1212</Number>
    <Number>877-999-1234</Number>
    <Number>877-123-4567</Number>
  </Dial>
</Response>

所以现在我的问题是,我可以通过twilio php函数将它们全部添加到电话会议中吗?

So now my question is that can I add all of them to a conference call troughs a twilio php function?

我还检查了

I also checked this question on stack overflow but the different is that I am using TwiML and then I thought maybe there is a function to add all clients to same room whe he/she calls a list of them.

 $dial->conference('My conference', array(
            'startConferenceOnEnter' => True,
            'endConferenceOnExit' => True
            ));

推荐答案

我在twilio中打开了一张票,其开发人员之一说您可以通过REST api进行呼叫,并将所有客户端或电话号码添加到同一会议中 但就我而言,我的Android应用程序指向的是twilML,因此我决定将呼叫者本身添加到电话会议中,然后将我的REST呼叫添加到该电话会议中.

I opened a ticket in twilio, one of its developer said make your call trough REST api and add all of clients or numbers to to same conference but in my case My android app is pointing to a twilML so I decided to Add the caller itself to a conference call and then make my REST call to that conference call.

所以现在它适用于我的情况.

so now it worked for my case.

这是我的密码

......
//some php codes to configure the Twilio and get the from and to caller ids 


//this part belongs to my caller. I added this php file url to my TwiML app
//so when my user hit the dial button it will sent the caller to this conference room and waits for others.
$response = new Twiml;
$dial = $response->dial();
$dial->conference('Room 123', array(
                'startConferenceOnEnter' => True,
                'endConferenceOnExit' => True
                ));
print $response;


//this is the part that make a call other participants and will  add them to the same conference room that caller is.
$call = $client->calls->create(
    "yourClient", "youtwiliophonenumber",
    array("url" => "http://domain/conference.xml")
);

然后我将此XML文件添加到REST调用api的URL中 这是我的XML文件

And then I added this xml file to the url of REST call api here is my XML file

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Dial>
    <Conference startConferenceOnEnter="true" endConferenceOnExit="true">Room 123</Conference>
  </Dial>
</Response>

这篇关于将多个人添加到呼叫者Twilio的电话会议中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆