diff --git a/src/main/java/com/bandwidth/sdk/model/bxml/StartStream.java b/src/main/java/com/bandwidth/sdk/model/bxml/StartStream.java index 491512e9..2cf1feb1 100644 --- a/src/main/java/com/bandwidth/sdk/model/bxml/StartStream.java +++ b/src/main/java/com/bandwidth/sdk/model/bxml/StartStream.java @@ -33,17 +33,43 @@ @EqualsAndHashCode /** * - * @param name (str, optional): A name to refer to this stream by. Used when sending . If not provided, it will default to the generated stream id as sent in the Media Stream Started webhook. - * @param tracks (str, optional): The part of the call to send a stream from. inbound, outbound or both. Default is inbound. - * @param destination (str, optional): A websocket URI to send the stream to. The audio from the specified tracks will be sent via websocket to this URL as base64-encoded PCMU/G711 audio. See below for more details on the websocket packet format. - * @param streamEventUrl (str, optional): URL to send the associated Webhook events to during this stream's lifetime. Does not accept BXML. May be a relative URL. - * @param streamEventMethod (str, optional): The HTTP method to use for the request to streamEventUrl. GET or POST. Default value is POST. - * @param username (str, optional): The username to send in the HTTP request to streamEventUrl. If specified, the URLs must be TLS-encrypted (i.e., https). - * @param password (str, optional): The password to send in the HTTP request to streamEventUrl. If specified, the URLs must be TLS-encrypted (i.e., https). + * @param name (str, optional): A name to refer to this stream by. + * Used when sending . If not provided, it + * will default to the generated stream id as sent in + * the Media Stream Started webhook. + * @param mode (str, optional): The mode to use for the stream. + * unidirectional or bidirectional. Specifies whether + * the audio being streamed over the WebSocket is + * bidirectional (the service can both read and write + * audio over the WebSocket) or unidirectional + * (one-way, read-only). Default is unidirectional. + * @param tracks (str, optional): The part of the call to send a + * stream from. inbound, outbound or both. Default is + * inbound. + * @param destination (str, optional): A websocket URI to send the stream + * to. The audio from the specified tracks will be sent + * via websocket to this URL as base64-encoded + * PCMU/G711 audio. See below for more details on the + * websocket packet format. + * @param streamEventUrl (str, optional): URL to send the associated Webhook + * events to during this stream's lifetime. Does not + * accept BXML. May be a relative URL. + * @param streamEventMethod (str, optional): The HTTP method to use for the + * request to streamEventUrl. GET or POST. Default + * value is POST. + * @param username (str, optional): The username to send in the HTTP + * request to streamEventUrl. If specified, the URLs + * must be TLS-encrypted (i.e., https). + * @param password (str, optional): The password to send in the HTTP + * request to streamEventUrl. If specified, the URLs + * must be TLS-encrypted (i.e., https). * - * Nested Verbs: - * @param StreamParam: (optional) You may specify up to 12 elements nested within a tag. - * These elements define optional user specified parameters that will be sent to the destination URL when the stream is first started. + * Nested Verbs: + * @param StreamParam: (optional) You may specify up to 12 + * elements nested within a tag. + * These elements define optional user specified + * parameters that will be sent to the destination URL + * when the stream is first started. * */ public class StartStream implements Verb { @@ -53,6 +79,9 @@ public class StartStream implements Verb { @XmlAttribute protected String name; + @XmlAttribute + protected String mode; + @XmlAttribute @Default protected CallDirectionEnum tracks = CallDirectionEnum.INBOUND; diff --git a/src/test/java/com/bandwidth/sdk/unit/models/bxml/StartStreamVerbTest.java b/src/test/java/com/bandwidth/sdk/unit/models/bxml/StartStreamVerbTest.java index 18b6134f..5fbde02f 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/bxml/StartStreamVerbTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/bxml/StartStreamVerbTest.java @@ -37,6 +37,7 @@ public class StartStreamVerbTest { .build(); StartStream startStream = StartStream.builder() .name("stream1") + .mode("unidirectional") .tracks(CallDirectionEnum.INBOUND) .destination("testurl.com") .streamEventUrl("eventurl.com") @@ -49,7 +50,7 @@ public class StartStreamVerbTest { @Test public void startStreamVerbWorks() throws JAXBException { JAXBContext jaxbContext = JAXBContext.newInstance(Bxml.class); - String expectedBxml = ""; + String expectedBxml = ""; assertThat(new Bxml().with(startStream).toBxml(jaxbContext), is(expectedBxml)); }