Looking at https://github.com/twilio/twilio-ruby/blob/master/lib/twilio-ruby/rest/calls.rb, it appears that only 'from', 'to', and 'url' are used. How do I pass a value for 'IfMachine'? For example, the following doesn't seem to work.
# 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
I believe if you set it as a symbol instead it should work:
Setting 'IfMachine' => 'hangup' works for me. I think the Twilio API is case-sensitive with respect to parameter values. So 'hangup' would work but 'Hangup' probably won't.
Here's my twilio-ruby session showing that the parameters are passed correctly: