i have created cold sip refer to transfer the call...
# ask-ai
p
i have created cold sip refer to transfer the call from the voice agent to the call center, we created a pcap file to see the traffic, and the call center sent "202 accepted" to the SIP REFER request but the transfer did happen, I looked it up and I found that the call center should sent "NOTIFY SIP", I would like to know more about it within the transfer calls process and how important is it within livekit
t
Thanks for reaching out, Yasser. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hey there! Just wanted to share a bit about the SIP NOTIFY method and why it’s super important in LiveKit’s call transfer process. It basically keeps you in the loop by sending real-time updates about how the transfer is going. So, when you use the
TransferSIPParticipant
API, LiveKit will send NOTIFY requests to let you know if the transfer is successful, still happening, or if something went wrong. These notifications come with status codes—like a 200 status code to celebrate a successful transfer. Your client uses these updates to keep everything running smoothly and manage the call state without a hitch. Without the NOTIFY SIP, it’d be like flying blind, missing out on the feedback you need to confirm the transfer or troubleshoot if needed.
p
what if the call center did sent the notify would this stop the transfer sip refer itself or just stop the monitoring
t
Just a heads-up: sending a NOTIFY SIP request in LiveKit doesn’t actually stop the transfer. It’s more like a way to keep you in the loop about how the transfer is going. The transfer will keep going unless someone cancels it or it finishes based on the NOTIFY responses. Think of the NOTIFY method as a helpful update tool to monitor the transfer’s progress. It won’t interrupt the SIP REFER process unless it signals something like a failure or cancellation. Sources: pkg/sip/inbound.go
p
im using livekit-agents (>=0.12.17,<0.13.0) the transfer sip refer has being sent to the call center but the transfer itself didn't happened just ringing tone until it stops
t
Hey there! If you're running into that tricky issue where the SIP REFER transfer doesn’t quite finish and you just hear a ringing tone in LiveKit agents version >=0.12.17 and <0.13.0, no worries—here’s a friendly step-by-step to help you sort it out: 1. Double-check your SIP Trunk Configuration: Make sure your SIP trunk provider actually supports SIP REFER requests for call transfers. For instance, if you’re using Twilio, you’ll want to have call transfers and PSTN transfers enabled. 2. Look over your API Request Parameters: Take a moment to confirm that the
TransferSIPParticipant
API is set up just right, especially the
transfer_to
parameter and any headers you might need. 3. Peek at the Transfer Handling in Logs: Dive into the LiveKit server logs to spot any errors during the transfer, like hiccups with NOTIFY processing or call state issues. 4. Make sure all NOTIFY Status Codes are Handled: Your SIP client should be ready to handle all NOTIFY responses—whether they’re informational (100-199), success (200), or error codes (4xx/5xx/6xx). 5. Try Testing with Simple, Known Parameters: For testing, keep things straightforward by using a valid
transfer_to
value and the bare minimum configuration. 6. Check Compatibility: Have a look at the LiveKit SIP Transfer documentation to ensure everything lines up with SIP protocol requirements. Hopefully, these tips help you get to the bottom of it! If you want me to walk through any step or need a hand with something specific, just let me know—I’m here to help.
p
SIP Transfer documentation share the resource with me
t
Hey there! If you're looking for the LiveKit SIP Transfer docs, you can check them out right here: LiveKit SIP Transfer Documentation. Let me know if you need any help navigating it! Sources: Transferring calls | LiveKit Docs
p
in transfer_to i have used this structure: phone_number@ip:port and the sip refer is being sent successfully to the call center
t
Hey there! Just a quick heads-up about the
transfer_to
parameter in LiveKit — it works with valid telephone numbers or SIP URIs. Here are the formats we usually see: •
tel:+15105550100
(telephone number format) •
<sip:+15105550100@sip.telnyx>.com
(SIP URI format) •
<sip:+15105550100@my-livekit-demo.pstn>.twilio.com
(SIP URI format) For your format
phone_number@ip:port
, it’s best to add the
sip:
prefix — so it looks like
sip:phone_number@ip:port
. This little tweak helps keep everything running smoothly. If you want, I’m here to help with any formatting questions or if you need tips on specific SIP provider setups. Just give me a shout! Sources: Transferring calls | LiveKit Docs | livekit-agents/livekit/agents/job.py | livekit-protocol/livekit/protocol/sip.py
c
@prehistoric-printer-73777 Hi there Did you fix the issue , i having the same problem.
t
It looks like you're running into a similar issue with SIP REFER transfers. Could you share a bit more about your setup? For example, the LiveKit agent version you're using, how you're formatting the
transfer_to
parameter, and any specific SIP provider settings you have. That way, I can better understand what's going on and help you sort it out.
p
@cold-eve-87123 Yes, the call center it self should build the needed logic for it then give you the URI to use it to transfer the calls from your agent. We still didn't use NOTIFY SIP but everything works (I think it is for logs and monitoring)
t
Thanks so much for sharing your experience! You're absolutely right—the call center does need to have the right logic in place and provide a valid URI to handle call transfers properly. While NOTIFY SIP is mainly for monitoring and status updates, it shouldn’t impact the main transfer process as long as the call center’s logic is set up correctly. If you have any more questions or need a hand with anything else, just let me know—I’m here to help!