How to set the to use TCP for the REFER request
# ask-ai
n
How to set the to use TCP for the REFER request
t
Thanks for reaching out, Yuhan. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’m following up about configuring the REFER request to use TCP. Could you share a bit more so I can give the exact steps? • Which product or library are you using for SIP (LiveKit, PJSIP, Sofia-SIP, Asterisk, Kamailio, or something else)? • Are you configuring a client (user agent) or a server/proxy? • Do you control the SIP stack/source code or only configuration files? • If you have a current config snippet or the exact error/behavior you’re seeing, please paste it. With that I’ll propose the precise config or code change to force REFER over TCP (or an alternative solution if TCP for REFER isn’t supported).
n
I'm using LiveKit python sdk
t
Thanks — regarding using TCP for the SIP REFER when using the LiveKit Python SDK: • The Python SDK does not control SIP transport. REFER is issued by the LiveKit server/SIP service, not the SDK. • To have REFER sent over TCP (or TLS), configure your SIP trunk/signaling settings on the LiveKit server to use SIP over TCP (port 5060) or SIP over TLS (port 5061). Ensure your upstream SIP provider accepts REFER over that transport. • In your code continue to call the transfer API (for example
transfer_sip_participant(...)
). The SDK call itself stays the same; the server-side SIP trunk configuration determines whether SIP uses UDP, TCP, or TLS. If you want, share your SIP trunk configuration (host, port, protocol setting) or the transfer call and I’ll point out exactly what to change to force TCP/TLS on the server side. Sources: sip | livekit/livekit_composite | DeepWiki | Company directory phone assistant | LiveKit docs | Agents telephony integration | LiveKit docs | Ports and firewall | LiveKit docs