Problem: I'm unable to determine which of my Rails app's users are making which browser-to-browser calls using Twilio.
I am able to make browser to browser calls with Twilio and I am able to store the @call object in the Calls table like this:
def start_conference
@call = Call.create_from_twilio_params(params)
@call.user_id = current_user.id #current_user doesn't work in this Twilio request even when the user is signed into the Rails app
@call.save
end
Here are the parameters that Twilo app returns in the log when it processes a user's call: TwilioController#start_conference as HTML Parameters: {"AccountSid"=>"AC123", "ApplicationSid"=>"AP234", "Caller"=>"client:test", "CallStatus"=>"ringing", "Called"=>"", "To"=>"", "CallSid"=>"CAxyz", "From"=>"client:test", "Direction"=>"inbound", "ApiVersion"=>"2010-04-01"}
Is it possible to add my own parameters such as user_id? Or maybe there is another way for me to connect the call to the user?
From this StackOverflow question, it seems possible to attach parameters to the callback URL, but where is the Twilio documentation about specifying a custom callback URL?
Thank you!