https://retellai.com/?utm_source=discord&utm_medium=seo logo
how to bulk import phone numbers into retell from ...
# ❓・ai-evy-support
v
@AI Evy how to bulk import phone numbers into retell from twilio
a
Thanks for tagging me @Vyyy. I'll look through relevant sources and get back to you shortly.
### Answer To bulk import phone numbers from Twilio into Retell, you'll need to use the Import Phone Number API programmatically for each number [(1) ]() . Here's the process: 1. Set up Elastic SIP Trunking in Twilio [(2) ]() First, create an Elastic SIP Trunk in Twilio and configure: - Termination URI (for outbound calls) - Origination URI pointing to
sip:sip.retellai.com
(for inbound calls) - Authentication credentials or IP whitelisting for Retell's CIDR block
18.98.16.120/30
2. Move your Twilio numbers to the SIP Trunk Transfer the phone numbers you want to use into your Elastic SIP Trunk in Twilio . 3. Import numbers programmatically via API [(1) ]() Use the Import Phone Number API to bulk import. Here's the code example:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: process.env['RETELL_API_KEY'],
}) ;
const phoneNumberResponse = await client.phoneNumber.import({
 phone_number: '+14157774444',
 termination_uri: 'someuri.pstn.twilio.com',
}) ;
console.log(phoneNumberResponse.last_modification_timestamp) ;
For bulk importing, you'll need to loop through your list of numbers and call this API for each one, providing: -
phone_number
in E.164 format -
termination_uri
from your Twilio Elastic SIP Trunk - Optional:
sip_trunk_auth_username
and
sip_trunk_auth_password
if using credential-based auth Each imported number will then appear in your Retell dashboard and can be used for making and receiving calls [(2) ]() .
​ To learn more, see the sources I considered: [[1] Import Phone Number](https://docs.retellai.com/api-references/import-phone-number) [[2] Twilio](https://docs.retellai.com/deploy/twilio) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.