FreeSBC:FreeSWITCH Trunk Configuration:FreeSWITCH Trunk Configuration
From TBwiki
(Difference between revisions)
| Line 31: | Line 31: | ||
<condition field="destination_number" expression="^9(\d{8,15})$"> | <condition field="destination_number" expression="^9(\d{8,15})$"> | ||
<action application="bridge" data="sofia/gateway/prosbc/$1"/> | <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 442038139810 to ring 1000 in the default context --> | ||
| + | <condition field="destination_number" expression="^(442038139810)$"> | ||
| + | <action application="set" data="domain_name=$${domain}"/> | ||
| + | <action application="transfer" data="1000 XML default"/> | ||
</condition> | </condition> | ||
</extension> | </extension> | ||
</include> | </include> | ||
</pre> | </pre> | ||
Revision as of 03:31, 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 442038139810 to ring 1000 in the default context -->
<condition field="destination_number" expression="^(442038139810)$">
<action application="set" data="domain_name=$${domain}"/>
<action application="transfer" data="1000 XML default"/>
</condition>
</extension>
</include>