- Introduction
- Preparation
- Intercommunication between FreePBX and Yeastar S100
- Making Outgoing Calls from FreePBX through Yeastar S100’s Trunks
- Receiving Yeastar S100’s Incoming Call at FreePBX
Introduction
This article provides step-by-step configuration instructions of how to connect FreePBX and Yeastar S-Series VoIP PBX. After connecting FreePBX and Yeastar S-Series IPPBX, you can achieve:
- Making internal calls between FreePBX and Yeastar S-Series IPPBX
- Making outgoing calls from FreePBX through Yeastar S-Series IPPBX’s trunk
- Receiving Yeastar S-Series IPPBX’s incoming calls at FreePBX
In this article, we tested FreePBX13 and Yeastar S100, the two PBX are installed in different places with their own public IP address.
- FreePBX: Version 13.0.70, Public IP:11.11.11.11, Extension Format:9XXX
- Yeastar S100: Version 30.3.0.17, Public IP:22.22.22.22, Extension Format:7XXX
Preparation
Since the two PBX are behind routers, you need to do port forwarding on the routers.
Check the default ports below.
FreePBX
- SIP: UDP 5061
- PJSIP: UDP 5060
- RTP: 46000-48000
Yeastar S100
- PJSIP/SIP: UDP 5060
- RTP: 10000-12000
Intercommunication between FreePBX and Yeastar S100
Configuration on FreePBX
- Log in FreePBX Web interface, navigate to Connectivity > Trunks, click Add Trunk, select Add SIP (chan_pjsip) Trunk from the drop-down menu.
- On the trunk General page, set a name for the trunk.
- Click pjsip Settings tab, set Authentication to None, set SIP Server to Yeastar S100’s IP address, set SIP Server Port to the S100’s forwarded SIP port.
- Click PJSIP Advanced tab, set From Domain to Yeastar S100’s IP address.
- Click Submit and click Apply Config at the top right corner.
- Navigate to Admin > Asterisk CLI, enter command pjsip show endpoints, click Enter Command and check the trunk status, if the status shows “Not in use” and “Avail”, then the trunk is successfully connecting to Yeastar S100.
- Navigate to Connectivity > Outbound Routes, click Add Outbound Route.
- On Route Settings page, set a name for the outbound route, choose the SIP trunk “Yeastar S100”.
- Click Dial Patterns tab, set Match Pattern as 7XXX, which is the same with the Yeastar S100’s extension format in our example.
- Click Submit and Apply Config.
Configuration on Yeastar S100
- Log in Yeastar S100 web interface, navigate to Settings > PBX > Trunks, click Add to add a new trunk.
- Configure the VoIP trunk as the following figure shows.
- Trunk Status: Enabled
- Trunk Type: Peer Trunk
- Provider Name: give the trunk a name.
- Hostname/IP: enter FreePBX’s public IP and forwarded SIP port.
- Domain: enter FreePBX’s public IP.
- Click Save and Apply.
- Go to PBX Monitor, check the trunk status. If the status shows , then the S100 is successfully connected to FreePBX.
- Navigate to Settings > PBX > Call Control > Outbound Route, click Add.
- Configure the outbound route as the following figure shows.
- Name: give the outbound route a name.
- Patterns: set to “9XXX”, which is the same as the FreePBX’s extension format in our example.
- Member Trunks: choose the SIP trunk “Freepbx”.
- Member Extensions: select extensions, the selected extensions will be allowed to call FreePBX’s extensions.
Now, you can test internal calls between Yeastar S100 and FreePBX. For example:
- Use FreePBX’s extension 9000 dial 7099, the extension 7099 will ring.
- Use Yeastar S100’s extension 7099 dial 9000, the extension 9000 will ring.
Making Outgoing Calls from FreePBX through Yeastar S100’s Trunks
In this section, we will show you how to make outgoing calls from FreePBX through Yeastar S100’s trunks. Here we will use Yeastar S100’s FXO trunk (505525306) to make outgoing calls.
- On Yeastar S100, go to PBX Monitor, check if the FXO trunk(505525306) is ready to be used.
- Go to Settings > PBX > Call Control > Outbound Routes, create an outbound route for the FXO trunk(505525306). Here we set Dial Pattern as “9.”, and Strip “1” digit, which means that you need to dial prefix 9 before the destination number. For example, if you want to call number 123456, you need to dial 9123456.
- Go to Settings > PBX > Call Control > Inbound Routes, create an inbound route for FreePBX SIP trunk.
- Name: set a name for the inbound route.
- DID Pattern: set to the same dial pattern of the outbound route in Step2.
- Member Trunk: choose the FreePBX SIP trunk.
- Destination: set to the outbound route in Step2.
- Go to FreePBX Connectivity > Outbound route, edit the outbound route “To-S100”, click to add a dial pattern, set Match Pattern to “9.”.
- Click Submit and Apply Config.
- Test a call from FreePBX extension. For example, call number 123456, you need dial 9123456.
Receiving Yeastar S100’s Incoming Call at FreePBX
In this section, we will introduce how to forward Yeastar S100’s incoming calls to FreePBX. We will forward all incoming calls of FXO trunk (5503306) to FreePBX.
- On Yeastar S100 Web interface, go to Settings > PBX > Call Control > Outbound Route, create a new outbound route. This outbound route will be used to forward incoming calls to FreePBX.
- Name: specify a name for the outbound route.
- Patterns: set to “X.”, which will allow all numbers through this outbound route.
- Member Trunks: choose the FreePBX SIP trunk.
- Member Extensions: choose allowed extensions.
- Click Save and Apply.
- Go to Settings > PBX > Call Control > Inbound Route, create a new inbound route for the FXO trunk (5503306).
- Name: specify a name for the inbound route.
- Member Trunk: choose FXO trunk (5503306).
- Destination: choose the outbound route in Step1.
- Click Save and Apply.
- Edit the FXO trunk (5503306), set a DID Number for the trunk. The DID number is used to match the DID Number in FreePBX’s inbound route.
- Click Save and Apply.
- Go to FreePBX Web interface Connectivity > Inbound Routes, click Add Inbound Route.
- Specify the route name, set the DID Number to the same DID number of the FXO trunk, then set the route destination.
- Click Submit and Apply Config.
- Make a call in the FXO trunk (5503306), the call will be forwarded to FreePBX’s inbound route destination.
2 Comments