我正在使用ruby和rails打电话给号码A,然后使用TwiML拨打号码B.我在twilio日志中看到它正在拨打电话号码A而且我收取费用,但我从未收到任何电话。我曾尝试调用不同的数字,但从未在数字A处获得任何内容。尽管TwiML已被执行,但数字B始终被调用。我做错了什么,以致号码A永远不会被召唤?
client = Twilio::REST::Client.new account_sid, auth_token
id = 5
call = client.account.calls.create({:from =>FROM , :to => phone, :url => "http://URL/connector?id=#{id}"})
rails控制器中的TwiML:
def connector
id = params[:id] # call request id
@call_request = CallRequest.find(id)
phone = @call_request.to
response = Twilio::TwiML::Response.new do |r|
r.Say "Connecting you"
r.Dial phone
r.Record :action => "http://URL/call_record?cr=#{id}", :method => 'get'
end
render text: response.text
end
我有一个问题,是否需要将一个号码的语音请求网址设置为与我在呼叫请求中设置的网址相匹配?这是我设置的内容:http://sharebucketapp.com/DgzNzkwMGRiODI4NTY5N