Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call transfer via SIP REFER #91

Open
maik-parloa opened this issue May 8, 2024 · 17 comments
Open

Call transfer via SIP REFER #91

maik-parloa opened this issue May 8, 2024 · 17 comments
Labels
enhancement New feature or request

Comments

@maik-parloa
Copy link

I wasn't able to find any documentation/source code reference that enables me to transfer an ongoing call (e.g., in the case of a human handover).

Is transferring a call supported / what would be the steps to extend the current implementation to support SIP REFER use cases?

@justin0mcateer
Copy link

We also need this capability. From reviewing the code, I am quite certain it is not there currently. However, I was wondering what would be the general approach of getting events or RPC commands from the main LiveKit server to the SIP adapter? I was thinking about how we might be able to implement this functionality.

@maik-parloa
Copy link
Author

I'd second this question @justin0mcateer. 👍 Is there a way to send RPC commands from the Livekit Agents to the SIP Gateway? We are also happy to dive into an implementation and open a PR with this capability.

@dennwc
Copy link
Contributor

dennwc commented May 14, 2024

Could you please explain the use case a bit more? Do you want to transfer SIP participant away from LiveKit SIP server? Or you want to switch existing LiveKit SIP participant to a different SIP endpoint?

@maik-parloa
Copy link
Author

The goal is to enable call handovers to Human Agents (e.g. for their existing CCaaS solution). So calls would be transferred to a different SIP URI and the original call would be closed (after the Invite + Refer has been accepted by the target SIP).

@justin0mcateer
Copy link

This is very similar to our use case.

However, in our case we need the SIP leg on LiveKit to survive the 200 OK SipFrag from the third-party. We would remove the participant from the LiveKit bridge by another action.

@dennwc
Copy link
Contributor

dennwc commented May 17, 2024

I'll need to think a bit how to better expose the control API for SIP participants. There were a few similar requests about controlling its behavior (e.g. selective subscription to tracks, etc), so we should define a generic API to send commands. We already have a data channel open for the participant, but using it could be racy (there's a delay between participant creation and data channel coming online). So it should run via our psrpc, probably.

@dennwc dennwc added the enhancement New feature or request label Aug 20, 2024
@ChrisFeldmeier
Copy link

+1 I also need this

@ChrisFeldmeier
Copy link

Twilio has such an transfer API, maybe this can also help you.
https://www.twilio.com/docs/sip-trunking#calltransfer
SCR-20240910-c78

@mdwoicke
Copy link

Has anyone been able to get this to work by chance? I am also looking to do a transfer to a number from a Livekit UI for the purpose of escalating a call to a live agent if they are unable to get the help they need from the virtual agent.

@davidzhao
Copy link
Member

this feature is implemented but we are investigating compatibility & behavior with Telnyx. Docs will be available for it soon

@mdwoicke
Copy link

mdwoicke commented Nov 10, 2024 via email

@parshva-softmaxai
Copy link

this feature is implemented but we are investigating compatibility & behavior with Telnyx. Docs will be available for it soon

That's really great to hear from you. Can we use it using the python SDK once the docs are realised?

@rmonvfer
Copy link

Hello! I'm also very interested in this. We currently use a local VoIP provider that redirects incoming calls to LiveKit's SIP, and then, we connect to the automatically created room via WebRTC (that is, we add an agent to the room and subscribe to the caller's audio track). I would need to be able to redirect the original caller to another SIP or, ideally, a PSTN number.

I've been looking at this for a while but I'm unsure on the best way to achieve this using the current SDKs. Any pointers are very much appreciated.

Thank you!

@rmonvfer
Copy link

rmonvfer commented Nov 15, 2024

Hello again! I don't know if this is new or maybe I missed it but this seems to be what we are all looking for https://docs.livekit.io/sip/transfer-cold/

Edit: it seems like the documentation is still a work in progress and the implementation is only available for nodejs

@mdwoicke
Copy link

mdwoicke commented Nov 16, 2024 via email

@ChrisFeldmeier
Copy link

any updates here? and what is with warm transfer?

@davidzhao
Copy link
Member

davidzhao commented Nov 22, 2024

@mdwoicke Twilio authentication is established during the trunk setup, please refer to the docs on that here. Currently there is a bug with TCP based REFER support. So please use UDP transport on your trunk for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

8 participants