https://retellai.com/?utm_source=discord&utm_medium=seo logo
h
a
Thanks for tagging me @hintenjoyer. I'll look through relevant sources and get back to you shortly.
### Answer The Register Phone Call API endpoint registers a new phone call for custom telephony [(1) ]() . This is used when you want to connect Retell agents with your own telephony providers through SIP [(2) ]() . Here's what it does: 1. **Creates a call registration**: You send a POST request to
/v2/register-phone-call
with an
agent_id
and other optional parameters [(1) ]() 2. **Returns a call_id**: The API responds with a unique
call_id
that you use to route the call 3. **Enables SIP routing**: You can then dial to the SIP endpoint using the format
sip:{call_id}@5t4n6j0wnrl.sip.livekit.cloud
[(3) ]() The basic JavaScript example shows:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const phoneCallResponse = await client.call.registerPhoneCall({
 agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
}) ;
console.log(phoneCallResponse.agent_id) ;
[(1) ]() Required parameters are
agent_id
and
direction
(inbound or outbound) , while
from_number
and
to_number
are optional but useful for tracking [(3) ]() . This is particularly useful for Method 2: Dial to SIP URI when your telephony provider doesn't support elastic SIP trunking [(2) ]() .
​ To learn more, see the sources I considered: [[1] Register Phone Call](https://docs.retellai.com/api-references/register-phone-call) [[2] Custom Telephony Overview](https://docs.retellai.com/deploy/custom-telephony) [[3] Inquiry about "Dial to SIP Endpoint" method using cURL](https://discord.com/channels/1186424376300679209/1384155437242388633) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Thanks for the follow-up, @hintenjoyer. I'll get back to you soon.
h
@AI Evy what do you mean by register a new phone call. Is this triggering an outbound phone call?
a
​ To learn more, see the sources I considered: [[1] Register Phone Call](https://docs.retellai.com/api-references/register-phone-call) [[2] Custom Telephony Overview](https://docs.retellai.com/deploy/custom-telephony) [[3] Discord message from @jarrad562 on 2024-11-18](https://discord.com/channels/1186424376300679209/1294891368505937952/1308000920935858226) ​
### Answer The Register Phone Call API does not directly trigger an outbound phone call [(1) ]() . Instead, it creates a registration that prepares Retell to handle a call when your telephony system initiates it [(2) ]() . Here's how it works: 1. **Registration only**: The API call creates a
call_id
and registers the call with Retell's system [(1) ]() 2. **Your system makes the call**: You still need to use your telephony provider to actually dial the number 3. **SIP routing**: Once your system dials, it routes the call to Retell using the SIP URI format:
sip:{call_id}@sip.retellai.com
[(2) ]() This is specifically designed for Method 2: Dial to SIP URI in custom telephony setups . When using this method, Retell does not directly make or receive calls, but instead relies on your system to dial the call to the respective SIP URI . For actual outbound calling where Retell initiates the call directly, you would use a different API endpoint (like Create Phone Call) rather than Register Phone Call [(3) ]() . The Register Phone Call API is essentially a "preparation step" that tells Retell "expect a call with this ID and use this agent to handle it" [(1) ]() .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.