Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the issue to allow only agent role for paralleldial and set the limit to 20 #172

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions plivo/resources/multipartycall.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,10 @@ def add_participant(self,
raise ValidationError('specify either call_uuid or (from, to)')
if call_uuid is None and (not from_ or not to_):
raise ValidationError('specify (from, to) when not adding an existing call_uuid to multi party participant')
if len(to_.split('<')) > 1 and role.lower() != "agent":
raise ValidationError('Multiple to_ values given for role ' + role)
elif len(to_.split('<')) > 20:
raise ValidationError('No of to_ values provided should be lesser than 20')
return self.client.request('POST', ('MultiPartyCall', mpc_id, 'Participant'),
self.__clean_identifiers(to_param_dict(self.add_participant, locals())),
is_voice_request=True)
Expand Down