This message was deleted.
# ask-ai
s
This message was deleted.
t
Thanks for reaching out, Rahib. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks for reaching out! Could you please share a bit more about what you mean by making an inbound call to LiveKit Cloud? Are you looking to integrate a telephony system, connect a SIP call, or something else? The more details you provide about your use case, the better I can support you. I'm here to help!
I'm here to help you make a call using LiveKit Cloud with your locally running project. Let's walk through the steps together: 1. Set Up Environment Variables: First, create a
.env.local
file and add your LiveKit API key, secret, URL, and SIP outbound trunk ID. Here's an example to guide you:
Copy code
LIVEKIT_API_KEY=your_livekit_api_key
LIVEKIT_API_SECRET=your_livekit_api_secret
LIVEKIT_URL=your_livekit_url
SIP_OUTBOUND_TRUNK_ID=your_sip_outbound_trunk_id
2. Initiate the Call: You have a couple of options to make the call: ◦ LiveKit CLI: Simply run this command: `lk dispatch create \ --new-room \ --agent-name outbound-caller \ --metadata '+15105550100'`Just swap out
+15105550100
with the phone number you want to call, in E.164 format. ◦ Custom Script: Or, if you prefer, you can use a Node.js script to create a SIP participant and start the call programmatically. For example:
npm run start:call <10-digit-us-phone-number>
If you'd like, I’m more than happy to help you set up the SIP trunk or customize how the call behaves. Just let me know! Sources: Making calls using SIP | LiveKit Docs | README.md | packages/rpc-demo/.env.local | README.md
I'm here to help you set up inbound calls to an agent using LiveKit Cloud. Let's walk through the steps together: 1. Set Up an Inbound SIP Trunk: Head over to the LiveKit Cloud dashboard, go to Telephony → Configuration, and create a new trunk with the direction set to Inbound. You'll need to enter the SIP trunk details, including the phone number and authentication credentials from your SIP provider. If you need a hand with this part, just let me know! 2. Create a Dispatch Rule: This is where you define how incoming calls get routed to your agent. Here's an example: `{ "dispatch_rule": { "rule": { "dispatchRuleIndividual": { "roomPrefix": "call-" } }, "roomConfig": { "agents": [ { "agentName": "inbound-agent" } ] } } }`You can apply this rule using the LiveKit CLI or SDK. Feel free to ask if you'd like me to guide you through that process. 3. Start the Agent: Next, start the agent using the LiveKit CLI or your own script. For example, in Python: `python3 agent.py dev`I'm happy to help if you want to see how this works in more detail. 4. Test the Setup: Finally, give it a try by dialing the phone number from your SIP provider. Your call should route to the agent just as we configured. If you'd like, I can provide more detailed guidance on any of these steps. Just let me know how I can support you! Sources: SIP trunk setup | LiveKit Docs | src/setup-livekit.ts | Agents telephony integration | LiveKit Docs | Accepting incoming calls | LiveKit Docs | Accepting incoming calls | LiveKit Docs