when i am transferring a call in the agent.py usin...
# ask-ai
s
when i am transferring a call in the agent.py using
Copy code
# Create transfer request
      transfer_request = TransferSIPParticipantRequest(
          participant_identity=participant_identity,
          room_name=room_name,
          transfer_to=transfer_to,
          play_dialtone=False
      )
How does it know the trunk needed for transfer, is it from the ongoing call
t
Thanks for reaching out, Youssef. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You're asking whether the transfer request picks the trunk automatically or if you must specify it. It uses the trunk from the ongoing call. • The
TransferSIPParticipantRequest
identifies the existing SIP participant by
participant_identity
and
room_name
. • LiveKit looks up that participant's session and uses the inbound SIP trunk that established the original call to send the SIP REFER for the transfer. • You do not need to supply a trunk ID in the transfer request. • Ensure your SIP provider supports SIP REFER / call transfers (e.g., Twilio must have Call Transfer / PSTN Transfer enabled). If you'd like, tell me the
participant_identity
and
room_name
you're using (or any transfer failures you're seeing) and I can help debug further. Sources: Call forwarding | LiveKit docs | SIP APIs | LiveKit docs | Agents telephony integration | LiveKit docs