Skip to content

Commit

Permalink
Deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
DX-Bandwidth committed Feb 11, 2020
1 parent ae52c35 commit ee67bbe
Show file tree
Hide file tree
Showing 19 changed files with 1,470 additions and 229 deletions.
43 changes: 43 additions & 0 deletions src/Voice/Bxml/Record.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,33 @@ public function fileFormat($fileFormat) {
$this->fileFormat = $fileFormat;
}

/**
* Sets the transcribe attribute for Record
*
* @param boolean $transcribe True to submit the recording for transcription, false otherwise
*/
public function transcribe($transcribe) {
$this->transcribe = $transcribe;
}

/**
* Sets the transcriptionAvailableUrl for Record
*
* @param string $transcriptionAvailableUrl URL to send transcription available events to
*/
public function transcriptionAvailableUrl($transcriptionAvailableUrl) {
$this->transcriptionAvailableUrl = $transcriptionAvailableUrl;
}

/**
* Sets the transcriptionAvailableMethod for Record
*
* @param string $transcriptionAvailableMethod HTTP method (GET or POST) to send the transcription available event as
*/
public function transcriptionAvailableMethod($transcriptionAvailableMethod) {
$this->transcriptionAvailableMethod = $transcriptionAvailableMethod;
}

public function toBxml($doc) {
$element = $doc->createElement("Record");

Expand Down Expand Up @@ -148,6 +175,22 @@ public function toBxml($doc) {
$element->setattribute("fileFormat", $this->fileFormat);
}

if(isset($this->transcribe)) {
if ($this->transcribe) {
$element->setattribute("transcribe", "true");
} else {
$element->setattribute("transcribe", "false");
}
}

if(isset($this->transcriptionAvailableUrl)) {
$element->setattribute("transcriptionAvailableUrl", $this->transcriptionAvailableUrl);
}

if(isset($this->transcriptionAvailableMethod)) {
$element->setattribute("transcriptionAvailableMethod", $this->transcriptionAvailableMethod);
}

return $element;
}
}
43 changes: 43 additions & 0 deletions src/Voice/Bxml/StartRecording.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,33 @@ public function multiChannel($multiChannel) {
$this->multiChannel = $multiChannel;
}

/**
* Sets the transcribe attribute for StartRecording
*
* @param boolean $transcribe True to submit the recording for transcription, false otherwise
*/
public function transcribe($transcribe) {
$this->transcribe = $transcribe;
}

/**
* Sets the transcriptionAvailableUrl for StartRecording
*
* @param string $transcriptionAvailableUrl URL to send transcription available events to
*/
public function transcriptionAvailableUrl($transcriptionAvailableUrl) {
$this->transcriptionAvailableUrl = $transcriptionAvailableUrl;
}

/**
* Sets the transcriptionAvailableMethod for StartRecording
*
* @param string $transcriptionAvailableMethod HTTP method (GET or POST) to send the transcription available event as
*/
public function transcriptionAvailableMethod($transcriptionAvailableMethod) {
$this->transcriptionAvailableMethod = $transcriptionAvailableMethod;
}

public function toBxml($doc) {
$element = $doc->createElement("StartRecording");

Expand Down Expand Up @@ -112,6 +139,22 @@ public function toBxml($doc) {
}
}

if(isset($this->transcribe)) {
if ($this->transcribe) {
$element->setattribute("transcribe", "true");
} else {
$element->setattribute("transcribe", "false");
}
}

if(isset($this->transcriptionAvailableUrl)) {
$element->setattribute("transcriptionAvailableUrl", $this->transcriptionAvailableUrl);
}

if(isset($this->transcriptionAvailableMethod)) {
$element->setattribute("transcriptionAvailableMethod", $this->transcriptionAvailableMethod);
}

return $element;
}
}
Loading

0 comments on commit ee67bbe

Please sign in to comment.