Twilio 浏览器的双向语音在导航电话树后将被叫者连接到活动视频室
我有一个过程中的房间,我希望浏览器上的一个用户对第三方进行双向呼叫。用户必须浏览第三方的电话树,一旦他们到达现场人员,将通话转移到房间中。我目前遇到问题,因为我似乎无法将Callee连接到视频室。我只能连接在视频室中创建重复参与者的呼叫者。是否可以使用Twilio进行此类功能?
我尝试了几种不同的TWIML组合,但所有这些都会随着电话挂断而最终。或转移到房间的错误政党
返回到这项工作的最初响应
var response = new VoiceResponse();
var dial = new Dial
{
CallerId = _settings.FromNumber,
};
var number = new Number
{
PhoneNumber = model.PhoneNumber,
StatusCallbackEvent = new []{Number
.EventEnum.Initiated, Number.EventEnum.Ringing,Number.EventEnum
.Answered, Number.EventEnum.Completed}.ToList(),
StatusCallback = new Uri($"VoiceCallStatusCallBack"),
StatusCallbackMethod = HttpMethod.Post
};
dial.Append(number);
response.Append(dial);
是根据预期 ;但是,如果我在上述时间添加连接动词,它只会将呼叫者连接到视频室并断开呼叫者的连接。我设置了一个动作URL或将其作为下一个动词。
我还尝试通过REST API将聚会添加到房间。这只是断开两个呼叫的连接。 我试图从这里重定向并直接添加到房间,都没有工作
public async Task<string> AddThirdPartyToVideoRoom(VoiceCallTransfer model)
{
TwilioClient.Init(_settings.ApiKey, _settings.ApiSecret,
_settings.AccountSid)
var response = new VoiceResponse();
var redirect = new Redirect();
redirect.Url = new
Uri($"RedirectCallIntoRoomroomName={model.RoomName})");
redirect.Method = HttpMethod.Post;
response.Append(redirect);
var twiMlResult = TwiML(response);
var call = await CallResource.UpdateAsync(
twiml: twiMlResult.Data,
pathSid: model.CallSid);
return call.Sid;
}
public TwiMLResult RedirectCallIntoRoom(string roomName)
{
var response = new VoiceResponse();
var connect = new Connect();
connect.Room(roomName);
response.Append(connect);
var twiMlResult = TwiML(response);
return twiMlResult;
}
I have an in-progress room where I would like one user on the browser to make an outbound two-way call to a third party. The user must navigate the third party's phone tree and once they have reached a live person transfer the call into the room. I'm currently having an issue because I can't seem to connect the callee into the video room. I am only able to connect the caller which is creating a duplicated participant in the video room. Is it possible to do this kind of functionality with Twilio?
I have tried several different Twiml combinations but all of them end up with the call getting hung up. or the wrong party transferred into the room
This is the initial response returned to the
var response = new VoiceResponse();
var dial = new Dial
{
CallerId = _settings.FromNumber,
};
var number = new Number
{
PhoneNumber = model.PhoneNumber,
StatusCallbackEvent = new []{Number
.EventEnum.Initiated, Number.EventEnum.Ringing,Number.EventEnum
.Answered, Number.EventEnum.Completed}.ToList(),
StatusCallback = new Uri(quot;VoiceCallStatusCallBack"),
StatusCallbackMethod = HttpMethod.Post
};
dial.Append(number);
response.Append(dial);
This works as expected; however, if I Add the Connect verb in the above time it will only connect the one the caller to the video room and disconnect the caller. Where I set up an action URL or just make it the next verb.
I also tried adding the party to the room through rest API. This just disconnects both calls.
I have tried to redirect from here and just add it directly to the room, neither work
public async Task<string> AddThirdPartyToVideoRoom(VoiceCallTransfer model)
{
TwilioClient.Init(_settings.ApiKey, _settings.ApiSecret,
_settings.AccountSid)
var response = new VoiceResponse();
var redirect = new Redirect();
redirect.Url = new
Uri(quot;RedirectCallIntoRoomroomName={model.RoomName})");
redirect.Method = HttpMethod.Post;
response.Append(redirect);
var twiMlResult = TwiML(response);
var call = await CallResource.UpdateAsync(
twiml: twiMlResult.Data,
pathSid: model.CallSid);
return call.Sid;
}
public TwiMLResult RedirectCallIntoRoom(string roomName)
{
var response = new VoiceResponse();
var connect = new Connect();
connect.Room(roomName);
response.Append(connect);
var twiMlResult = TwiML(response);
return twiMlResult;
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论