# How to add Programmability to your existing SIP network

> \[!NOTE]
>
> If you are looking to explore SIP functionality, we recommend following the [SIP Quickstart](/docs/voice/sip/quickstart) to get you up and running in a few clicks!

Are you interested in learning how to make calls using SIP with Twilio programmability? This guide will show you how to use [Programmable Voice](https://www.twilio.com/en-us/voice) to receive SIP inbound phone calls from your SIP infrastructure to Twilio

Twilio Programmable SIP Domain makes it possible to create Enterprise Grade features, contact center feasible functionality in minutes. It's possible to add to programmable logic to your calls to make your business applications more intelligent. Twilio also offers global reach with its rich and reliable PSTN network.

## Steps to make an inbound SIP calls

1. Configure SIP Domain
2. Configure your SIP Endpoint
3. Make an inbound SIP call from Twilio Registered Endpoint

Let's get started!

## Configure SIP Domain

*Note: Step 2.5 and 2.6 are **not** required if you are **not** using Twilio Registered Endpoint.*

To receive SIP traffic from your network you need to configure SIP Domain in Twilio. In this example, we are going to use Twilio Registered endpoint to send SIP traffic to Twilio. Therefore we are enabling [SIP Registration](/docs/voice/api/sip-registration) and associating the credential list.

1. Configure Credential List

   1. Log in to your twilio account go to programmable voice. Select "[credential lists](https://www.twilio.com/console/voice/sip/cls)"
   2. Click the "+" icon to create [credential list.](https://www.twilio.com/console/voice/sip/cls#create-cl)
   3. Add a Friendly Name as `Endpoint`, Username (this can be E164 number, Extension number or name) as `UserA` and Password as `yourpassword` and click Create. Note: The credential username and password created here will be used on your SIP Endpoints for authentication.
2. Configure SIP Domain

   1. Select "[Domains](https://www.twilio.com/console/voice/sip/endpoints)"
   2. Click the "+" icon to create [SIP Domain](https://www.twilio.com/console/voice/sip/endpoints/add).
   3. Add a Friendly Name as `T1` and a unique SIP URI as `Trunk1`. *Note: SIP URI names needs to be unique, I have used Trunk1 in my example. You might have to find a name that is available*
   4. Scroll down to "Voice Authentication" and associate the "Credential Lists" `Endpoint` that you created
   5. Scroll down to "SIP Registration" and click "Enabled"
   6. In "SIP Registration Authentication" associate the "Credential Lists" that you created. Then click "Save"

## Configure SIP Endpoint

SIP Endpoint can be desk phone or soft phone. In this guide, we will use the soft phone and will configure the phone to successfully register to SIP Registrar.

*Note: If you are **not** using Twilio Registered Endpoint then this step is **not applicable** to you.*

1. Download and install SIP Endpoint. [Zoiper](https://www.zoiper.com/en/voip-softphone/download/current) is used for example
2. Provide login name - `UserA@Trunk1.sip.us1.twilio.com` (do add **us1** region parameter to your sip domain) and password

   * Username and password from [Credential List Username](https://www.twilio.com/console/voice/sip/cls)
   * Yourdomain from [SIP Domains](https://www.twilio.com/console/voice/sip/endpoints). For example, `Trunk1.sip.us1.twilio.com` (do add **us1** region parameter to your sip domain while configuring zoiper)
3. Click "Next/continue" to confirm the [Domain](https://www.twilio.com/console/voice/sip/endpoints)
4. Optional settings can be skipped
5. Done! You see in Zoiper that it is "Registered" and has "Tick" next to your login name.
6. You can also verify the successfully registered endpoints under your SIP domain > Registered SIP Endpoints in the Twilio console

![Registered SIP Endpoints search interface with username input and search results.](https://docs-resources.prod.twilio.com/0d5d227a9aa9f8ef60ed0a57ceb9ad87ab73c4cfc5b0bc440f3e48f3f1d84d03.png)

## Make an inbound SIP call from Twilio Registered Endpoint

It is possible to add programmable logic to your call when the call is received by Twilio. For example, we will have the code that greets the caller and make a call to your cellphone.

With Twilio you can make calls only from a verified phone number or from Twilio number. If you plan to use a number other than Twilio phone number, then go to [Verified callerID](https://www.twilio.com/console/phone-numbers/verified) page and click the `+` icon to ensure your number is valid and verified. Great!

We will now write the TwiML for our application. Because this is a static application, we will use a TwiML Bin. Visit the [TwiML Bin](https://www.twilio.com/console/twiml-bins) page and click the `+` icon to add a new bin.

Set the **Friendly Name** as `Greet and call` and copy and paste the TwiML below

```xml
<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Say>Thank you for doing the tutorial. Will now call your cellphone</Say>
  <Dial callerId="+1233451789">+15557650987</Dial>
</Response>

```

> \[!WARNING]
>
> Make sure to add a verified number for **callerId** and **your cellphone number** to dial

Create the TwiML Bin and copy the URL, see below

![TwiML Bin properties showing SID and URL with copy button.](https://docs-resources.prod.twilio.com/f6bd2a04fc02781e0cab45c29df9d73da3b3f4744991160573c264efb4cddccb.png)

With our TwiML Bin created, now we need to wire it up to our SIP Domain.

1. Go to [SIP Domain](https://www.twilio.com/console/voice/sip/endpoints) and click on the domain you created
2. Scroll down to "Voice Configuration" paste the copied URL from above to "Request URL" and click "Save"

![Voice configuration with fields for request, fallback, and status callback URLs set to HTTP POST.](https://docs-resources.prod.twilio.com/9bedd4ff48a279350f00c1ef8df90f2658c480ce2762c5449eb5bd42c9f9c06a.png)

Now go to zoiper SIP client and dial your cellphone. You will hear the greeting in zoiper and it will ring your cellphone. Congratulations, you have made your inbound SIP call!

## Where to next?

Great work!

* [How to route calls to your SIP network with an outbound call](/docs/voice/tutorials/how-to-route-calls-to-your-sip-network)
* [More about Programmable SIP Trunk and its feature](/docs/voice/sip)
* [Pricing](https://www.twilio.com/en-us/voice/sip-interface)

Happy hacking!
