首页 > 解决方案 > 如何在 twilio 上为会议参与者拨打分机号

问题描述

我有一个在电话会议中添加参与者的场景。我正在这样做

conference_name = "demo"
  account_sid = "xyz"
  auth_token = "xyz"

  client = Twilio::REST::Client.new(account_sid, auth_token)

  company_number_participent1 = client.conferences(conference_name).participants.create(from: 'xyz', to: "xyz")
  customer_number_participent2 = client.conferences(conference_name).participants.create(from: 'xyz', to: 'xyz')

它工作正常。现在我想添加一个分机,一旦参与者添加到呼叫中。根据正常调用的 twilio 文档,我们可以,send_digits: '12#为扩展添加一个参数。当我喜欢它时,它会给出一个错误。

company_number_participent = client.conferences(conference_name).participants.create(from: 'xyz', to: "xyz",send_digits: '1')

如何在 twilio 中拨打会议参与者的分机号?

标签: ruby-on-railsrubytwiliotwilio-api

解决方案


我没有看到 sendDigits 作为创建参与者请求的参数。而是使用呼叫资源发出呼叫,并使用 TwiML处理发送数字并将参与者添加到会议中。


推荐阅读