# FreeSWITCH SIP Trunk Creation

## Introduction

This document provides instructions on how to add a SIP Trunk to FreeSWITCH Server to work with the ProSBC. Please visit the following link for more details about [Creating a SIP Trunk in FreeSWITCH Server](https://freeswitch.org/confluence/display/FREESWITCH/Configuring+FreeSWITCH)

## FreeSWITCH SIP Trunk Configuration

To configure FreeSWITCH server to work with ProSBC SIP trunk the following changes are required:

1\. We will use prsbc.telcobridges.com FQDN as a ProSBC server. You can set anything you want. Or you can use ProSBC IP address. Add /etc/freeswitch/sip\_profiles/external/prosbc.xml file:

```
<include>
    <gateway name="prosbc">
        <!-- To send calls to prosbc: -->
        <param name="proxy" value="prosbc.telcobridges.com"/> 
        <!-- Registration is not required for FreeSWITCH on Static IP address -->
        <param name="register" value="false" />
        <param name="username" value=""/>
        <param name="password" value=""/>
    </gateway>
</include>
```

2\. To send outbound calls to ProSBC SIP Trunk create /etc/freeswitch/dialplan/default/prosbc.xml file:

```
<include>
    <extension name="prosbc_outbound">
        <!-- The following line detects outbound calls with a 9 as a dropped prefix -->
        <!-- The line after sends the 8-15 digit numbers to the ProSBC gateway -->
        <condition field="destination_number" expression="^9(\d{8,15})$">
            
        </condition>
    </extension>
</include>
```

3\. To accept incoming calls from Telephone Numbers assigned to your SIP Trunk account create /etc/freeswitch/dialplan/public/prosbc\_inbound\_did.xml file:

```
<include>
    <extension name="prosbc_did">
        <!-- This example maps the DID 14506558993 to ring 1000 in the default context -->
        <condition field="destination_number" expression="^(14506558993)$">
            
            
        </condition>
    </extension>
</include>
```

Note: example above is provided for illustration purposes only. Your actual dialplan will depend on specific FreeSWITCH configuration.


---

# 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://prosbcdocs.telcobridges.com/configuration-details/configuration-by-use-case/sip-trunking-configuration/freeswitch-sip-trunk-creation.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.
