How to identify the source when receiving transferred calls

This question originally came up in our Slack community and the thread has been consolidated here for long-term reference.

A number is transferring calls to our AI agent and sending the original caller ID. Is there a way to know where the call was transferred from given there can be multiple sources?

Caller ID alone isn’t enough for reliably identifying transferred calls.

You’ll need one of these approaches:

  1. Custom SIP header - The upstream system passes source info in a custom header. LiveKit can read custom SIP headers as participant attributes when the SIP leg joins.

  2. Separate DIDs/trunks per source - Use different phone numbers or trunks for each transfer source.

  3. Provider-level metadata - Some providers include additional metadata about the transfer source.