0

i am having a case where when client submit a form i want my system to call multiple agent if one agent pick call all the calls should be drop the code i am current using call is dropping all calls after execution of twiml

   $data = $req->input();
        $action = $appUrl.'/wcc/gather-input?callId='.$data["callId"].'&visitorName='.$data["visitorName"].'&visitorMessage='.$data["visitorMessage"].'&visitorPhone='.$data["visitorPhone"];
        $dial = $response->dial('', ['callerId' => '+123123123', 'timeout' => 30, 'action' => $action,"method"=>"GET"]);
        $dial->number('+123123213');
        $dial->number('+12313123123');
        header('Content-Type: text/xml');
        echo $response;
  • Is the client already in a conference that you plan to add the agent to? How are you connecting the client to the agent? Do you place an outbound call to the client once the agent picks up? – Alan Apr 09 '21 at 21:50
  • No client will be called when agent press one after connecting – dg.shahneel ahmed Apr 12 '21 at 08:21

1 Answers1

1

You won't be able to use SimRing (Dial Verb with Multiple Nested Number nouns) with that approach, as the first person to pick up the call results in all the other call legs being cancelled.

You will need to use the /Calls resource to initiate the calls, and return TwiML that asked the dialed party to press any digit to be connected to the customer. You would then cancel (status=canceled) the other call legs. As you can see SimRing is not the best approach as it tends to tire out the dialed parties with incessant ringing and the voicemail issues you need to guard against as well as the default Calls Per Second (CPS) is 1 per second, so there will be a delay between each outbound call, unless you have Twilio Sales increase the outbound CPS.

Once the agent presses a key, you can initiate a Dial Number to the customer. If you need to modify the call once it is established, you should connect the agent to a conference and the customer to the same conference, you anchors the call legs and allows easier manipulation of the call.

Alan
  • 10,465
  • 2
  • 8
  • 9