Skip to content

Commit f546667

Browse files
Update StartStream.php
1 parent 8e99bad commit f546667

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/Voice/Bxml/StartStream.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,15 @@ public function streamEventMethod($streamEventMethod) {
7777
$this->streamEventMethod = $streamEventMethod;
7878
}
7979

80+
/**
81+
* Sets the <StreamParam/> tag. You may specify up to 12 <StreamParam/> elements nested within a <StartStream> tag. These elements define optional user specified parameters that will be sent to the destination URL when the stream is first started.
82+
*
83+
* @param list<StreamParam> $streamParams The list of StreamParam tags
84+
*/
85+
public function streamParams($streamParams) {
86+
$this->streamParams = $streamParams;
87+
}
88+
8089
public function toBxml($doc) {
8190
$element = $doc->createElement("StartStream");
8291

@@ -108,6 +117,12 @@ public function toBxml($doc) {
108117
$element->setattribute("streamEventMethod", $this->streamEventMethod);
109118
}
110119

120+
if(isset($this->streamParams)) {
121+
foreach ($this->streamParams as $streamParam) {
122+
$element->appendChild($streamParam->toBxml($doc));
123+
}
124+
}
125+
111126
return $element;
112127
}
113128
}

0 commit comments

Comments
 (0)