Twilio - 如何拨打第三方号码并加他到会议? [英] Twilio - How to dial third party number and add him to conference?

查看:244
本文介绍了Twilio - 如何拨打第三方号码并加他到会议?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用Twilio会议面临的一个小问题。

I am facing a small problem while using Twilio conference.

我的API获取来电,并把主叫方新的空会议室:

My API gets incoming call and puts caller to new and empty conference room:

<Response>
    <Dial>
        <Conference waitUrl="http://twimlets.com/holdmusic?Bucket=com.twilio.music.ambient">Conf 1</Conference>
    </Dial>
</Response>

所以我就等着来电者在一个空的会议室和听音乐。结果
我要拨打一些其他号码,并把它添加到该confrence室。结果
这个数字是不twilio。结果
我怎样才能做到这一点?

So I got caller waiting in an empty conference room and listening music.
I want to dial some other number and to add it to this confrence room.
That number is non-twilio.
How can I do this?

推荐答案

您可以使用Twilio REST API进行出站呼叫,并指示电话到您的会议室。在PHP中,这可以这样做:

You could use the Twilio REST API to make an outbound call, and direct that call into your conference room. In PHP this can be done like this:

(这是从 twilio-PHP帮助库

require('/path/to/twilio-php/Services/Twilio.php');

$client = new Services_Twilio($sid, $token);
$call = $client->account->calls->create(
  'some-twilio-number', // From a valid Twilio number
  'other-number-to-call', // Number to call
  'http://example.com/some_twiml'
);

您使用这里应该成为TwiML这使主叫方在同一个房间,你原来的通话(完全是你有你的问题)的URL。实际上,一个人叫你,你叫其他人,并把它们放到同一个房间。

The URL you use here should serve TwiML that puts the caller into the same room as your original call (exactly as you have in your question). In effect, one person called you, then you called the other person and put them into the same room.

(在充分披露的利益,我工作了Twilio。)

(In the interests of full disclosure, I worked for Twilio.)

这篇关于Twilio - 如何拨打第三方号码并加他到会议?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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