diff --git a/bandwidth/models/bxml/verbs/start_stream.py b/bandwidth/models/bxml/verbs/start_stream.py
index 0d8768db..5294d7ab 100644
--- a/bandwidth/models/bxml/verbs/start_stream.py
+++ b/bandwidth/models/bxml/verbs/start_stream.py
@@ -14,7 +14,8 @@
class StartStream(NestableVerb):
def __init__(
- self, destination: str, stream_params: List[StreamParam] = [],
+ self, destination: str, destination_username: str,
+ destination_password: str, stream_params: List[StreamParam] = [],
name: str=None, mode: str=None, tracks: str=None,
stream_event_url: str=None,
stream_event_method: str=None,
@@ -27,6 +28,8 @@ def __init__(
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.
tracks (str, optional): The part of the call to send a stream from. inbound, outbound or both. Default is inbound.
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.
+ destination_username (str, optional): The username to send in the `Authorization` header of the initial websocket connection to the `destination` URL.
+ destination_password (str, optional): The password to send in the `Authorization` header of the initial websocket connection to the `destination` URL.
stream_event_url (str, optional): URL to send the associated Webhook events to during this stream's lifetime. Does not accept BXML. May be a relative URL.
stream_event_method (str, optional): The HTTP method to use for the request to streamEventUrl. GET or POST. Default value is POST.
username (str, optional): The username to send in the HTTP request to streamEventUrl. If specified, the URLs must be TLS-encrypted (i.e., https).
@@ -37,6 +40,8 @@ def __init__(
"""
self.destination = destination
+ self.destination_username = destination_username
+ self.destination_password = destination_password
self.stream_params = stream_params
self.name = name
self.mode = mode
@@ -54,6 +59,8 @@ def __init__(
def _attributes(self):
return {
"destination": self.destination,
+ "destination_username": self.destination_username,
+ "destination_password": self.destination_password,
"name": self.name,
"mode": self.mode,
"tracks": self.tracks,
diff --git a/test/unit/models/bxml/test_start_stream.py b/test/unit/models/bxml/test_start_stream.py
index a934ce46..889af2e0 100644
--- a/test/unit/models/bxml/test_start_stream.py
+++ b/test/unit/models/bxml/test_start_stream.py
@@ -29,6 +29,8 @@ def setUp(self):
mode = "bidirectional",
tracks = "inbound",
destination = "testurl.com",
+ destination_username = "dest_user",
+ destination_password = "dest_pass",
stream_event_url="eventurl.com",
stream_event_method= "POST",
username = "user",
@@ -41,10 +43,10 @@ def test_instance(self):
assert isinstance(self.start_stream, Verb)
def test_to_bxml(self):
- expected = ''
+ expected = ''
assert expected == self.start_stream.to_bxml()
def test_add_verb(self):
- expected = ''
+ expected = ''
self.start_stream.add_verb(self.stream_param2)
assert expected == self.start_stream.to_bxml()