【问题标题】:Twilio Rails transfer call with user's number?Twilio Rails 用用户号码转移呼叫?
【发布时间】:2015-09-28 19:01:05
【问题描述】:

我正在配置一个应用程序以自动呼叫用户。打电话给他们后,系统会提示他们按 1 与代理交谈。一旦他们按 1,呼叫就会被路由到我们的呼叫中心。这一切都很好。问题是呼叫中心正在接收来自 Twilio 号码而不是用户电话号码的呼叫,这使得他们很难跟踪他们正在与谁通话。

有谁知道您是否可以使用最初拨打的用户号码而不是您的 Twilio 号码转接 Twilio 呼叫?

这是我在 Rails 控制器上的操作,在用户按 1 将他们连接到呼叫中心后触发:

  def connect
    number = params[:call_center_number]
    response = "
    <Response>
      <Say>Please hold while we try to connect you to the next available representative.</Say>
      <Dial>
        <Number
          statusCallbackEvent='initiated ringing answered completed'
          statusCallback='http://example.com/events'
          statusCallbackMethod='POST'>+1#{number}
        </Number>
      </Dial>
    </Response>"
    render text: response
  end

【问题讨论】:

    标签: ruby-on-rails twilio


    【解决方案1】:

    根据文档,可以使用callerId属性(https://www.twilio.com/docs/api/twiml/dial#attributes-caller-id

    <Response>
      <Say>Please hold while we try to connect you to the next available representative.</Say>
      <Dial callerId=#{NUMBER_TO_DISPLAY_ON_CALLERID}>
        <Number>+1#{number}</Number>
      </Dial>
    </Response>
    

    【讨论】:

    • @TomHammond 最近我碰巧花了很多时间在 Twilio 上。很高兴我能帮上忙。
    猜你喜欢
    • 1970-01-01
    • 2012-01-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多