https://retellai.com/?utm_source=discord&utm_medium=seo logo
When using the node SDK and client
# ❓・ai-evy-support
m
@AI Evy When using the node SDK and client.call.registerPhoneCall - how can i make sure that it only connects to the latest PUBLISHED version of the bot, and not the draft version?
a
Thanks for tagging me @momsramen. I'll look through relevant sources and get back to you shortly.
### Answer When using
client.call.registerPhoneCall
with the Node SDK, you specify the
agent_id
parameter to connect to a specific agent [(1) ]() [(2) ]() . The registered call will use the agent configuration associated with that
agent_id
[(1) ]() .
Copy code
typescript
const phoneCallResponse = await client.call.registerPhoneCall({
  agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
}) ;
[(1) ]() [(2) ]() The response includes an
agent_version
field that indicates which version of the agent was used for the call [(1) ]() [(3) ]() . However, the available documentation doesn't explicitly detail how to ensure you're connecting to the published version versus a draft version when registering a phone call. I don't have specific information in the sources about controlling published vs. draft versions when using
registerPhoneCall
. I'd recommend checking these potentially useful sources: - [Register Phone Call]() - [SDKs]() Would you like me to provide a general answer based on my knowledge instead? Alternatively, for additional support: - Visit [Contact Sales]() - Visit [)
​ To learn more, see the sources I considered: [[1] Register Phone Call](https://docs.retellai.com/api-references/register-phone-call) [[2] RetellAI/retell-typescript-sdk/api.md](https://github.com/RetellAI/retell-typescript-sdk/blob/main/api.md) [[3] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.