Managing calls with multiple agents Twilio

I’m working in a project with Twilio to make and recieve calls. So, imagine you want to do a call, and in the other side we have 3 agents to take the call, with three twilio numbers. I want to show the inbound call only to one of the agents (randomly).

I’m not sure if to achieve this behaviour I should generate a different response with a different or a different of one of the agents.

For example:

response = Twilio::TwiML::Response.new do |r|
  # Should be your Twilio Number or a verified Caller ID
  r.Dial :callerId => caller_id do |d|
      d.Client <custom_client_name>
  end

or

response = Twilio::TwiML::Response.new do |r|
  # Should be your Twilio Number or a verified Caller ID
  r.Dial :callerId => caller_id do |d|
      d.Number <custom_client_number>
  end

Thank you guys!


Source: ruby

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.