rich-application-94483
11/13/2025, 11:01 AMALLOTTED_TIMEOUT. Is there a way to increase this timeout so that the agent has more time to load before it gives up?tall-airline-16756
11/13/2025, 11:01 AMtall-airline-16756
11/13/2025, 11:03 AMALLOTTED_TIMEOUT error, you can increase the timeout by adjusting the ringing_timeout parameter. There are a couple of ways to do this:
• Trunk-Level Timeout: You can set the ringing_timeout in the SIP Inbound Trunk configuration. This will apply a default timeout for all calls using that trunk, making it a convenient option.
• Participant-Level Timeout: Alternatively, when creating a SIP participant, you can specify the ringing_timeout. For example, in Node.js:
const participant = await sipClient.createSipParticipant(
sipTrunkId,
phoneNumber,
roomName,
{
ringingTimeout: 60 // 60 seconds timeout
}
);
Feel free to adjust the timeout value (say, between 60 and 120 seconds) to best fit your agent's initialization time. If you have any questions or need a hand with this, just let me know—I’m here to help!
Sources: packages/javascript/CHANGELOG.md | packages/livekit-server-sdk/src/SipClient.ts | lib/livekit/sip_service_client.rb | pkg/service/sip.gorich-application-94483
11/13/2025, 11:14 AMringingTimeout on the inbound trunk configuration in LiveKit Cloud, but the issue is still happening. Is there a way to set the ringingTimeout on participant through the dispatch rules in LiveKit Cloud?tall-airline-16756
11/13/2025, 11:14 AMringingTimeout parameter can’t be set directly on participants through dispatch rules in LiveKit Cloud. Instead, this setting is available at the SIP trunk level or when you create a SIP participant programmatically, like using the CreateSIPParticipant API.
If you’re looking to control the timeout for calls dispatched via a rule, the best approach is to make sure the ringingTimeout is set correctly on the SIP trunk(s) linked to that dispatch rule. Please feel free to ask if you’d like me to walk you through this or if you have any other questions—I’m here to help!
Sources: protobufs/livekit_sip.proto | SIP APIs | LiveKit docs | SIP dispatch rule | LiveKit docsrich-application-94483
11/13/2025, 11:18 AMtall-airline-16756
11/13/2025, 11:18 AMheaders_to_attributes option in your SIP trunk or dispatch rule. This handy feature maps specific SIP headers (like X-Customer-ID) directly to participant attributes, so they’re ready and waiting as soon as the participant joins the room.
Here’s an example you can try in your SIP trunk configuration:
{
"headers_to_attributes": {
"X-Customer-ID": "customer_id",
"X-Tenant": "tenant"
}
}
Once set up, these attributes become immediately accessible programmatically, helping your agent get started right away without any extra waiting.
If you’d like, I’m here to walk you through the setup or answer any questions you might have—just let me know!
Sources: SIP participant | LiveKit docs | protobufs/rpc/io.protorich-application-94483
11/13/2025, 11:22 AMtall-airline-16756
11/13/2025, 11:22 AMJobContext object. Let me share a simple example with you:
import { JobContext } from 'livekit-server-sdk';
async function entrypoint(ctx: JobContext) {
// Connect the agent to the room
await ctx.connect();
// Access room participants
const participants = Array.from(ctx.room.participants.values());
for (const participant of participants) {
console.log('Participant identity:', participant.identity);
console.log('All attributes:', participant.attributes); // { key1: 'value1', ... }
// Access specific attribute
const task = participant.attributes['task'];
if (task) {
console.log('Task:', task);
}
}
// Listen for attribute changes
ctx.room.on('participant_attributes_changed', ({ changed_attributes, participant }) => {
console.log('Attributes changed:', changed_attributes);
console.log('Updated attributes:', participant.attributes);
// Handle specific attribute change
if ('voice' in changed_attributes) {
const newVoice = participant.attributes['voice'];
console.log(`Participant ${participant.identity} changed voice to: ${newVoice}`);
}
});
}
This example shows you how to grab attributes from participants and keep track of any updates in real-time. If anything is unclear or if you'd like me to walk you through it step-by-step, please don't hesitate to ask—I'm here to help!
Sources: agent/main.py | examples/agent-dispatch/index.ts | Participant attributes and metadata | LiveKit docs | Building an Automated IVR Menu Caller | LiveKit Docs