Skip to content

Commit

Permalink
VT-8038: SDK changes for stream xml element keepCallAlive
Browse files Browse the repository at this point in the history
  • Loading branch information
prashantp-plivo committed Aug 29, 2024
1 parent efcaa58 commit 8ca559b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## [4.55.2](https://github.com/plivo/plivo-python/tree/v4.55.2) (2024-09-03)
**Feature - Adding new element for Audio Stream XML **
- Added `keepCallAlive` element in Audio Stream XML

## [4.55.1](https://github.com/plivo/plivo-python/tree/v4.55.1) (2024-07-04)
**Feature - Adding new param support for Add Participant API**
- Added `Send_digits` and `send_on_preanswer` attribute in add participant
Expand Down
2 changes: 1 addition & 1 deletion plivo/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# -*- coding: utf-8 -*-
__version__ = '4.55.1'
__version__ = '4.55.2'
5 changes: 4 additions & 1 deletion plivo/xml/streamElement.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ def __init__(
statusCallbackUrl=None,
statusCallbackMethod=None,
contentType=None,
extraHeaders=None
extraHeaders=None,
keepCallAlive=None
):
super(StreamElement, self).__init__()

Expand All @@ -31,6 +32,7 @@ def __init__(
self.statusCallbackMethod = statusCallbackMethod
self.contentType = contentType
self.extraHeaders = extraHeaders
self.keepCallAlive = keepCallAlive

def to_dict(self):
d = {
Expand All @@ -41,6 +43,7 @@ def to_dict(self):
'statusCallbackMethod': self.statusCallbackMethod,
'contentType': self.contentType,
'extraHeaders': self.extraHeaders,
'keepAlive': self.keepCallAlive
}
return {
k: six.text_type(map_type(v))
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setup(
name='plivo',
version='4.55.1',
version='4.55.2',
description='A Python SDK to make voice calls & send SMS using Plivo and to generate Plivo XML',
long_description=long_description,
url='https://github.com/plivo/plivo-python',
Expand Down
3 changes: 2 additions & 1 deletion tests/xml/test_streamElement.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ def test_set_methods(self):
content = 'wss://test.url'
bidirectional = True
extraHeaders = "a=1,b=2"
keepCallAlive = True

element = plivoxml.ResponseElement()
response = element.add(
plivoxml.StreamElement(content, bidirectional=bidirectional, extraHeaders=extraHeaders)
plivoxml.StreamElement(content, bidirectional=bidirectional, extraHeaders=extraHeaders, keepCallAlive=keepCallAlive)
).to_string(False)
self.assertXmlEqual(response, expected_response)

0 comments on commit 8ca559b

Please sign in to comment.