File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 66
77from livekit .protocol .models import ListUpdate
88from livekit .protocol .sip import (
9+ SIPOutboundConfig ,
910 SIPTrunkInfo ,
1011 CreateSIPInboundTrunkRequest ,
1112 UpdateSIPInboundTrunkRequest ,
@@ -755,12 +756,16 @@ async def create_sip_participant(
755756 create : CreateSIPParticipantRequest ,
756757 * ,
757758 timeout : Optional [float ] = None ,
759+ trunk_id : Optional [str ] = None ,
760+ outbound_trunk_config : Optional [SIPOutboundConfig ] = None ,
758761 ) -> SIPParticipantInfo :
759762 """Create a new SIP participant.
760763
761764 Args:
762765 create: Request containing participant details
763766 timeout: Optional request timeout in seconds
767+ trunk_id: Optional SIP trunk ID to use for the participant
768+ outbound_trunk_config: Optional outbound trunk configuration for the participant
764769
765770 Returns:
766771 Created SIP participant
@@ -781,6 +786,12 @@ async def create_sip_participant(
781786 ):
782787 client_timeout = aiohttp .ClientTimeout (total = 20 )
783788
789+ if trunk_id :
790+ create .sip_trunk_id = trunk_id
791+
792+ if outbound_trunk_config :
793+ create .trunk = outbound_trunk_config
794+
784795 return await self ._client .request (
785796 SVC ,
786797 "CreateSIPParticipant" ,
You can’t perform that action at this time.
0 commit comments