@@ -43,6 +43,7 @@ def add_participant(self,
4343 on_exit_action_url = None ,
4444 on_exit_action_method = 'POST' ,
4545 record = False ,
46+ record_participant_track = False ,
4647 record_file_format = 'mp3' ,
4748 status_callback_events = 'mpc-state-changes,participant-state-changes' ,
4849 stay_alone = False ,
@@ -84,19 +85,28 @@ def resume_recording(self):
8485 return self .client .multi_party_calls .resume_recording (uuid = self .id )
8586
8687 def start_participant_recording (self , participant_id , file_format = None , recording_callback_url = None ,
87- recording_callback_method = None ):
88+ recording_callback_method = None , record_track_type = 'all' ):
8889 return self .client .multi_party_calls .start_participant_recording (participant_id = participant_id , uuid = self .id ,
89- ** to_param_dict (self .add_participant ,
90+ ** to_param_dict (self .start_participant_recording ,
9091 locals ()))
9192
92- def stop_participant_recording (self , participant_id ):
93- return self .client .multi_party_calls .stop_participant_recording (participant_id = participant_id , uuid = self .id )
93+ def stop_participant_recording (self , participant_id , record_track_type = 'all' ):
94+ return self .client .multi_party_calls .stop_participant_recording (participant_id = participant_id , uuid = self .id ,
95+ ** to_param_dict (
96+ self .stop_participant_recording ,
97+ locals ()))
9498
95- def pause_participant_recording (self , participant_id ):
96- return self .client .multi_party_calls .pause_participant_recording (participant_id = participant_id , uuid = self .id )
99+ def pause_participant_recording (self , participant_id , record_track_type = 'all' ):
100+ return self .client .multi_party_calls .pause_participant_recording (participant_id = participant_id , uuid = self .id ,
101+ ** to_param_dict (
102+ self .pause_participant_recording ,
103+ locals ()))
97104
98- def resume_participant_recording (self , participant_id ):
99- return self .client .multi_party_calls .resume_participant_recording (participant_id = participant_id , uuid = self .id )
105+ def resume_participant_recording (self , participant_id , record_track_type = 'all' ):
106+ return self .client .multi_party_calls .resume_participant_recording (participant_id = participant_id , uuid = self .id ,
107+ ** to_param_dict (
108+ self .resume_participant_recording ,
109+ locals ()))
100110
101111 def get (self ):
102112 return self .client .multi_party_calls .get (uuid = self .id )
@@ -129,20 +139,25 @@ class MultiPartyCallParticipant(SecondaryPlivoResource):
129139 _secondary_identifier_string = 'member_id'
130140
131141 def start_participant_recording (self , file_format = None , recording_callback_url = None ,
132- recording_callback_method = None ):
142+ recording_callback_method = None , record_track_type = 'all' ):
133143 return self .client .multi_party_calls .start_participant_recording (participant_id = self .secondary_id , uuid = self .id ,
134- ** to_param_dict (self .add_participant ,
144+ ** to_param_dict (self .start_participant_recording ,
135145 locals ()))
136146
137- def stop_participant_recording (self ):
138- return self .client .multi_party_calls .stop_participant_recording (participant_id = self .secondary_id , uuid = self .id )
147+ def stop_participant_recording (self , record_track_type = 'all' ):
148+ return self .client .multi_party_calls .stop_participant_recording (participant_id = self .secondary_id , uuid = self .id ,
149+ ** to_param_dict (self .stop_participant_recording ,
150+ locals ()))
139151
140- def pause_participant_recording (self ):
141- return self .client .multi_party_calls .pause_participant_recording (participant_id = self .secondary_id , uuid = self .id )
152+ def pause_participant_recording (self , record_track_type = 'all' ):
153+ return self .client .multi_party_calls .pause_participant_recording (participant_id = self .secondary_id , uuid = self .id ,
154+ ** to_param_dict (self .pause_participant_recording ,
155+ locals ()))
142156
143- def resume_participant_recording (self ):
144- return self .client .multi_party_calls .resume_participant_recording (participant_id = self .secondary_id ,
145- uuid = self .id )
157+ def resume_participant_recording (self , record_track_type = 'all' ):
158+ return self .client .multi_party_calls .resume_participant_recording (participant_id = self .secondary_id , uuid = self .id ,
159+ ** to_param_dict (self .resume_participant_recording ,
160+ locals ()))
146161
147162 def update (self , coach_mode = None , hold = None , mute = None ):
148163 return self .client .multi_party_calls .update_participant (participant_id = self .secondary_id ,
@@ -286,6 +301,7 @@ def get(self, uuid=None, friendly_name=None, callback_url=None, callback_method=
286301 on_exit_action_url = [optional (of_type_exact (str ), is_url ())],
287302 on_exit_action_method = [optional (of_type_exact (str ), is_in (('GET' , 'POST' ), case_sensitive = False ))],
288303 record = [optional (of_type_exact (bool ))],
304+ record_participant_track = [optional (of_type_exact (bool ))],
289305 record_file_format = [optional (of_type_exact (str ), is_in (('mp3' , 'wav' ), case_sensitive = False ,
290306 case_type = 'lower' ))],
291307 status_callback_events = [optional (of_type_exact (str ), multi_is_in (('mpc-state-changes' ,
@@ -352,6 +368,7 @@ def add_participant(self,
352368 on_exit_action_url = None ,
353369 on_exit_action_method = 'POST' ,
354370 record = False ,
371+ record_participant_track = False ,
355372 record_file_format = 'mp3' ,
356373 status_callback_events = 'mpc-state-changes,participant-state-changes' ,
357374 stay_alone = False ,
@@ -552,17 +569,18 @@ def get_participant(self, participant_id, uuid=None, friendly_name=None,
552569 uuid = [optional (of_type_exact (str ))],
553570 file_format = [optional (of_type_exact (str ), is_in (('mp3' , 'wav' ), case_sensitive = False ,
554571 case_type = 'lower' ))],
572+ record_track_type = [optional (of_type_exact (str ))],
555573 recording_callback_url = [optional (of_type_exact (str ), is_url ())],
556574 recording_callback_method = [optional (of_type_exact (str ), is_in (('GET' , 'POST' ), case_sensitive = False ))],
557575 callback_url = [optional (is_url ())],
558576 callback_method = [optional (of_type (six .text_type ))],
559577 )
560578 def start_participant_recording (self , participant_id , uuid = None , friendly_name = None , file_format = 'mp3' ,
561579 recording_callback_url = None , recording_callback_method = 'POST' ,
562- callback_url = None , callback_method = None ):
580+ callback_url = None , callback_method = None , record_track_type = 'all' ):
563581 mpc_id = self .__make_mpc_id (friendly_name , uuid )
564582 return self .client .request ('POST' , ('MultiPartyCall' , mpc_id , 'Participant' , participant_id , 'Record' ),
565- self .__clean_identifiers (to_param_dict (self .start_recording , locals ())),
583+ self .__clean_identifiers (to_param_dict (self .start_participant_recording , locals ())),
566584 is_voice_request = True )
567585
568586 @validate_args (
@@ -571,13 +589,15 @@ def start_participant_recording(self, participant_id, uuid=None, friendly_name=N
571589 uuid = [optional (of_type_exact (str ))],
572590 callback_url = [optional (is_url ())],
573591 callback_method = [optional (of_type (six .text_type ))],
592+ record_track_type = [optional (of_type_exact (str ))]
574593 )
575594 def stop_participant_recording (self ,
576595 participant_id ,
577596 uuid = None ,
578597 friendly_name = None ,
579598 callback_url = None ,
580- callback_method = None ):
599+ callback_method = None ,
600+ record_track_type = 'all' ):
581601 mpc_id = self .__make_mpc_id (friendly_name , uuid )
582602 return self .client .request ('DELETE' , ('MultiPartyCall' , mpc_id , 'Participant' , participant_id , 'Record' ),
583603 to_param_dict (self .stop_participant_recording , locals ()), is_voice_request = True )
@@ -588,9 +608,10 @@ def stop_participant_recording(self,
588608 uuid = [optional (of_type_exact (str ))],
589609 callback_url = [optional (is_url ())],
590610 callback_method = [optional (of_type (six .text_type ))],
611+ record_track_type = [optional (of_type_exact (str ))]
591612 )
592613 def pause_participant_recording (self , participant_id , uuid = None , friendly_name = None ,
593- callback_url = None , callback_method = None ):
614+ callback_url = None , callback_method = None , record_track_type = 'all' ):
594615 mpc_id = self .__make_mpc_id (friendly_name , uuid )
595616 return self .client .request ('POST' , ('MultiPartyCall' , mpc_id , 'Participant' , participant_id , 'Record' , 'Pause' ),
596617 to_param_dict (self .pause_participant_recording , locals ()), is_voice_request = True )
@@ -601,9 +622,10 @@ def pause_participant_recording(self, participant_id, uuid=None, friendly_name=N
601622 uuid = [optional (of_type_exact (str ))],
602623 callback_url = [optional (is_url ())],
603624 callback_method = [optional (of_type (six .text_type ))],
625+ record_track_type = [optional (of_type_exact (str ))]
604626 )
605627 def resume_participant_recording (self , participant_id , uuid = None , friendly_name = None ,
606- callback_url = None , callback_method = None ):
628+ callback_url = None , callback_method = None , record_track_type = 'all' ):
607629 mpc_id = self .__make_mpc_id (friendly_name , uuid )
608630 return self .client .request ('POST' ,
609631 ('MultiPartyCall' , mpc_id , 'Participant' , participant_id , 'Record' , 'Resume' ),
0 commit comments