From c7f439c2f740b634743ea392ce42b07b0d13062d Mon Sep 17 00:00:00 2001 From: abinaya-plivo Date: Wed, 17 Jan 2024 15:25:02 +0530 Subject: [PATCH 1/5] New parameter `create_mpc_if_alone` in MPC Add Participant API --- plivo/resources/multipartycall.py | 7 +++++-- tests/resources/test_multipartycalls.py | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/plivo/resources/multipartycall.py b/plivo/resources/multipartycall.py index 991e1a28..5a87630e 100644 --- a/plivo/resources/multipartycall.py +++ b/plivo/resources/multipartycall.py @@ -60,7 +60,8 @@ def add_participant(self, start_recording_audio=None, start_recording_audio_method='GET', stop_recording_audio=None, - stop_recording_audio_method='GET' + stop_recording_audio_method='GET', + create_mpc_if_alone=True ): return self.client.multi_party_calls.add_participant(role, uuid=self.id, **to_param_dict(self.add_participant, locals())) @@ -334,6 +335,7 @@ def get(self, uuid=None, friendly_name=None, callback_url=None, callback_method= stop_recording_audio_method=[optional(of_type_exact(str), is_in(('GET', 'POST'), case_sensitive=False))], callback_url=[optional(is_url())], callback_method=[optional(of_type(six.text_type))], + create_mpc_if_alone=[optional(of_type_exact(bool))], ) def add_participant(self, role, @@ -387,7 +389,8 @@ def add_participant(self, stop_recording_audio=None, stop_recording_audio_method='GET', callback_url=None, - callback_method=None + callback_method=None, + create_mpc_if_alone=True ): mpc_id = self.__make_mpc_id(friendly_name, uuid) caller_name = caller_name or from_ diff --git a/tests/resources/test_multipartycalls.py b/tests/resources/test_multipartycalls.py index 218df67c..fcfb908d 100644 --- a/tests/resources/test_multipartycalls.py +++ b/tests/resources/test_multipartycalls.py @@ -189,6 +189,7 @@ def test_add_participant(self): 'role': 'agent', 'start_recording_audio_method': 'GET', 'stop_recording_audio_method': 'GET', + 'create_mpc_if_alone': True } add_participant_response = self.client.multi_party_calls.add_participant(friendly_name='Voice', role='agent', From 0dc0494b5f75e3cd41c66bd1f5b5aa3f6f60b5f1 Mon Sep 17 00:00:00 2001 From: abinaya-plivo Date: Wed, 17 Jan 2024 15:50:52 +0530 Subject: [PATCH 2/5] fixed existing UT bug --- tests/xml/test_responseElement.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/xml/test_responseElement.py b/tests/xml/test_responseElement.py index 45f5ebe6..496d77e7 100644 --- a/tests/xml/test_responseElement.py +++ b/tests/xml/test_responseElement.py @@ -110,7 +110,7 @@ def test_add_mpc(self): 'enterSoundMethod="GET" exitSound="beep:1" exitSoundMethod="GET" hold="true" ' \ 'maxDuration="20000" maxParticipants="7" mute="true" onExitActionMethod="POST" ' \ 'onExitActionUrl="https://plivo.com/exitAction" record="true" recordFileFormat="wav" ' \ - 'recordMinMemberCount="1" recordingCallbackMethod="GET" ' \ + 'recordMinMemberCount="1" recordParticipantTrack="false" recordingCallbackMethod="GET" ' \ 'relayDTMFInputs="false" role="customer" ' \ 'startMpcOnEnter="true" '\ 'startRecordingAudio="https://plivo.com/plivoTone.mp3" ' \ From 07efba46e52d05246d8c58486b0fead99e90186b Mon Sep 17 00:00:00 2001 From: abinaya-plivo Date: Thu, 18 Jan 2024 11:47:14 +0530 Subject: [PATCH 3/5] param name change --- plivo/resources/multipartycall.py | 6 +++--- tests/resources/test_multipartycalls.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plivo/resources/multipartycall.py b/plivo/resources/multipartycall.py index 5a87630e..fad35271 100644 --- a/plivo/resources/multipartycall.py +++ b/plivo/resources/multipartycall.py @@ -61,7 +61,7 @@ def add_participant(self, start_recording_audio_method='GET', stop_recording_audio=None, stop_recording_audio_method='GET', - create_mpc_if_alone=True + start_mpc_with_single_participant=True ): return self.client.multi_party_calls.add_participant(role, uuid=self.id, **to_param_dict(self.add_participant, locals())) @@ -335,7 +335,7 @@ def get(self, uuid=None, friendly_name=None, callback_url=None, callback_method= stop_recording_audio_method=[optional(of_type_exact(str), is_in(('GET', 'POST'), case_sensitive=False))], callback_url=[optional(is_url())], callback_method=[optional(of_type(six.text_type))], - create_mpc_if_alone=[optional(of_type_exact(bool))], + start_mpc_with_single_participant=[optional(of_type_exact(bool))], ) def add_participant(self, role, @@ -390,7 +390,7 @@ def add_participant(self, stop_recording_audio_method='GET', callback_url=None, callback_method=None, - create_mpc_if_alone=True + start_mpc_with_single_participant=True ): mpc_id = self.__make_mpc_id(friendly_name, uuid) caller_name = caller_name or from_ diff --git a/tests/resources/test_multipartycalls.py b/tests/resources/test_multipartycalls.py index fcfb908d..9ab825b2 100644 --- a/tests/resources/test_multipartycalls.py +++ b/tests/resources/test_multipartycalls.py @@ -189,7 +189,7 @@ def test_add_participant(self): 'role': 'agent', 'start_recording_audio_method': 'GET', 'stop_recording_audio_method': 'GET', - 'create_mpc_if_alone': True + 'start_mpc_with_single_participant': True } add_participant_response = self.client.multi_party_calls.add_participant(friendly_name='Voice', role='agent', From fc976426140f4b11d03b25561b0bda08c91450b8 Mon Sep 17 00:00:00 2001 From: abinaya-plivo Date: Thu, 18 Jan 2024 12:27:26 +0530 Subject: [PATCH 4/5] parameter name change --- plivo/resources/multipartycall.py | 6 +++--- tests/resources/test_multipartycalls.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plivo/resources/multipartycall.py b/plivo/resources/multipartycall.py index fad35271..42b982b2 100644 --- a/plivo/resources/multipartycall.py +++ b/plivo/resources/multipartycall.py @@ -61,7 +61,7 @@ def add_participant(self, start_recording_audio_method='GET', stop_recording_audio=None, stop_recording_audio_method='GET', - start_mpc_with_single_participant=True + create_mpc_with_single_participant=True ): return self.client.multi_party_calls.add_participant(role, uuid=self.id, **to_param_dict(self.add_participant, locals())) @@ -335,7 +335,7 @@ def get(self, uuid=None, friendly_name=None, callback_url=None, callback_method= stop_recording_audio_method=[optional(of_type_exact(str), is_in(('GET', 'POST'), case_sensitive=False))], callback_url=[optional(is_url())], callback_method=[optional(of_type(six.text_type))], - start_mpc_with_single_participant=[optional(of_type_exact(bool))], + create_mpc_with_single_participant=[optional(of_type_exact(bool))], ) def add_participant(self, role, @@ -390,7 +390,7 @@ def add_participant(self, stop_recording_audio_method='GET', callback_url=None, callback_method=None, - start_mpc_with_single_participant=True + create_mpc_with_single_participant=True ): mpc_id = self.__make_mpc_id(friendly_name, uuid) caller_name = caller_name or from_ diff --git a/tests/resources/test_multipartycalls.py b/tests/resources/test_multipartycalls.py index 9ab825b2..f4485104 100644 --- a/tests/resources/test_multipartycalls.py +++ b/tests/resources/test_multipartycalls.py @@ -189,7 +189,7 @@ def test_add_participant(self): 'role': 'agent', 'start_recording_audio_method': 'GET', 'stop_recording_audio_method': 'GET', - 'start_mpc_with_single_participant': True + 'create_mpc_with_single_participant': True } add_participant_response = self.client.multi_party_calls.add_participant(friendly_name='Voice', role='agent', From 9abea7e510e529977278e9ff07bc4ba15da10961 Mon Sep 17 00:00:00 2001 From: eniyavan Date: Thu, 25 Jan 2024 14:15:31 +0530 Subject: [PATCH 5/5] adding the changes --- CHANGELOG.md | 3 +++ plivo/version.py | 2 +- setup.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de2f82ab..1d690dd3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ # Change Log +## [4.47.2](https://github.com/plivo/plivo-python/tree/v4.47.2) (2024-01-25) +**Added new params 'create_mpc_with_single_participant' for Add Participant API of MPC** + ## [4.47.1](https://github.com/plivo/plivo-python/tree/v4.47.1) (2023-12-19) **Type param addition in speak api for call and mpc** diff --git a/plivo/version.py b/plivo/version.py index 6e83b2ca..de085918 100644 --- a/plivo/version.py +++ b/plivo/version.py @@ -1,2 +1,2 @@ # -*- coding: utf-8 -*- -__version__ = '4.47.1' +__version__ = '4.47.2' diff --git a/setup.py b/setup.py index a511dda7..65a61ad1 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ setup( name='plivo', - version='4.47.0', + version='4.47.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',