how to set up auto_egress to azure on a dispatch r...
# ask-ai
g
how to set up auto_egress to azure on a dispatch rule
t
Thanks for reaching out, Aumesh. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Could you please help me understand a bit more about what you mean by "auto_egress" in this context? Are you talking about automatically exporting data, streaming, or maybe something else? Also, if you have any particular requirements or configurations in mind for Azure, I’d love to hear about them so I can assist you better!
g
automatically exporting audio tracks
t
I'm glad you're looking to automatically export audio tracks to Azure using a dispatch rule in LiveKit! To make this happen smoothly, you'll want to set up Auto Track Egress within the room creation parameters of your dispatch rule. This way, as soon as audio tracks are published, they’ll be exported to Azure automatically—no extra steps needed from your side. Here’s how you can configure Auto Track Egress: 1. Use the
AutoTrackEgress
configuration inside the
room_config.egress
field of your dispatch rule. 2. Provide your Azure Blob Storage details, such as
account_name
,
account_key
, and
container_name
. 3. Create a file path template using variables like
{room_name}
,
{track_id}
, and
{time}
to keep your exported files nicely organized. Here’s an example configuration to guide you:
Copy code
{
  "room_config": {
    "name": "call-{call_sid}",
    "empty_timeout": 30,
    "max_participants": 2,
    "egress": {
      "tracks": {
        "filepath": "recordings/{room_name}/{track_id}-{time}",
        "azure": {
          "account_name": "your-azure-account-name",
          "account_key": "your-azure-account-key",
          "container_name": "your-audio-recordings"
        }
      }
    }
  },
  "dispatch_rules": [
    {
      "rule": {
        "expression": "sip.trunk = 'inbound-trunk'"
      }
    }
  ]
}
With this setup, each audio track will be exported directly to Azure Blob Storage at the path you specify. If you’d like, I’m here to help with any specific configurations or even explore extra features like real-time transcription. Just let me know! Sources: SIP Integration | livekit/livekit_composite | DeepWiki | Docs::Home | protobufs/livekit_egress.proto | livekit-protocol/livekit/protocol/egress.pyi | Auto egress | LiveKit Docs