https://retellai.com/?utm_source=discord&utm_medium=seo logo
We use a Retell AI voice agent workflow (question ...
# ❓・ai-evy-support
u
We use a Retell AI voice agent workflow (question nodes, extract variable nodes, function nodes) in a Next.js app with RetellWebClient for web calls. Currently, users can only respond via voice. We want to allow users to type text answers in the same conversation while keeping the same voice agent workflow. Questions: How do we send a text message to an active web call? What API method/endpoint should we use? How do we get the callId or conversationId from an active RetellWebClient web call? Can a voice agent workflow accept text input mid-conversation, and will the extract variable nodes and question flow continue normally? Please provide API documentation or code examples. Thank you. @AI Evy
a
Thanks for tagging me @!. I'll look through relevant sources and get back to you shortly.
### Answer Based on the available documentation, I can answer part of your questions, but the sources don't contain complete information about sending text input to an active voice call. ## Getting the callId from RetellWebClient When you call the [Create Web Call]() endpoint, the response includes the
call_id
. [(1) ]() The response contains: - `call_id`: Unique id of the call, used to identify the call in the LLM websocket and authenticate in the audio websocket - `access_token`: Used to start the call with
RetellWebClient.startCall()
You should store the
call_id
from the create web call response before starting the call:
Copy code
javascript
await retellWebClient.startCall({
  accessToken: createCallResponse.access_token,
}) ;
[(2) ]() ## Sending Text Input Mid-Conversation The available sources do not document a specific API method or endpoint for sending text messages to an active web call. The RetellWebClient SDK documentation shows methods for
startCall()
and
stopCall()
, and events for receiving updates, but does not show a method for sending text input. ## Conversation Flow with Text Input The sources don't explicitly document whether voice agent workflows (question nodes, extract variable nodes) can accept text input mid-conversation and continue the flow normally. --- I'd recommend checking these potentially useful sources for more details: - [Connect to web call]() - [LLM WebSocket]() - [Create Web Call]() You may also want to reach out via [Contact Sales]() or check the [GitHub]() for more information on this specific use case. Would you like me to try providing a general answer based on my knowledge instead?
​ To learn more, see the sources I considered: [[1] Create Web Call](https://docs.retellai.com/api-references/create-web-call) [[2] Connect to web call](https://docs.retellai.com/deploy/web-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
u
"I have a Conversation Flow Agent and want to add text input. Where do I configure the WebSocket URL for text injection?" "Can I use a custom WebSocket with a Conversation Flow Agent, or do I need a different agent type?"
a
Thanks for the feedback, glad I was helpful.
u
"I have a Conversation Flow Agent and want to add text input. Where do I configure the WebSocket URL for text injection?" "Can I use a custom WebSocket with a Conversation Flow Agent, or do I need a different agent type?"