Example Usage:
use Mocean\Voice\Mc;
use Mocean\Voice\McBuilder;
$mcBuilder = mcBuilder::create()
->add(Mc::record())
->add(Mc::say('for english please press 1')) // tts
->add(Mc::collect('http://test.com/collect'))
->add(Mc::sleep(2000))
->add(Mc::dial('60123456789'))
->add(Mc::play('http://test.com/play'));
$mocean->voice()->call([
'mocean-to' => '60123456789',
'mocean-command' => $mcBuilder
]);
Hangup Example:
$mocean->voice()->hangup('xxx-xxx-xxx-xxx'); //call-uuid
Recording Exaple:
$recording = $mocean->voice()->recording('xxx-xxx-xxx-xxx'); //call-uuid
//save the file
file_put_contents($recording->getFilename(), $recording->getRecordingBuffer());