faint-gold-41196
02/28/2025, 12:49 PMgray-monkey-83525
02/28/2025, 12:49 PMcreateSipParticipant
method from the LiveKit SDK to initiate the call. Here's a basic example in Node.js:
const { SipClient } = require('@livekit/server-sdk');
async function createSipParticipant(phoneNumber, roomName) {
const sipClient = new SipClient(process.env.LIVEKIT_URL, process.env.LIVEKIT_API_KEY, process.env.LIVEKIT_API_SECRET);
try {
await sipClient.createSipParticipant(process.env.SIP_TRUNK_ID, phoneNumber, roomName, {
participantIdentity: `sip_${phoneNumber}`,
participantName: 'SIP Caller',
});
console.log('SIP participant created successfully.');
} catch (error) {
console.error('Error creating SIP participant:', error);
}
}
createSipParticipant('+98765432109', 'Test SIP Room');
Would you like more detailed steps or a specific code example for your frontend setup?
Sources:
- Making calls using SIP 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.