Get Started

Receiving SIP from Twilio

Overview

With Twilio SIP, it’s simple connect to your SIP endpoints from a Twilio app. You can use TwiML or the REST API to initiate SIP sessions into your existing SIP gateways and IP PBXs. Take an inbound phone call and turn into a SIP call with TwiML. If you don’t have an existing phone call, use the REST API to start a new SIP call to your system.

How it works

To receive SIP from Twilio, use the <Sip> noun of the <Dial> verb to initiate a connection to your system. Twilio will send an INVITE to the URI you set in the <Sip> noun and attempt to establish a SIP session. Use this to take any existing phone call in Twilio and route it to your SIP endpoint.

To initiate a SIP connection without having an existing call, you can use the REST API to make SIP calls. This is just like making regular phone calls on Twilio, but instead of passing a phone number to dial, you just pass the URI to which we should send an INVITE.

Getting Started

To start receiving SIP to Twilio, you need to go through these steps:

1. Whitelist Twilio’s SIP and Media IPs on your SIP Endpoint
  • Twilio’s SIP IPs need to be whitelisted by you so that we can send SIP traffic back to your endpoint. You will also need to whitelist port 10000 to 20000 for RTP traffic so that the audio of the calls can reach your system.
2. Start receiving SIP from Twilio
  • Now that Twilio’s IPs are whitelisted in your system, your Twilio app can begin sending SIP traffic to your endpoints. If new to Twilio, it’s best to start out with <Sip> noun of the <Dial> verb for your first app.