Elastic SIP Trunking REST API Reference
Twilio Elastic SIP Trunking is a cloud-based solution that provides connectivity for IP-based communications infrastructure to connect to the PSTN. Using Elastic SIP Trunking you can make and receive phone calls to the rest of the world via any broadband internet connection.
Not an engineer? See our Elastic SIP Trunking product page or talk to our sales team.
Saying "Ahoy, world" is only a few steps away.
Start by configuring your trunk. There you'll learn how to:
- Use the Twilio Console to create a new trunk
- Configure IP Access Control Lists (ACLs)
- Manage the credentials your devices will use to authenticate to your trunk
- Purchase a new Twilio phone number to use with your trunk
You'll also explore features like call recording, secure trunking, disaster recovery URLs, and CNAM lookup.
Once your trunk is ready, check out our guides for connecting your PBX or SBC to your Twilio trunk.
Elastic SIP Trunking's REST API enables you to interact with Trunking resources from your server-side applications.
All Elastic SIP Trunking URLs referenced in the documentation have the following base:
1https://trunking.twilio.com/v12
All Twilio REST APIs are served over HTTPS. To ensure data privacy, unencrypted HTTP is not supported.
Info
You can control your connectivity into Twilio's platform by including your specific edge location in the subdomain. This will allow you to bring Twilio's public or private network connectivity closer to your applications for improved performance.
For instance customers with infrastructure in Australia can make use of the sydney
edge location by using the base URL of:
https://trunking.sydney.us1.twilio.com/v1
To authenticate requests to the Twilio APIs, Twilio supports HTTP Basic authentication. Use your API key as the username and your API key's secret as the password. You can create an API key either in the Twilio Console or using the API.
Note: Twilio doesn't recommend using your Account SID and Auth Token in production. For local testing, you can use your Account SID as the username and your Auth token as the password. You can find your Account SID and Auth Token in the Twilio Console.
Learn more about Twilio API authentication.
1curl -G https://trunking.twilio.com/v1/Trunks \2-u $TWILIO_API_KEY:$TWILIO_API_KEY_SECRET
Here are the resources you will be interacting with via the REST API:
Resource | Description |
---|---|
Trunks | An Elastic SIP Trunk that provides your IP-based communications infrastructure with connectivity to the PSTN. |
CredentialLists | List of Credentials associated with a Trunk to ensure the security/authenticity of your termination traffic. |
IpAccessControlLists | List of IP Access Control Lists associated with your Trunk to ensure the security/authenticity of your termination traffic. |
OriginationURLs | Origination settings of your Trunk will allow you to receive incoming traffic from the PSTN to a Twilio number, delivered to your communications infrastructure. |
PhoneNumbers | List of Twilio Numbers associated with your Trunk to allow you to receive incoming traffic from the PSTN to these Numbers. |
Here's more documentation to help you configure, test, and scale your trunk:
- Configure emergency calling (E911)
- Scaling and limitations
- Testing your trunk
- Troubleshooting your trunk
If you have questions related to pricing, check out our pricing page or you can reach out to our Sales team.