Skip to content

Commit c54a24e

Browse files
committed
Deploy
1 parent 408eb8b commit c54a24e

File tree

8 files changed

+67
-6
lines changed

8 files changed

+67
-6
lines changed

bandwidth/controllers/base_controller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class BaseController(object):
2727
"""
2828

2929
global_headers = {
30-
'user-agent': 'python-sdk-refs/tags/python6.6.0'
30+
'user-agent': 'python-sdk-refs/tags/python6.7.0'
3131
}
3232

3333
def __init__(self, config, call_back=None):

bandwidth/messaging/controllers/base_controller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class BaseController(object):
2727
"""
2828

2929
global_headers = {
30-
'user-agent': 'python-sdk-refs/tags/python6.6.0'
30+
'user-agent': 'python-sdk-refs/tags/python6.7.0'
3131
}
3232

3333
def __init__(self, config, call_back=None):

bandwidth/twofactorauth/controllers/base_controller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class BaseController(object):
2727
"""
2828

2929
global_headers = {
30-
'user-agent': 'python-sdk-refs/tags/python6.6.0'
30+
'user-agent': 'python-sdk-refs/tags/python6.7.0'
3131
}
3232

3333
def __init__(self, config, call_back=None):

bandwidth/voice/bxml/verbs/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@
1414
from .stop_recording import StopRecording
1515
from .start_recording import StartRecording
1616
from .conference import Conference
17+
from .bridge import Bridge
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
"""
2+
bridge.py
3+
4+
Representation of Bandwidth's speak sentence BXML verb
5+
6+
@copyright Bandwidth INC
7+
"""
8+
9+
from lxml import etree
10+
11+
from .base_verb import AbstractBxmlVerb
12+
13+
import re
14+
15+
BRIDGE_TAG = "Bridge"
16+
17+
class Bridge(AbstractBxmlVerb):
18+
19+
def __init__(self, call_id, bridge_complete_url=None, bridge_complete_method=None,
20+
bridge_target_complete_url=None, bridge_target_complete_method=None,
21+
username=None, password=None, tag=None):
22+
"""
23+
Initializes the Bridge class with the following parameters
24+
25+
:param str call_id: The call to bridge
26+
:param str bridge_complete_url: URL to send the bridge complete event to
27+
:param str bridge_complete_method: HTTP method to send the bridge complete event
28+
:param str bridge_target_complete_url: URL to send the bridge target complete event to
29+
:param str bridge_target_complete_method: HTTP method to send the bridge target complete event
30+
:param str username: HTTP basic auth username for events
31+
:param str password: HTTP basic auth password for events
32+
:param str tag: Custom tag to include in callbacks
33+
"""
34+
self.call_id = call_id
35+
self.bridge_complete_url = bridge_complete_url
36+
self.bridge_complete_method = bridge_complete_method
37+
self.bridge_target_complete_url = bridge_target_complete_url
38+
self.bridge_target_complete_method = bridge_target_complete_method
39+
self.username = username
40+
self.password = password
41+
self.tag = tag
42+
43+
def to_bxml(self):
44+
root = etree.Element(BRIDGE_TAG)
45+
root.text = self.call_id
46+
if self.bridge_complete_url is not None:
47+
root.set("bridgeCompleteUrl", self.bridge_complete_url)
48+
if self.bridge_complete_method is not None:
49+
root.set("bridgeCompleteMethod", self.bridge_complete_method)
50+
if self.bridge_target_complete_url is not None:
51+
root.set("bridgeTargetCompleteUrl", self.bridge_target_complete_url)
52+
if self.bridge_target_complete_method is not None:
53+
root.set("bridgeTargetCompleteMethod", self.bridge_target_complete_method)
54+
if self.username is not None:
55+
root.set("username", self.username)
56+
if self.password is not None:
57+
root.set("password", self.password)
58+
if self.tag is not None:
59+
root.set("tag", self.tag)
60+
return etree.tostring(root).decode()

bandwidth/voice/controllers/base_controller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class BaseController(object):
2727
"""
2828

2929
global_headers = {
30-
'user-agent': 'python-sdk-refs/tags/python6.6.0'
30+
'user-agent': 'python-sdk-refs/tags/python6.7.0'
3131
}
3232

3333
def __init__(self, config, call_back=None):

bandwidth/webrtc/controllers/base_controller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class BaseController(object):
2727
"""
2828

2929
global_headers = {
30-
'user-agent': 'python-sdk-refs/tags/python6.6.0'
30+
'user-agent': 'python-sdk-refs/tags/python6.7.0'
3131
}
3232

3333
def __init__(self, config, call_back=None):

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
setup(
1414
name='bandwidth-sdk',
15-
version='6.6.0',
15+
version='6.7.0',
1616
description='Bandwidth\'s set of APIs',
1717
long_description=long_description,
1818
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)