Call client to client

38 Views Asked by At

// makecall.php////

 $client = new Client($accountSid, $authToken);
 $call = $client->calls ->create("client:[email protected]","client:clientid",  
            [       
                'url' => 'xxxxxxxxx/POrtal/ClientsPortal/incoming.php',  
            ]
        );
 header('Content-Type: text/xml');
 print($call->sid);

//incomming.php

<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\VoiceResponse;

$response = new VoiceResponse();
$response->say('Hello!');

echo $response;

I have fixed makecall.php in Voice Configuration myTwimlapp->Request URL and on connect function of @twilio/voice-react-native-sdk calling the makecall.php. I want to call from client to client using twilio @twilio/voice-react-native-sdk in react native . Call is initiated but disconnecting automatically on client:clientid and Call goes to 'client:[email protected]' but it listen recorded 'hello'. But i want client:[email protected] and client:clientid talk each other.I am unable to understand from https://www.twilio.com/docs/voice/twiml. How to handle live call between two clients.I am beginner in twillio please help.

I want to live call between two twilio clients. I am unable to understand from twilio docs how to handle the response.

0

There are 0 best solutions below