twiliotwilio-apitwilio-programmable-voicetwilio-conference

Twilio Conference - Hear the ringing when Calling to a Number


I am developing a conference application using Twilio. My outbound call scenario is like this. The agent calls a customer and once the customer answers the call he will join a conference that the agent was waiting for.

What I did was,

  1. The outbound call request comes to the server from the web.
  2. Create the conference and put the agent to it while waiting for the customer to join.
  3. Server makes the call to the customer with Twilio Call creator with the action URL to join the agent's conference.

The issue I am facing is agent won't hear the ringing of the customer's telephone. Because the agent is already at the conference and in the meantime Twilio Call creator is making the call to the customer as follows.

Call call = Call.creator(new PhoneNumber(toNumber), 
                new PhoneNumber(fromNumber),
                URI.create("conference/join/url")
                .setTimeout(60)
                .create();

So is there a way to do what I need? The agent will dial the customer and the agent will hear the ringing of the customer's telephone, once the customer answers the call then both join a conference. Is this possible?


Solution

  • Use the conference participants API to add them to the conference so the conference participant(s) can hear call progress tones.

    https://www.twilio.com/docs/voice/api/conference-participant-resource

    ā€”> create a participant (earlyMedia)