From 700e8009a284f727b30fc8972a29464d61571b61 Mon Sep 17 00:00:00 2001 From: AJ Rice <53190766+ajrice6713@users.noreply.github.com> Date: Fri, 29 Aug 2025 17:38:26 -0400 Subject: [PATCH 1/2] VAPI-2496 add `wait` attribute to `StopStream` --- .../java/com/bandwidth/sdk/model/bxml/StopStream.java | 9 +++++++++ .../sdk/unit/models/bxml/StopStreamVerbTest.java | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/src/main/java/com/bandwidth/sdk/model/bxml/StopStream.java b/src/main/java/com/bandwidth/sdk/model/bxml/StopStream.java index 55730aa6..43cde3a2 100644 --- a/src/main/java/com/bandwidth/sdk/model/bxml/StopStream.java +++ b/src/main/java/com/bandwidth/sdk/model/bxml/StopStream.java @@ -25,6 +25,7 @@ * * @param name (str, optional): The name of the stream to stop. * This is either the user selected name when sending the verb, or the system generated name returned in the Media Stream Started webhook if was sent with no name attribute. + * @param wait (bool, optional): If true, the BXML interpreter will wait for the stream to stop before processing the next verb. */ public class StopStream implements Verb { @@ -33,6 +34,14 @@ public class StopStream implements Verb { @XmlAttribute protected String name; + @XmlAttribute + protected Boolean wait; + + // Original constructor for backwards compatibility + public StopStream(String name) { + this.name = name; + } + @Override public String getVerbName() { return TYPE_NAME; diff --git a/src/test/java/com/bandwidth/sdk/unit/models/bxml/StopStreamVerbTest.java b/src/test/java/com/bandwidth/sdk/unit/models/bxml/StopStreamVerbTest.java index 1b7fff31..004d40e3 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/bxml/StopStreamVerbTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/bxml/StopStreamVerbTest.java @@ -27,4 +27,12 @@ public void stopStreamVerbWorks() throws JAXBException { assertThat(new Bxml().with(new StopStream("name")).toBxml(jaxbContext), is(expectedBxml)); }; + + @Test + public void stopStreamVerbWithWaitWorks() throws JAXBException { + JAXBContext jaxbContext = JAXBContext.newInstance(Bxml.class); + String expectedBxml = ""; + + assertThat(new Bxml().with(new StopStream("name", true)).toBxml(jaxbContext), is(expectedBxml)); + }; }; From 29f41199547f3a0c5c8132c1924b2845c86b0731 Mon Sep 17 00:00:00 2001 From: AJ Rice <53190766+ajrice6713@users.noreply.github.com> Date: Fri, 29 Aug 2025 17:42:55 -0400 Subject: [PATCH 2/2] forgot quotes --- .../com/bandwidth/sdk/unit/models/bxml/StopStreamVerbTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/com/bandwidth/sdk/unit/models/bxml/StopStreamVerbTest.java b/src/test/java/com/bandwidth/sdk/unit/models/bxml/StopStreamVerbTest.java index 004d40e3..be1d6f11 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/bxml/StopStreamVerbTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/bxml/StopStreamVerbTest.java @@ -31,7 +31,7 @@ public void stopStreamVerbWorks() throws JAXBException { @Test public void stopStreamVerbWithWaitWorks() throws JAXBException { JAXBContext jaxbContext = JAXBContext.newInstance(Bxml.class); - String expectedBxml = ""; + String expectedBxml = ""; assertThat(new Bxml().with(new StopStream("name", true)).toBxml(jaxbContext), is(expectedBxml)); };