steep-balloon-41261
08/06/2025, 12:19 PMtall-airline-16756
08/06/2025, 12:19 PMtall-airline-16756
08/06/2025, 12:21 PMadventurous-dream-57696
08/06/2025, 12:22 PMtall-airline-16756
08/06/2025, 12:23 PMadventurous-dream-57696
08/06/2025, 12:23 PMtall-airline-16756
08/06/2025, 12:25 PMadventurous-dream-57696
08/06/2025, 12:26 PMtall-airline-16756
08/06/2025, 12:27 PMdocker logs <container-name>
to see the logs for the SIP service. Don’t forget to swap out <container-name>
with the actual name of your SIP service container.
• LiveKit Worker (System Service): You can find the system logs for the LiveKit worker service usually in /var/log/
or by using journalctl -u <service-name>
. Again, replace <service-name>
with your LiveKit worker service’s name.
Try searching the logs for keywords like "REFER," "NOTIFY," or the participant and room IDs involved in the transfer. If you need a hand with accessing or making sense of these logs, just let me know—I’m here to help!adventurous-dream-57696
08/21/2025, 4:23 PMtall-airline-16756
08/21/2025, 4:24 PMRefer-To
URI, the correct CSeq sequence number, and valid contact headers.
• Monitor NOTIFY Sequence: Keep an eye out for NOTIFY messages in the logs—they’ll help you track how the transfer is going. These messages tell you if the transfer is in progress (100-199), successful (200), or if it ran into trouble (4xx/5xx).
• Interpret Status Codes: Some common failure codes are 403 (Forbidden), 408 (Request Timeout), and 404 (Not Found). These usually hint at issues like authentication problems, network hiccups, or invalid destinations.
• Check for TLS Limitations: Just a heads-up—SIP REFER doesn’t work over TLS. So if your SIP trunk uses TLS, that could be why transfers aren’t happening.
• Validate SIP Provider Configuration: It’s a good idea to double-check with your SIP provider that REFER transfers are actually enabled and supported on your account.
Try searching the logs for keywords like "REFER," "NOTIFY," and those status codes to help zero in on the problem. If you want, I’m here to help you make sense of specific log entries or figure out what to do next!
Sources: test/lktest/sip.go | SIP troubleshooting guide | LiveKit Docs | Secure trunking | LiveKit Docstall-airline-16756
09/26/2025, 1:49 PMTransferSIPParticipant
API. One thing to keep in mind is that SIP REFER isn’t supported when using TLS for secure trunking, so if TLS is enabled in your setup, that might be causing some hiccups.
If you’re seeing the 603 error, it usually means the transfer destination is globally declining the call. This can happen for a few reasons, such as:
• Invalid or blocked transfer destination
• Provider restrictions or configuration issues
• Network or protocol mismatches
Please don’t hesitate to reach out if you’d like help troubleshooting this or if you want me to take a closer look at your configuration. I’m here to help!
Sources: Docs::Telephony | SIP overview | LiveKit Docs | Docs::Telephony | pkg/sip/inbound.go | CHANGELOG.mdadventurous-dream-57696
09/26/2025, 2:14 PM:phone: Cold Transfer "${userData.participantIdentity}" to: ${contactSIPRecipient}
);
await sip.transferSipParticipant(userData.roomName, userData.participantIdentity, contactSIPRecipient, {
//headers: {},
playDialtone: true,
});
return `Calling ${contact.departmentName} now.`;
}
catch (error) {
console.log(Error dialling contact "${contact.departmentName}"
, error);
}
return `Error dialling contact`;
}
// one tool to rule them all.
export function dialContactCombined(userData: CallUserData): Record<string, llm.Tool> {
const contacts = userData.persona?.departmentContacts ?? userData.config.departmentContacts ?? [];
return {
dialContact: llm.tool({
description: Called when the user asks to be transferred or wants assistance from a specific contact
Here is a list of available contacts: ${Object.keys(contacts).join(', ')}
,
parameters: z.object({
contactName: z.string().describe('The name of the contact to be called'),
}),
execute: async ({ contactName }, { ctx }) => {
console.debug(:wrench: Executing dialContact function - User asked to be transferred to "${contactName}"
,);
const contact = contacts?.find(contact => contact.departmentName === contactName);
const userData = ctx.userData as CallUserData;
if (!contact)
return `No number found for contact: ${contactName}`;
return doColdTransfer(contact, userData);
},
}),
};
}
// or a tool for each contact.
export function dialContactSeparate(userData: CallUserData): Record<string, llm.Tool> {
const contacts = userData.persona?.departmentContacts ?? userData.config.departmentContacts ?? [];
const toolName = (contact: SIPContact) => `dialContact-${contact.departmentName.replace(/[^a-zA-Z0-9]+/g, '-')}`;
return Object.assign({}, ...contacts.map(contact => ({
[toolName(contact)]: llm.tool({
description: Called when the user asks to be transferred or wants assistance from ${contact.departmentName}.
,
//parameters: z.object({}),
execute: async ({}, { ctx, }) => {
console.debug(:wrench: Executing dialContact function - User asked to be transferred to "${contact.departmentName}"
,);
const userData = ctx.userData as CallUserData;
return doColdTransfer(contact, userData);
},
}),
})));
}tall-airline-16756
09/26/2025, 2:14 PMcontactSIPRecipient
is formatted just right. For example, something like tel:+number@domain;user=phone
or sip:+number@domain;user=phone
should align with what your SIP provider expects.
• SIP Trunk Configuration: Make sure the SIP trunk you’re using (sipTrunkId
) has call transfer enabled and the right permissions set up for the destination.
• Call State: The call needs to be active and established before you start the transfer. Trying to transfer on calls that aren’t fully established will usually cause it to fail.
• Provider-Specific Requirements: Some providers, like Twilio or Telnyx, have their own specific settings to get SIP REFER working smoothly. It’s worth confirming those are configured correctly.
• Environment Variables: Take a moment to check that process.env.SIP_TRANSFER_SERVER
is correctly set and points to a valid domain.
Also, keeping an eye on the logs for NOTIFY responses can really help you see how the transfer is progressing and spot any errors along the way. If you’d like, I’m here to help you dig into these checks or go through the logs together. Just let me know!
Sources: Docs::Telephony | SIP troubleshooting guide | LiveKit Docs | Transferring calls | LiveKit Docs | SIP overview | LiveKit Docs | pkg/sip/outbound.go