You are on page 1of 12

How to Connect FreePBX to Yeastar TA

FXO Gateway

Sharon Chen
August 23, 2018 06:04
Follow

1. Introduction
The guide shows how to connect FreePBX phone system to TA FXO gateway via SIP
trunk. With the connection of TA FXO gateway and FreePBX phone system, physical
trunk PSTN will be extended on FreePBX phone system.

The following features can be achieved:

1. Make outbound calls from FreePBX via the PSTN trunks of TA FXO gateway.
2. Receive calls from PSTN trunks of TA FXO gateway at FreePBX.

Integration Mode:

FreePBX and TA FXO gateway are connected with Service provider mode (SPS trunk)

Firmware version:

In the guide, we tested TA410 and FreePBX phone system

TA410: 41.19.0.23

FreePBX: 10.13.66

Description:

IP address of FreePBX: 192.168.9.91

IP address of TA410: 192.168.9.90

A PSTN line from provider is connected to TA410’s FXO port1

PSTN number: 05925503301


Figure 1 Connect FreePBX Phone System and TA FXO gateway

2. Preparation

All the TA FXO gateway attempts to contact a DHCP server in your network to obtain
valid network settings (e.g., the IP address, subnet mask, default gateway address and
DNS address) by default except TA410 and TA810.

Steps to set static IP for TA FXO gateway:

1. Download a DeviceFound tool from Yeastar website: FindTA.rar


2. Run the DeviceFound.exe software.
3. The detected TA devices in the local network will appear in the window.
4. Find the TA device`s IP address by the device`s MAC address or the SN.
5. Log in TAO gateway and go to System> Network Preferences> LAN Settings,
disable DHCP and configure the LAN network, save and apply the changes,
reboot TAO gateway to take effect.

* In TA410 and TA810, the IP is 192.168.5.150 in the factory default. In the guide you
could just go to System> LAN Settings and configure your own IP.
Figure 2 Configure LAN Settings on TA FXO gateway

3. Connect FreePBX to TA410

3.1 Create a SIP Trunk on FreePBX

Step 1: Add a SIP (chan_pjsip) Trunk to TA410

Path: Connectivity> Trunks> Add Trunk> Add SIP (chan_pjsip) Trunk

Fill in the IP of TA410 in the “SIP Server” and “From Domain” field.
Figure 3 Configure SIP trunk on FreePBX
Trunk name: TA410

SIP Server: the IP of the TA410, 192.168.9.90

SIP Server Port: the default port 5060, if you want to change the port, it means the
FreePBX provide the port for other devices to register to it.

From Domain: the IP of the TA410, 192.168.9.90

Click “save” and “Apply change”, please check the status of the trunk, it shows “Avail”
and “Not in use”

Path: Admin> Asterisk CLI> CLI commend> execute “pjsip show endpoints”

Figure 4 Check the status of the SIP trunk to TA410 on FreePBX


3.2 Configuration on TA410

Step 1. Set a VoIP Server Template on TA410

Path: Gateway> VoIP Settings> VoIP Trunk> Add New Trunk

Figure 5 create a service provider trunk on TA410

Trunk Type: Service Provider

Type: SIP

Provider Name: FreePBX

Hostname/IP: fill in FreePBX IP address, 192.168.9.91

Domain: fill in FreePBX IP address, 192.168.9.91

After we create the trunk we can check the status of the trunk, it shows OK.

Path: Status> Port/Trunk Status

Figure 6 check the status of the SPS trunk to FreePBX on TA410


4. IP to Port

In this section, we introduce how to achieve making outbound calls from FreePBX
through PSTN line on TA410.

Figure 7 IP to Port

Step 1. Create one outbound route on FreePBX.

Path: Connectivity> Outbound Routes> Add Outbound Route


Figure 8 Configure a outbound route on FreePBX

Route Name: Name of the outbound route

Trunk Sequence for Matched Routes: choose the trunk you want to use in the
outbound route, TA400
Dial Patterns: if you configure the prefix, it means that you should dial the number
after the prefix. Match patterns means the number you dial should match it. For
example, the prefix is 9 and match pattern is X. and the number is 5503300, when dial
out, please dial 95503300.

Step 2. Configure “IP to Port” Route on TA410.

Path: Gateway> Routes Settings> IP->Port> Add IP->Port Route

Leave all the default settings on this page or you can change the Simple Mode to “NO”
to configure the DID number if you to manage the call. And choose the source as SPS
trunk with FreePBX and the destination is the PSTN line.

Figure 9 Configure IP to port on TA410

Route Name: from_FreePBX

Call Source: choose the source of the call. For example: FreePBX

Call Destination: choose which PSTN trunk been chosen to dial out. For example:
FXO1

Step 3. Test a call from FreePBX

Now, you can use FreePBX phone system’s extension to make external calls through
the PSTN 1 on TA410. Do not forget to add digit 9 before the called number cause
prefix is set to 9 on FreePBX outbound route. For example, if you want to call
15880270600, you need to dial 915880270600
5. Port to IP

In this section, we configure incoming calls to FreePBX through PSTN trunk on


TA410.

Figure 10 Port to IP

Step 1. Create an inbound route on FreePBX.

Path: Connectivity> Inbound Routes> Add Inbound Route

Figure 11 Inbound Route on FreePBX Phone System


Description: the name of the inbound route, from_TA410

DID Number: if the trunk want to pass the DID on the incoming calls, please configure
888

Set Destination: choose the destination of the inbound route. Extension 300

Step 2. Configure “Port to IP” Route on TA410

Path: Gateway> Routes Settings> Port->IP> Add Port->IP/Port Route

Choose Simple Mode to “No” and set Hotline to 888, which is the same number with
the DID number set on FreePBX Inbound route

Figure 12 Port to IP on TA410

Route Name: to_FreePBX

Call Source: choose the source of the call. For example: Port-FXO1
Call Destination: choose which PSTN trunk been chosen to dial out. For example:
FreePBX

Hotline: the hotline number should be the same as DID in the inbound route of
FreePBX side

Step 3. Test a call.

Dial the PSTN trunk number 05925503301 on your cell phone, the call will be routed to
FreePBX extension 300