diff --git a/CHANGELOG.md b/CHANGELOG.md index f7a5d3b3..3898607a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## [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 + ## [4.55.0](https://github.com/plivo/plivo-python/tree/v4.55.0) (2024-06-05) **Feature - Adding locale support for Create Session API** - Added new param `locale` for create session API diff --git a/plivo/resources/multipartycall.py b/plivo/resources/multipartycall.py index 42b982b2..59a91140 100644 --- a/plivo/resources/multipartycall.py +++ b/plivo/resources/multipartycall.py @@ -61,7 +61,9 @@ def add_participant(self, start_recording_audio_method='GET', stop_recording_audio=None, stop_recording_audio_method='GET', - create_mpc_with_single_participant=True + create_mpc_with_single_participant=True, + send_digits=None, + send_on_preanswer=False ): return self.client.multi_party_calls.add_participant(role, uuid=self.id, **to_param_dict(self.add_participant, locals())) @@ -88,8 +90,9 @@ def resume_recording(self): def start_participant_recording(self, participant_id, file_format=None, recording_callback_url=None, recording_callback_method=None, record_track_type='all'): return self.client.multi_party_calls.start_participant_recording(participant_id=participant_id, uuid=self.id, - **to_param_dict(self.start_participant_recording, - locals())) + **to_param_dict( + self.start_participant_recording, + locals())) def stop_participant_recording(self, participant_id, record_track_type='all'): return self.client.multi_party_calls.stop_participant_recording(participant_id=participant_id, uuid=self.id, @@ -142,8 +145,9 @@ class MultiPartyCallParticipant(SecondaryPlivoResource): def start_participant_recording(self, file_format=None, recording_callback_url=None, recording_callback_method=None, record_track_type='all'): return self.client.multi_party_calls.start_participant_recording(participant_id=self.secondary_id, uuid=self.id, - **to_param_dict(self.start_participant_recording, - locals())) + **to_param_dict( + self.start_participant_recording, + locals())) def stop_participant_recording(self, record_track_type='all'): return self.client.multi_party_calls.stop_participant_recording(participant_id=self.secondary_id, uuid=self.id, @@ -152,13 +156,16 @@ def stop_participant_recording(self, record_track_type='all'): def pause_participant_recording(self, record_track_type='all'): return self.client.multi_party_calls.pause_participant_recording(participant_id=self.secondary_id, uuid=self.id, - **to_param_dict(self.pause_participant_recording, - locals())) + **to_param_dict( + self.pause_participant_recording, + locals())) def resume_participant_recording(self, record_track_type='all'): - return self.client.multi_party_calls.resume_participant_recording(participant_id=self.secondary_id, uuid=self.id, - **to_param_dict(self.resume_participant_recording, - locals())) + return self.client.multi_party_calls.resume_participant_recording(participant_id=self.secondary_id, + uuid=self.id, + **to_param_dict( + self.resume_participant_recording, + locals())) def update(self, coach_mode=None, hold=None, mute=None): return self.client.multi_party_calls.update_participant(participant_id=self.secondary_id, @@ -336,6 +343,7 @@ def get(self, uuid=None, friendly_name=None, callback_url=None, callback_method= callback_url=[optional(is_url())], callback_method=[optional(of_type(six.text_type))], create_mpc_with_single_participant=[optional(of_type_exact(bool))], + send_on_preanswer=[optional(of_type_exact(bool))], ) def add_participant(self, role, @@ -390,7 +398,9 @@ def add_participant(self, stop_recording_audio_method='GET', callback_url=None, callback_method=None, - create_mpc_with_single_participant=True + create_mpc_with_single_participant=True, + send_digits=None, + send_on_preanswer=False ): mpc_id = self.__make_mpc_id(friendly_name, uuid) caller_name = caller_name or from_ @@ -420,7 +430,7 @@ def add_participant(self, ) def start(self, uuid=None, friendly_name=None, callback_url=None, callback_method=None): mpc_id = self.__make_mpc_id(friendly_name, uuid) - localObject={} + localObject = {} localObject['status'] = 'active', if callback_url: localObject['callback_url'] = callback_url, diff --git a/plivo/version.py b/plivo/version.py index bf739aba..bbac00c5 100644 --- a/plivo/version.py +++ b/plivo/version.py @@ -1,2 +1,2 @@ # -*- coding: utf-8 -*- -__version__ = '4.55.0' +__version__ = '4.55.1' diff --git a/setup.py b/setup.py index 76df724b..8caa4588 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ setup( name='plivo', - version='4.55.0', + version='4.55.1', 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', diff --git a/tests/resources/test_multipartycalls.py b/tests/resources/test_multipartycalls.py index f4485104..8d0fe81b 100644 --- a/tests/resources/test_multipartycalls.py +++ b/tests/resources/test_multipartycalls.py @@ -189,7 +189,8 @@ def test_add_participant(self): 'role': 'agent', 'start_recording_audio_method': 'GET', 'stop_recording_audio_method': 'GET', - 'create_mpc_with_single_participant': True + 'create_mpc_with_single_participant': True, + 'send_on_preanswer': False } add_participant_response = self.client.multi_party_calls.add_participant(friendly_name='Voice', role='agent', @@ -222,7 +223,7 @@ def test_add_participant(self): coach_mode=False, dial_music='http://music.plivo.com/bella-ciao.wav', ring_timeout=100, status_callback_events='participant-speak-events', max_duration=25000, max_participants=5, relay_dtmf_inputs=True, customer_hold_music_url='http://music.plivo.com/bella-ciao.wav', - customer_hold_music_method='post', exit_sound_method='Post', record_file_format='wav') + customer_hold_music_method='post', exit_sound_method='Post', record_file_format='wav', send_on_preanswer=False) self.__assert_requests(actual_response=add_participant_response, expected_method='POST', expected_url='https://api.plivo.com/v1/Account/MAXXXXXXXXXXXXXXXXXX/'