Issue: Track subscription control for inbound &amp...
# telephony
n
Issue: Track subscription control for inbound & outbound SIP participants I create an inbound SIP call, then publish two local tracks via the Agent: •
Inbound_Local_Track
•
Outbound_Local_Track
After that, I add an outbound SIP participant using
ctx.add_sip_participant
in the same room. Expected: • Inbound participant subscribes only to
Outbound_Local_Track
• Outbound participant subscribes only to
Inbound_Local_Track
Working: Unsubscribing tracks for the inbound participant using
lk.room.update_subscriptions
works as expected. Problem: The same
update_subscriptions
call does *not work for the outbound SIP participant*—it still receives unwanted tracks. Is there any limitation with SIP participants added via
ctx.add_sip_participant
, or a recommended way to enforce one-way track subscriptions between inbound and outbound SIP participants?
Hey @refined-appointment-81829 @lively-winter-88668 can you pls help me with above issue i am facing
r
Sorry, I do not understand. What is your usecase?
n
Use Case Real-time bilingual translation for SIP calls via Twilio and LiveKit: - UserA (Spanish) calls Twilio number - Twilio routes to LiveKit via SIP trunk - LiveKit dials outbound call to UserB (German) - Translation bot mediates communication in both directions Expected Flow UserA → UserB: - Bot subscribes to UserA's microphone track - Bot processes: STT (Spanish) → Translate → TTS (German) - Bot publishes translated German audio as new track - UserB subscribes only to translated track UserB → UserA (vice versa) Requirements - Each SIP participant should only hear translated audio - Original microphone tracks must not be audible to other participants - Need strict track subscription control to prevent cross-subscription Current Issue Symptom: - UserB → UserA direction works correctly (UserA hears only translated Spanish) - UserA → UserB direction fails: UserB hears BOTH translated German AND UserA's original Spanish audio - This persists despite explicitly unsubscribing UserA's microphone track from UserB Suspected Root Causes: 1. Twilio native audio bridging: Since Twilio sees two active SIP call legs (inbound from UserA + outbound to UserB), it may be automatically bridging audio between them at the media layer, bypassing LiveKit's subscription control 2. Unsubscribe logic issue: Track unsubscription may not be executing properly or at the right time
hey @refined-appointment-81829 pls help me to resolve issue
+ @lively-winter-88668
can you pls help here @refined-appointment-81829 @lively-winter-88668 How can i resolve this issue
r
I don't have a direct example that does what you are asking for. I've seen this sort of request before and I know several folks have built similar but I don't have a ready made example that demonstrates how to do this. I will add this to the list of cool demos to make for next year.