# Connect my Twilio hosted number to Toky

*Confused about prices for Twilio and Toky combined?* [Check here](https://tokyapp.zendesk.com/hc/en-us/articles/360020816477)*.*

#### Configuring the Trunk <a href="#configuring-the-trunk" id="configuring-the-trunk"></a>

* Login to your Twilio account and go to [Elastic SIP Trunking > Trunks](https://www.twilio.com/console/sip-trunking/trunks)

<figure><img src="https://766977813-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMgClsjsTSlUrSU2WhwDe%2Fuploads%2Fgit-blob-3767b38aa2106271acada2d704344dbb2c561166%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

* Create a New SIP Trunk

<figure><img src="https://766977813-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMgClsjsTSlUrSU2WhwDe%2Fuploads%2Fgit-blob-dc9e4e347018a24515c5760be79c62b20bbc3f1d%2Fimage__1_.png?alt=media" alt=""><figcaption></figcaption></figure>

* In the newly created Trunk, go to **Origination**, and click on **Add new Origination URI**

<figure><img src="https://766977813-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMgClsjsTSlUrSU2WhwDe%2Fuploads%2Fgit-blob-b36d08b2b5e9b915c654e0179b78481c869cb0ef%2Fimage__2_.png?alt=media" alt=""><figcaption></figcaption></figure>

* Enter the URI **sip:inbound-us-east.toky.co:5060** ([check here if you are not in the USA](https://tokyapp.zendesk.com/hc/en-us/articles/4402326249873)) in the field, and click on **Add**

<figure><img src="https://766977813-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMgClsjsTSlUrSU2WhwDe%2Fuploads%2Fgit-blob-3805263dad3cbfe6c5e2130fd0c6c828602b2516%2Fimage__3_.png?alt=media" alt=""><figcaption></figcaption></figure>

* Leave the rest of the fields untouched, and the end result should look like this

<figure><img src="https://766977813-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMgClsjsTSlUrSU2WhwDe%2Fuploads%2Fgit-blob-b5bb4f9ddf181b3d726a6fb943769b3f3b9a7296%2Fimage__4_.png?alt=media" alt=""><figcaption></figcaption></figure>

#### Configuring the Numbers <a href="#configuring-the-numbers" id="configuring-the-numbers"></a>

* Go to [Phone Numbers](https://www.twilio.com/console/phone-numbers/incoming)
* Look for the number you would like to connect to Toky, and click on it

<figure><img src="https://766977813-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMgClsjsTSlUrSU2WhwDe%2Fuploads%2Fgit-blob-d0a55bff8736bed922a3b04a4df00bc911816e82%2Fimage__5_.png?alt=media" alt=""><figcaption></figcaption></figure>

* Go to **Voice & Fax**, select **Voice Calls > SIP Trunk**, and select the name of the SIP Trunk you created in the steps above

<figure><img src="https://766977813-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMgClsjsTSlUrSU2WhwDe%2Fuploads%2Fgit-blob-7828e88463fe31c2dc50a9c2a316778dd1fab3e4%2Fimage__6_.png?alt=media" alt=""><figcaption></figcaption></figure>

* If your number supports messaging, create a new webhook pointing to [**https://api.toky.co/internal/sms/notify\_reception/twilio/**](https://api.toky.co/internal/sms/notify_reception/twilio/)

<figure><img src="https://766977813-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMgClsjsTSlUrSU2WhwDe%2Fuploads%2Fgit-blob-916b5293c5d664a1d5251236a3d2fb397fc984cd%2Fimage__7_.png?alt=media" alt=""><figcaption></figcaption></figure>

* Click on **Save**

<figure><img src="https://766977813-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMgClsjsTSlUrSU2WhwDe%2Fuploads%2Fgit-blob-14cfd6c19fcd29da1c984b498e1d884a4ce2082f%2Fimage__8_.png?alt=media" alt=""><figcaption></figcaption></figure>

* Finally, contact our support team after you completed these steps, to enable the calls coming to your number to ring your account.

#### Sending Text Messages from your number

Receiving text messages should already be possible following the steps above, however, for sending texts an extra step is required.

* In your [Twilio Console](https://www.twilio.com/console), get the Account SID and Auth Token

<figure><img src="https://766977813-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMgClsjsTSlUrSU2WhwDe%2Fuploads%2Fgit-blob-96e5c095af307dc933b7760240ba42a2ecbd017c%2Fimage__9_.png?alt=media" alt=""><figcaption></figcaption></figure>

* Send those values to our support team so we can set your number up for sending texts as well.
