Twllio : Play Sound during call

前提是你 提交于 2019-12-12 02:15:33

问题


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

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.


回答1:


Twilio developer evangelist here.

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.

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.

Hope this helps you



来源:https://stackoverflow.com/questions/35356803/twllio-play-sound-during-call

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!