Skip to content

Releases: MoceanAPI/mocean-sdk-php

v2.2.0

06 Oct 01:36
e454222

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 2.1.1...2.2.0

Add Voice Feature

14 Nov 02:05
f28ca61

Choose a tag to compare

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());

2.0.0

14 Jun 02:10
39b0e31

Choose a tag to compare

  • Number Lookup Module
$mocean->numberLookup()->inquiry([
    'mocean-to' => '60123456789'
]);
  • OTP Charge Per Attempt
$mocean->verify()
     ->sendAs(\Mocean\Verify\Channel::SMS) // add this method
     ->start([
           mocean-brand = 'BRAND_NAME',
           mocean-to = '60123456789'
     ]);

1.0.2

11 Jul 10:25
dc48244

Choose a tag to compare

Update Client.php