Skip to content

Commit 045f406

Browse files
Merge pull request #293 from plivo/VT-8890
VT-8890: Stereo recording parameter in Record API
2 parents b9292a8 + 11eafb0 commit 045f406

5 files changed

Lines changed: 31 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# Change Log
2+
## [4.59.0](https://github.com/plivo/plivo-python/tree/v4.59.0) (2025-04-30)
3+
**Feature - New Param added for Start Recording API.**
4+
- Support `record_channel_type` in Start Recording API and `recordChannelType` in Record XML.
5+
26
## [4.58.6](https://github.com/plivo/plivo-python/tree/v4.58.6) (2025-02-25)
37
**Enhancement - Supporting parameter_name in WhatsApp Template .**
48
- Supporting parameter_name in WhatsApp Template .

plivo/resources/calls.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ def record(self,
3232
transcription_url=None,
3333
transcription_method=None,
3434
callback_url=None,
35-
callback_method=None):
35+
callback_method=None,
36+
record_channel_type=None):
3637
return self.client.calls.record(self.id,
3738
**to_param_dict(self.record, locals()))
3839

@@ -345,7 +346,8 @@ def record(self,
345346
transcription_url=None,
346347
transcription_method=None,
347348
callback_url=None,
348-
callback_method=None):
349+
callback_method=None,
350+
record_channel_type=None):
349351
return self.start_recording(**to_param_dict(self.start_recording,
350352
locals()))
351353

@@ -358,7 +360,8 @@ def start_recording(self,
358360
transcription_url=None,
359361
transcription_method=None,
360362
callback_url=None,
361-
callback_method=None):
363+
callback_method=None,
364+
record_channel_type=None):
362365
return self.client.request('POST', ('Call', call_uuid, 'Record'),
363366
to_param_dict(self.start_recording,
364367
locals()), is_voice_request=True)

plivo/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# -*- coding: utf-8 -*-
2-
__version__ = '4.58.6'
2+
__version__ = '4.59.0'

plivo/xml/recordElement.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,22 @@ def set_callback_method(self, value):
239239
self.callback_method = value
240240
return self
241241

242+
@property
243+
def record_channel_type(self):
244+
return self.__record_channel_type
245+
246+
@record_channel_type.setter
247+
def record_channel_type(self, value):
248+
self.__record_channel_type = six.text_type(
249+
value) if value is not None else None
250+
251+
@validate_args(
252+
value=[of_type(six.text_type)],
253+
)
254+
def set_record_channel_type(self, value):
255+
self.record_channel_type = value
256+
return self
257+
242258
def __init__(
243259
self,
244260
action=None,
@@ -256,6 +272,7 @@ def __init__(
256272
transcription_method=None,
257273
callback_url=None,
258274
callback_method=None,
275+
record_channel_type=None
259276
):
260277
super(RecordElement, self).__init__()
261278

@@ -274,6 +291,7 @@ def __init__(
274291
self.transcription_method = transcription_method
275292
self.callback_url = callback_url
276293
self.callback_method = callback_method
294+
self.record_channel_type = record_channel_type
277295

278296
def to_dict(self):
279297
d = {
@@ -292,6 +310,7 @@ def to_dict(self):
292310
'transcriptionMethod': self.transcription_method,
293311
'callbackUrl': self.callback_url,
294312
'callbackMethod': self.callback_method,
313+
'recordChannelType': self.record_channel_type
295314
}
296315
return {
297316
k: six.text_type(map_type(v))

setup.py

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

1111
setup(
1212
name='plivo',
13-
version='4.58.6',
13+
version='4.59.0',
1414
description='A Python SDK to make voice calls & send SMS using Plivo and to generate Plivo XML',
1515
long_description=long_description,
1616
url='https://github.com/plivo/plivo-python',

0 commit comments

Comments
 (0)