1

I am trying to have all my incoming calls automatically go to conference. This part can be achieved using:

<Response>
  <Dial>
    <Conference>Room <?php echo($_REQUEST['From']);?></Conference>
  </Dial>
</Response>

This way, each caller goes into their own separate conference room. The part I can't figure out how to do is the outbound call from that point. I need to make a SIP call to my PBX using the customer's caller id so an agent can answer it. When they answer, they should be sent to the same conference room.

I found this for making outbound calls into a conference. However, I want the outbound call to the agent to use the caller id of the customer. This way, the agent can see the customer's phone number.

The main reason I want to use a conference and not a direct dial is because I want to make it possible for supervisors to call into an active call without interrupting the call between the agent and customer.

Community
  • 1
  • 1
Ali Hamze
  • 1,590
  • 13
  • 26

1 Answers1

0

Twilio evangelist here.

I believe that when making SIP calls, the From parameter will take any alphanumeric string so you can just provide the customers caller ID as the From value:

$call = $client->account->calls->create($_REQUEST['From'], "sip:agent@example.com", "http://www.example.com/conference.xml", array());
echo $call->sid;

Hope that helps.

Devin Rader
  • 10,260
  • 1
  • 20
  • 32