Twllio:在通话过程中播放声音 [英] Twllio : Play Sound during call

查看:149
本文介绍了Twllio:在通话过程中播放声音的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在通话中播放声音,因此接收方将能够收听该声音.

I want play sound during call, so receiver will able to listen that sound.

假设我在办公室,并且我想在Twilio Call期间播放交通声.是否可以在iOS中使用Twilio?

Suppose, I am in office, And I want play sound of traffic during Twilio Call. Is this possible using Twilio in iOS ?

如果选择按钮播放交通声音,则只有接收者才能收听相同的声音.如果接收方选择播放派对"的声音,则只有呼叫者可以收听该声音,而双方均不能.

If I select button to play traffic sound, then only receiver can able to listen the same. If receiver select to play sound of Party, then only caller can listen that sound, not both the parties.

如果是,实现相同目的的可能方法是什么.

If yes, What are the possible ways to implement the same.

推荐答案

此处是Twilio开发人员的福音.

Twilio developer evangelist here.

在这种情况下,您可以使用< Conference> .然后,您将把两个呼叫者都拨入会议.然后让Twilio拨入该会议的第三个电话,并让该电话< Play>将音频打入会议.

You could use <Conference> in this scenario. You would then dial both of your callers into a conference. Then have Twilio dial a third call into that conference and have that call <Play> the audio into the conference.

但是,这将在通话中的所有各方上播放(即,呼叫者和接收者都将能够听到第三方呼叫).然后,您可以使用< Gather> 动词检查应用程序中的逻辑是否已按下一个按钮,然后挂断该第三方呼叫并添加另一个.

That however will play to all the parties on the call (i.e. both caller and receiver will be able to hear the third party call). You could then add logic to your application using the <Gather> verb to check whether a button has been pressed and then drop that third party call and add another one.

我知道这并不能满足您的所有需求,因为它会在双方都发挥作用,但与您要尝试的工作非常接近.

I know this doesn't do everything you want as it will play on both sides, but is very close to what you're trying to do.

希望这对您有帮助

这篇关于Twllio:在通话过程中播放声音的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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