Got this error during Cold transfer using 'transfe...
# ask-ai
l
Got this error during Cold transfer using 'transfer_sip_participant':
: TwirpError(code=internal, message=twirp *error* unknown: sip status 491: 491, status=500,
what does this mean?
t
Thanks for reaching out, Deepak. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hey there! That error
TwirpError(code=internal, message=twirp error unknown: sip status 491: 491, status=500)
basically points to a SIP protocol hiccup. To break it down, SIP Status 491 means "Request Pending," which happens when there’s already an ongoing request for the same call or dialog that hasn’t finished yet. Here are some common reasons you might be seeing this: • Trying to transfer the same participant more than once at the same time • Your SIP provider is still working on a previous request • Multiple operations happening simultaneously causing a bit of a race condition • Some quirks specific to your SIP provider’s setup Here’s what you can do to fix it: 1. Make sure you’re not sending multiple transfer requests for the same participant at once. 2. Double-check with your SIP provider that SIP REFER is turned on and set up correctly. 3. Try adding retry logic with exponential backoff for those 491 responses — it helps give things time to settle. 4. Take a look at your SIP provider’s logs to get more clues on why the 491 is happening. 5. Confirm that the transfer destination is formatted right and is reachable. If you’re still stuck after all that, it’s a good idea to reach out to your SIP provider. They can confirm how their REFER implementation works and if there are any special steps you need to follow for call transfers. Sources: agent.py | protobufs/livekit_sip.proto | livekit-protocol/livekit/protocol/sip.py | Agents telephony integration | LiveKit Docs | Agents telephony integration | LiveKit Docs