Skip to content
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