diff --git a/CHANGELOG.md b/CHANGELOG.md index df2ff7b1..aa4a593d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ # Change Log + +## [4.58.4](https://github.com/plivo/plivo-python/tree/v4.58.4) (2025-01-27) +- Role param validation enhancement in Multiparty Add Participant API and XML creation +- Added new param `cx_bot` in Start Stream API + ## [4.58.3](https://github.com/plivo/plivo-python/tree/v4.58.3) (2025-01-14) - Added `from_number` and `to_number` filter support for `list messages` API - diff --git a/plivo/resources/calls.py b/plivo/resources/calls.py index 8e01dce4..9e28f2ae 100644 --- a/plivo/resources/calls.py +++ b/plivo/resources/calls.py @@ -510,7 +510,8 @@ def start_stream(self, status_callback_url=None, status_callback_method=None, content_type=None, - extra_headers=None): + extra_headers=None, + cx_bot=None): return self.client.request('POST', ('Call', call_uuid, 'Stream'), to_param_dict(self.start_stream, locals()), is_voice_request=True) diff --git a/plivo/resources/multipartycall.py b/plivo/resources/multipartycall.py index dbfc99ca..c6c4cc9b 100644 --- a/plivo/resources/multipartycall.py +++ b/plivo/resources/multipartycall.py @@ -268,7 +268,7 @@ def get(self, uuid=None, friendly_name=None, callback_url=None, callback_method= is_voice_request=True, response_type=MultiPartyCall) @validate_args( - role=[of_type_exact(str), is_in(('agent', 'supervisor', 'customer'), case_sensitive=False, case_type='lower')], + role=[of_type_exact(str), is_in(('ai-agent', 'agent', 'supervisor', 'customer'), case_sensitive=False, case_type='lower')], friendly_name=[optional(of_type_exact(str))], uuid=[optional(of_type_exact(str))], from_=[optional(is_phonenumber())], diff --git a/plivo/version.py b/plivo/version.py index 8a490f17..6cf34af2 100644 --- a/plivo/version.py +++ b/plivo/version.py @@ -1,2 +1,2 @@ # -*- coding: utf-8 -*- -__version__ = '4.58.3' +__version__ = '4.58.4' diff --git a/plivo/xml/MultiPartyCallElement.py b/plivo/xml/MultiPartyCallElement.py index 8a01276f..a6d4ba33 100644 --- a/plivo/xml/MultiPartyCallElement.py +++ b/plivo/xml/MultiPartyCallElement.py @@ -367,7 +367,7 @@ def role(self): @validate_args( role=[ of_type_exact(str), - is_in(('agent', 'supervisor', 'customer'), case_sensitive=False, case_type='lower') + is_in(('ai-agent', 'agent', 'supervisor', 'customer'), case_sensitive=False, case_type='lower') ] ) def role(self, role): diff --git a/setup.py b/setup.py index 3aa08184..4242bcc5 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ setup( name='plivo', - version='4.58.3', + version='4.58.4', 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 465c0958..5f0d8063 100644 --- a/tests/resources/test_multipartycalls.py +++ b/tests/resources/test_multipartycalls.py @@ -65,7 +65,7 @@ def test_add_participant_validations(self): self.client.multi_party_calls.add_participant(role='manager') except ValidationError as e: error_message = str(e) - self.assertEqual(error_message, "[\"role should be in ('agent', 'supervisor', " + self.assertEqual(error_message, "[\"role should be in ('ai-agent', 'agent', 'supervisor', " "'customer') (actual value: manager)\"]") try: