happy-fall-9027
06/26/2025, 10:49 PMtall-airline-16756
06/26/2025, 10:49 PMtall-airline-16756
06/26/2025, 10:49 PMCreateSIPParticipant
function is used to create a SIP participant for making outgoing calls. Below is an overview of its usage:
async def create_sip_participant(
self,
create: CreateSIPParticipantRequest,
*,
timeout: Optional[float] = None,
) -> SIPParticipantInfo:
Required Parameters:
• `sip_trunk_id`: ID for the SIP trunk used to dial the user
• `sip_call_to`: Phone number to call
• `room_name`: Name of the room to connect the participant to
Optional Parameters:
• `participant_identity`: Identity of the participant
• `participant_name`: Name of the participant
• `timeout`: Optional request timeout in seconds
• Other options like DTMF digits, headers, and media encryption settings
The function returns a SIPParticipantInfo
object and requires a SIP call
grant on the authorization token.
Here is an example of its usage:
self.api.sip.create_sip_participant(
api.CreateSIPParticipantRequest(
room_name=self._room.name,
participant_identity=participant_identity,
sip_trunk_id=trunk_id,
sip_call_to=call_to,
participant_name=participant_name if is_given(participant_name) else None,
)
)
Sources: SIP APIs | LiveKit Docs | livekit.api.sip_service API documentation | GitHub::livekit::agents | livekit-agents/livekit/agents/job.pyhappy-fall-9027
06/26/2025, 10:53 PMtall-airline-16756
06/26/2025, 10:53 PMcreateSipParticipant(
sipTrunkId: string,
number: string,
roomName: string,
opts?: CreateSipParticipantOptions
): Promise<SIPParticipantInfo>
What you'll need to provide:
• `sipTrunkId`: The ID of your SIP trunk (think of it like the phone line you'll be using)
• `number`: The phone number you want to dial
• `roomName`: The room where the call will take place
Optional extras:
• `opts`: Some additional settings you might want to customize via CreateSipParticipantOptions
When you call this function, it'll return a Promise that gives you back a SIPParticipantInfo object. Cool, right? Let me know if you need any help working through this! 👍 Sources: SipClient | LiveKit JS Server SDK - v2.9.7happy-fall-9027
06/26/2025, 10:55 PMtall-airline-16756
06/26/2025, 10:55 PM