File tree Expand file tree Collapse file tree 2 files changed +22
-3
lines changed
Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -18,11 +18,13 @@ def __init__(
1818 self .api_secret = api_secret
1919
2020 def _auth_header (
21- self , grants : VideoGrants , sip : SIPGrants | None = None
21+ self , grants : VideoGrants | None , sip : SIPGrants | None = None
2222 ) -> Dict [str , str ]:
23- tok = AccessToken (self .api_key , self .api_secret ).with_grants (grants )
23+ tok = AccessToken (self .api_key , self .api_secret )
24+ if grants :
25+ tok .with_grants (grants )
2426 if sip is not None :
25- tok = tok .with_sip_grants (sip )
27+ tok .with_sip_grants (sip )
2628
2729 token = tok .to_jwt ()
2830
Original file line number Diff line number Diff line change @@ -132,3 +132,20 @@ async def create_sip_participant(
132132 self ._auth_header (VideoGrants (), sip = SIPGrants (call = True )),
133133 proto_sip .SIPParticipantInfo ,
134134 )
135+
136+ async def transfer_sip_participant (
137+ self , transfer : proto_sip .TransferSIPParticipantRequest
138+ ) -> proto_sip .SIPParticipantInfo :
139+ return await self ._client .request (
140+ SVC ,
141+ "TransferSIPParticipant" ,
142+ transfer ,
143+ self ._auth_header (
144+ VideoGrants (
145+ room_admin = True ,
146+ room = transfer .room_name ,
147+ ),
148+ sip = SIPGrants (call = True ),
149+ ),
150+ proto_sip .SIPParticipantInfo ,
151+ )
You can’t perform that action at this time.
0 commit comments