https://retellai.com/?utm_source=discord&utm_medium=seo logo
What is the logic behind the 20-limit restriction
# ❓・ai-evy-support
a
@AI Evy What is the logic behind the 20-limit restriction? For example, if I call 50 phone call interfaces simultaneously, does Retell schedule a maximum of 20 at a time and then continue until all 50 are completed, or do 20 calls succeed while the other 30 fail? https://docs.retellai.com/deploy/concurrency#understand-concurrency-and-limits
a
Thanks for tagging me @Awezome. I'll look through relevant sources and get back to you shortly.
​ To learn more, see the sources I considered: [[1] Understand concurrency & limits](https://docs.retellai.com/deploy/concurrency) [[2] Debug call disconnection](https://docs.retellai.com/reliability/debug-call-disconnect) [[3] Question on concurrency limits when creating >20 outbound calls at once](https://discord.com/channels/1186424376300679209/1375439800408080505) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
### Answer The 20-limit restriction refers to the number of simultaneous active voice calls that can be handled at any given moment [(1) ]() . Pay-As-You-Go users are allocated a quota of 20 concurrent calls . When you exceed this limit, the additional calls will fail rather than being queued. If you attempt to create more than 20 calls simultaneously, you'll receive a
concurrency_limit_reached
error for calls beyond your limit [(2) ]() . The documentation indicates you should "add a retry with exponential backoff" when this error occurs . You need to implement concurrency checks on your side to manage this limitation [(3) ]() . Retell doesn't automatically queue calls that exceed your concurrency limit - they will fail with the
concurrency_limit_reached
error status [(2) ]() . Each agent within your plan can handle an unlimited number of calls, provided the total concurrency remains within your designated quota of 20 concurrent calls [(1) ]() . If you need additional concurrency, you can upgrade your plan through the Billing page .
a
一个手机号是否可以被多个agent使用吗 @AI Evy
a
Thanks for the follow-up, @Awezome. I'll get back to you soon.
### Answer 基于可用的文档,一个电话号码可以被多个agent使用,但有一些重要的限制和实现方式: ## 入站呼叫的限制 对于入站呼叫,一个电话号码通常需要分配给一个特定的agent [(1) ]() 。如果您想要多语言支持或不同的处理逻辑,推荐的方法是使用**Agent Transfer**功能 [(2) ]() 。 ## 通过Agent Transfer实现多agent功能 Agent Transfer允许您在通话过程中将对话从一个AI agent转移到另一个AI agent 。这提供了几个优势: - **更低的延迟**:agent之间的转换几乎是即时的 - **更好的可靠性**:无需创建新的电话呼叫,避免潜在的电话故障 - **无需交接消息**:目标agent可以访问完整的对话历史 - **无需为agent分配单独的号码**:无论转移到多少个agent,您只需要一个号码 ## 通过入站webhook实现智能路由 您可以使用入站webhook在电话号码级别实现智能路由 [(3) ](

▾

) 。这样,同一个电话号码可以根据来电者的身份将呼叫路由到不同的agent 。 ## 出站呼叫的应用 对于出站呼叫,多个agent可以使用同一个电话号码进行拨出 [(1) ]() 。这在需要不同用例但希望使用统一号码的场景中很有用 。 ## 多状态agent作为替代方案 如果您需要在一个agent中处理多种场景,可以考虑使用多状态agent功能,这本质上相当于多agent系统 。 **
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Clarification on Assigning Multiple Agents to a Single Phone Number](https://discord.com/channels/1186424376300679209/1306563900463906880) [[2] Agent Transfer](https://docs.retellai.com/build/single-multi-prompt/transfer-agent) [[3] Personalization with Airtable](

https://www.youtube.com/watch?v=U8jdhkqOOhE▾

) ​
a
是否可以通过api实现一个电话,用于多个agent通话 @AI Evy
a
Thanks for the follow-up, @Awezome. I'll get back to you soon.
### Answer ### Answer 基于可用的源文档,通过API实现一个电话号码用于多个agent通话是可能的,但需要通过特定的方式实现: ## 电话号码配置 每个电话号码可以配置不同的入站和出站agent [(1) ]() : - `inbound_agent_id`:用于接听入站呼叫的agent ID - `outbound_agent_id`:用于发起出站呼叫的agent ID ## 通过Agent Transfer实现多agent通话 您可以使用Agent Transfer功能在通话过程中转移到不同的agent [(2) ]() 。在实现时需要注意: - 转移到另一个agent时,需要转移到绑定该agent的电话号码 - 必须使用E.164格式的电话号码(例如:+1xxxxxx) - 不能直接使用agent名称进行转移,必须使用绑定agent的号码 ## API实现方式 通过Create Phone Call API创建出站呼叫时 [(3) ]() :
Copy code
javascript
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',
}) ;
console.log(phoneCallResponse.agent_id) ;
## 入站webhook智能路由 您可以通过入站webhook URL实现智能路由,根据不同条件将呼叫分配给不同的agent [(4) ]() : - `inbound_webhook_url`:设置入站webhook,可以覆盖agent ID和设置动态变量 ## 多语言支持 对于多语言场景,社区讨论显示可以通过agent转移实现,但需要注意转移后可能会丢失原始呼叫者号码信息 [(5) ]() 。 **总结**:虽然一个电话号码通常绑定一个主要agent,但通过Agent Transfer功能和入站webhook,您可以实现一个号码服务多个agent的效果。
​ To learn more, see the sources I considered: [[1] Get Phone Number](https://docs.retellai.com/api-references/get-phone-number) [[2] Transferring from one agent to another](https://discord.com/channels/1186424376300679209/1272301375258103840) [[3] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) [[4] List Phone Numbers](https://docs.retellai.com/api-references/list-phone-numbers) [[5] Multilingual Agent (two agents with transfer)](https://discord.com/channels/1186424376300679209/1270169781831602187) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.