Client Nexus
12/25/2025, 4:42 PMAI Evy
12/25/2025, 4:42 PMAI Evy
12/25/2025, 4:43 PMAI Evy
12/25/2025, 4:43 PMinbound_agent_id and outbound_agent_id in the same import request. [(1) ]()
The Import Phone Number endpoint accepts these optional body parameters:
- inbound_agent_id (string | null) - Unique id of agent to bind to the number for receiving inbound calls
- outbound_agent_id (string | null) - Unique id of agent to bind to the number for conducting outbound calls
Termination URI Format
The termination_uri parameter uses the Twilio elastic SIP trunk termination URI format.
Per the documentation: "The termination uri to uniquely identify your elastic SIP trunk. This is used for outbound calls. For Twilio elastic SIP trunks it always end with .pstn.twilio.com."
Example format: "someuri.pstn.twilio.com"
Example Request:
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const phoneNumberResponse = await client.phoneNumber.import({
phone_number: '+14157774444',
termination_uri: 'someuri.pstn.twilio.com',
}) ;
console.log(phoneNumberResponse.inbound_agent_id) ;
You can also optionally include sip_trunk_auth_username and sip_trunk_auth_password if your SIP trunk requires authentication.AI Evy
12/25/2025, 4:43 PM