https://retellai.com/?utm_source=discord&utm_medium=seo logo
webRTCHi, quick question: can Retell AI support pu...
# ❓・ai-evy-support
u
@AI Evy webRTC Hi, quick question: can Retell AI support pure WebRTC web-calls directly in the browser (no phone number/Twilio/PSTN involved)? I want users to click a button on my website and talk to the AI agent via the browser mic.
a
Thanks for tagging me @.manthu. I'll look through relevant sources and get back to you shortly.
### Answer Yes, Retell AI does support pure WebRTC web calls directly in the browser without requiring phone numbers or PSTN [(1) ]() . Retell AI has upgraded their audio infrastructure to WebRTC, moving away from the original websocket-based system . All web calls are now on WebRTC . You can create web calls using the Create Web Call API [(2) ]() . Here's the code example for creating a web call:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const phoneNumberResponses = await client.phoneNumber.list() ;
console.log(phoneNumberResponses) ;
The Create Web Call API returns an
access_token
that needs to be passed to your frontend to join the call . There's also a new frontend client SDK specifically for web call users [(1) ]() .
​ To learn more, see the sources I considered: [[1] WebRTC, Call API V2 and Other Improvements](https://www.retellai.com/changelog/webrtc-call-api-v2-and-other-improvements) [[2] Create Web Call](https://docs.retellai.com/api-references/create-web-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Thanks for the follow-up, @.manthu. I'll get back to you soon.
u
@AI Evy When using the pure WebRTC Web Call API (no phone number/Twilio/PSTN), does the configuration work the same way as when creating a phone call? Specifically, can we still define the same settings such as: Prompt type (single vs multiple prompts) Functions / function calling Knowledge base integration Speech settings (voice, language, rate, etc.) And other call-related parameters Or are there differences/limitations between the Web Call API and the Phone Call API?
a
### Answer Based on the API documentation, web calls and phone calls share the same agent-based configuration system [(1) ]() [(2) ]() . Both the Create Web Call and Create Phone Call APIs use the same
agent_id
parameter to specify which agent handles the call . The agent configuration includes all the settings you mentioned: Shared Configuration: - **Prompt types**: Both single and multi-prompt agents work with web calls [(3) ]() - **Function calling**: Custom functions and dynamic variable extraction are supported [(4) ]() [(5) ]() - **Knowledge base integration**: Available for both call types [(6) ]() - **Dynamic variables**: Both APIs support
retell_llm_dynamic_variables
for injecting variables into prompts [(1) ]() [(2) ]() API Differences: The main differences are in the required parameters: Web Call API requires:
Copy code
javascript
{
  agent_id: "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
  agent_version: 1, // optional
  metadata: {}, // optional
  retell_llm_dynamic_variables: {} // optional
}
[(2) ]() Phone Call API requires:
Copy code
javascript
{
  from_number: "+14157774444",
  to_number: "+12137774445", 
  override_agent_id: "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD", // optional override
  custom_sip_headers: {}, // optional
  // plus same metadata and dynamic variables
}
[(1) ]() The speech settings, voice configuration, and other agent parameters are defined at the agent level, not per-call, so they work identically for both web and phone calls [(1) ]() [(2) ]() .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.