I want to make a call from a web application(PHP/Laravel) to any mobile number from (purchased Nexmo Number). It's like a two-way communications call.
The scenario assumes in the web application(PHP/Laravel) page display the call driver options placed the call icon. Once customers click the call icon then call to driver number from (purchased Nexmo Number).
I have used this API to create a call.
$ncco = [
[
'action' => 'talk',
'voiceName' => 'Joey',
'text' => 'This is a text-to-speech test message.'
]
];
$call = new \Nexmo\Call\Call();
$call->setTo('XXXXXXXXXXXX')
->setFrom('XXXXXXXXXXXX')
->setNcco($ncco);
$response = $client->calls()->create($call);
echo $response->getId();
The Nexmo Voice API here one-way communication only working fine for me. For example, text to speech call works for me, the above voice API code run the call automatically reached to destination number from (purchased Nexmo Number).
Is anybody has done this scenario? when you click on the phone icon it will call customers + you can talk with customer using a web portal?