bobbyfischer369
07/30/2025, 5:06 PMAI Evy
07/30/2025, 5:06 PMAI Evy
07/30/2025, 5:06 PMjavascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const phoneCallResponse = await client.call.createPhoneCall({
from_number: '+14157774444',
to_number: '+12137774445',
}) ;
The API requires a from_number (your Retell number in E.164 format) and a to_number (the number to call) . You can also use override_agent_id to specify which agent handles the call .
However, the sources don't explicitly describe how to set up a call where one agent calls another agent directly. The API appears designed for calls between phone numbers rather than between agent entities.
For the most accurate information about agent-to-agent calling capabilities, I'd recommend checking these resources:
- Visit [Contact Sales]()
- Visit [)
Would you like a general answer based on my knowledge instead?AI Evy
07/30/2025, 5:06 PMAI Evy
07/30/2025, 5:06 PMbobbyfischer369
07/30/2025, 5:07 PMAI Evy
07/30/2025, 5:07 PMAI Evy
07/30/2025, 5:08 PMfrom_number and to_number are connected to agents in your Retell account [(1) ]() .
Based on the Create Phone Call API documentation, when you make a call, the from_number must be a number you own in E.164 format that's purchased from or imported to Retell . The to_number is the number you want to call .
Each phone number can have both an inbound_agent_id and outbound_agent_id bound to it [(2) ]() . When a number receives an inbound call, it uses the inbound_agent_id . When making outbound calls, it uses the outbound_agent_id .
However, the sources don't specify the exact behavior when calling from one agent-connected number to another agent-connected number within the same account.
For specific information about this scenario, I'd recommend:
- Visit [Contact Sales]()
- Visit [)
Would you like a general answer based on my knowledge instead?AI Evy
07/30/2025, 5:08 PMAI Evy
07/30/2025, 5:08 PMbobbyfischer369
07/30/2025, 5:08 PMAI Evy
07/30/2025, 5:08 PMAI Evy
07/30/2025, 5:08 PMfrom_number would use its assigned outbound_agent_id to initiate the call
2. **Inbound Agent Receives**: The to_number would use its assigned inbound_agent_id to handle the incoming call
3. **Agent-to-Agent Conversation**: Both AI agents would engage in a conversation with each other, following their respective prompts and behaviors
This could create an interesting scenario where two AI agents converse, potentially useful for:
- Testing agent behaviors
- Creating synthetic conversations for training
- Simulating customer-agent interactions for quality assurance
However, this might not be the most practical use case since:
- Both agents would consume resources simultaneously
- The conversation might be unpredictable without specific coordination logic
- It could result in unexpected costs
For production use cases, you'd typically want one agent calling a human, or use this setup specifically for testing and simulation purposes.
Keep in mind this is based on general voice AI system behavior - the actual implementation details would depend on Retell AI's specific architecture and policies.AI Evy
07/30/2025, 5:08 PMAI Evy
07/30/2025, 5:08 PM