查看https://github.com/twilio/twilio-ruby/blob/master/lib/twilio-ruby/rest/calls.rb,似乎只使用了“from”、“to”和“url” . 如何传递“IfMachine”的值?例如,以下似乎不起作用。
# set ACCOUNT_SID and AUTH_TOKEN
twilioClient = Twilio::REST::Client.new(ACCOUNT_SID, AUTH_TOKEN)
twilioAccount = twilioClient.account
twilioAccount.calls.create({
:from => 'from_number',
:to => 'to_number',
:url => '/url',
'IfMachine' => 'Hangup'
})
# IfMachine parameter is not passed in the above request