# IP-based Configuration

First, begin with adding an IP to your account by logging in to your DIDforSale Customer Portal.&#x20;

Follow this link for steps on how to add an IP to your account :

{% content-ref url="/pages/-LVecbBQ7vvnQ1PnAeOD" %}
[Adding IP Address](/sip-trunking/ip-configuration.md)
{% endcontent-ref %}

Now, login to your 3CX web portal to configure the trunks.

To create a SIP trunks, click on SIP Trunks>Add Sip Trunk. Select country as **Generic** and providers as **Generic** **SIP** **Trunk**. Enter the Main Trunk No as your DID number as shown below and click on OK.

![Add new Trunk](/files/-LWNuXJ6AflMQ1VYwyz3)

![Sip Trunk ](/files/-LWNu_haLyS5axycDE6V)

**Step 2**: In the next window, **add Registrar/Server/Gateway Hostname** or IP as  **66.209.76.70** **and SIP server port** as 5060(which is next to hostname) and **Outbound Proxy** as **term1.didforsale.com**. Under Authentication, select "Do not require-IP based" as **Type** **of** **Authentication,** as shown in the image given below:

<figure><img src="/files/rOqno1zWCUNl317f3rRY" alt=""><figcaption></figcaption></figure>

**Step 3**: After Scrolling Down, select the destination to which the DID number should be forwarded in your 3CX system. You can send the calls to an extension, voicemail, fax or to an external number.

![Sip Trunk General Tab](/files/-LWNuoOYnLRo2kPnNrF9)

**Step 4**: Once the above step is done, scroll to the top of the screen and click OK.&#x20;

![Save the changes, click on OK](/files/-LWNvDTFCcU9L6VQu-bu)

**Step 5**: Let's create a second trunk same way with **Registrar/Server/Gateway Hostname** or IP as 66.209.15.72, **SIP server port** as 5060(which is next to hostname) and **Outbound Proxy as** term2.didforsale.com. Select T**ype** **of** **Authentication** as "Do not require-IP based" as shown in the image below:

<figure><img src="/files/dZlxufAcgjRRMruUTZuT" alt=""><figcaption></figcaption></figure>

**Step 6**: Select the desired destination.

![SIP Trunk2](/files/-LWNvKAjZb1nkZnPlD9J)

**Step** **7**: Scroll up and click on OK.

![Save the changes](/files/-LWNvDTFCcU9L6VQu-bu)

**Routing Outbound Routes**

**Step 8**: The next step is configuring Outbound routes for this trunk. Click on Outbound Rules on the left pane of the window and then click on Add. The window below appears.

![Add new Outbound Rule](/files/-LWNxITB_MnfCqG2GJoL)

**Step 9:** Enter the **Rule Name** as dfs\_out (or anything you want).  For **Calls from extension(s)** enter 000. Under Calls to **Number with a length of** 10 as the number length.

![Make configurations](/files/-LWNxOMowFuHfdITtu39)

**Step 10**: Under Make **outbound calls on,** for **Route 1** Select **Generic SIP Trunk**(the sip trunk you created before). Enter 1 for **Prepend**<br>

![Use Two SIP trunks created to make outbound calls](/files/-LWNxUB29XSxEloonEbX)

**Step 11**: Once everything is done , Scroll up the same window and click on **OK.**

![Save the changes](/files/-LWNxWhRbYs002PxCRdj)

**Routing Inbound Routes**

**Step 12:** Go to the Inbound routes option on the left window. Now, click on Add DID Rule as shown in the figure below:

![Create Inbound Route](/files/-LWNxboTeFGBzlczGkJ3)

**Step 13**: Give any name to this Inbound Rule, say "dfs". Under **Route calls to** option you can route calls as per your requirement to an extension, voicemail, fax or to an external number. Refer the image below for better understanding:

![Configure Inbound Route](/files/-LWNxdXhVk988cnvifo1)

**Step 14**: Scroll up the same window and click on OK.

![Save the changes](/files/-LWNxfas5uJPrF_BN_3y)

For a detailed description of how to add this IP to your DIDforSale account, take a look at this documentation [here](/sip-trunking/ip-configuration.md).

*Hope this document helps. Please reach us for any further queries.*


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.didforsale.com/sip-trunking/sip-trunking/3cx-configuration-guide/ip-based.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
