:wave: Anyone experiencing difficulties with SIP ...
# agents
w
👋 Anyone experiencing difficulties with SIP transfers using Twilio and agent 1.2? We have a voice agent that transfers calls to a human, but SIP transfers work 90% of the time, while 10% fail with an error (twirp error unknown: sip status 491: Request Pending).
r
Are you using UDP or TCP?
w
We’re using Livekit Cloud + SIP Trunk from Twilio — I don’t think we can configure the protocol, right? Isn’t it?
r
When you setup your SIP trunk you set the protocol on the Twilio side. Often you will have your sip URI?transport=[udp, tcp]
w
Oh, I see, we’re using it for production:
Copy code
sip:#.sip.livekit.cloud
Without any protocol!! I see that dev env is using
Copy code
sip:#.sip.livekit.cloud;transport=tcp
r
Can you try and switch prod to TCP and see if that fixes your issue?
a
@refined-appointment-81829 does livekit recommend TCP or UDP for SIP trunking with Twilio?
r
TCP
a
@refined-appointment-81829 ok, but im curious on why? UDP protocol is usually recommended for real-time data, and LiveKit itself uses UDP protocol for its SFU servers. Also FYI, following the steps in the current documentation in https://docs.livekit.io/sip/quickstarts/configuring-twilio-trunk/ will result in the creation of a UDP-protocol SIP trunk in Twilio
ah wait this thread is about SIP transfers. Did you mean for the TCP recommendation to be for SIP transfers? Im using SIP for just inbound calls
r
For SIP I would recommend TCP.
a
ah ok, thank you. In that case, I suggest you update the docs in https://docs.livekit.io/sip/. Currently, if you follow the Twilio and Telnyx tutorials, you will end up configuring a UDP SIP trunk
w
@refined-appointment-81829 We have updated it since yesterday, and are still seeing the same # of errors, 419 — request pending
Copy code
TwirpError(code=internal, message=twirp error unknown: sip status 491: Request Pending, status=500, metadata={'error_details': 'CA0SH3NpcCBzdGF0dXMgNDkxOiBSZXF1ZXN0IFBlbmRpbmcaPQoldHlwZS5nb29nbGVhcGlzLmNvbS9saXZla2l0LlNJUFN0YXR1cxIUCOsDEg9SZXF1ZXN0IFBlbmRpbmc=', 'sip_status': 'Request Pending', 'sip_status_code': '491'})