FreeSBC:FreeSWITCH Trunk Configuration:FreeSWITCH Trunk Configuration

From TBwiki
(Difference between revisions)
Jump to: navigation, search
(FreeSWITCH SIP Trunk Configuration)
 
(6 intermediate revisions by one user not shown)
Line 8: Line 8:
 
To configure FreeSWITCH server to work with ProSBC SIP trunk the following changes are required:
 
To configure FreeSWITCH server to work with ProSBC SIP trunk the following changes are required:
  
1. Add '''/etc/freeswitch/sip_profiles/external/prosbc.xml''' file:
+
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:
  
 +
<pre>
 
<include>
 
<include>
 
     <gateway name="prosbc">
 
     <gateway name="prosbc">
 
 
         <!-- To send calls to prosbc: -->
 
         <!-- To send calls to prosbc: -->
 
         <param name="proxy" value="prosbc.telcobridges.com"/>  
 
         <param name="proxy" value="prosbc.telcobridges.com"/>  
Line 21: Line 21:
 
     </gateway>
 
     </gateway>
 
</include>
 
</include>
 +
</pre>
 +
 +
2. To send outbound calls to ProSBC SIP Trunk create '''/etc/freeswitch/dialplan/default/prosbc.xml''' file:
 +
<pre>
 +
<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})$">
 +
            <action application="bridge" data="sofia/gateway/prosbc/$1"/>
 +
        </condition>
 +
    </extension>
 +
</include>
 +
</pre>
 +
 +
3. To accept incoming calls from Telephone Numbers assigned to your SIP Trunk account create '''/etc/freeswitch/dialplan/public/prosbc_inbound_did.xml''' file:
 +
 +
<pre>
 +
<include>
 +
    <extension name="prosbc_did">
 +
        <!-- This example maps the DID 14506558993 to ring 1000 in the default context -->
 +
        <condition field="destination_number" expression="^(14506558993)$">
 +
            <action application="set" data="domain_name=$${domain}"/>
 +
            <action application="transfer" data="1000 XML default"/>
 +
        </condition>
 +
    </extension>
 +
</include>
 +
</pre>
 +
 +
'''Note:''' example above is provided for illustration purposes only. Your actual dialplan will depend on specific FreeSWITCH configuration.

Latest revision as of 03:36, 13 April 2020

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

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})$">
            <action application="bridge" data="sofia/gateway/prosbc/$1"/>
        </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)$">
            <action application="set" data="domain_name=$${domain}"/>
            <action application="transfer" data="1000 XML default"/>
        </condition>
    </extension>
</include>

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

Personal tools