Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/MessageBird/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Client
const ENDPOINT = 'https://rest.messagebird.com';
const CHATAPI_ENDPOINT = 'https://chat.messagebird.com/1';

const CLIENT_VERSION = '1.6.5';
const CLIENT_VERSION = '1.6.6';

/**
* @var string
Expand Down
8 changes: 8 additions & 0 deletions src/MessageBird/Objects/VoiceMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ class VoiceMessage extends Base
*/
public $ifMachine = 'continue';

/**
* The time (in milliseconds) to analyze if a machine has picked up the phone. Used in combination with the delay
* and hangup values of the ifMachine attribute. Minimum: 400, maximum: 10000.
*
* @var int
*/
public $machineTimeout = 7000;

/**
* The scheduled date and time of the message in RFC3339 format (Y-m-d\TH:i:sP)
*
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/voicemessages/VoiceMessagesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function testVoiceMessageCreate()
$Message->body = 'This is a test message.';
$Message->language = "nl";
$Message->voice = "male";
$this->mockClient->expects($this->once())->method('performHttpRequest')->with("POST", 'voicemessages', null, '{"originator":"MessageBird","body":"This is a test message.","reference":null,"language":"nl","voice":"male","repeat":1,"ifMachine":"continue","scheduledDatetime":null,"recipients":[31612345678],"reportUrl":null}');
$this->mockClient->expects($this->once())->method('performHttpRequest')->with("POST", 'voicemessages', null, '{"originator":"MessageBird","body":"This is a test message.","reference":null,"language":"nl","voice":"male","repeat":1,"ifMachine":"continue","machineTimeout":7000,"scheduledDatetime":null,"recipients":[31612345678],"reportUrl":null}');
$this->client->voicemessages->create($Message);
}

Expand Down