How to Connect FreePBX and Yeastar S-Series VoIP PBX

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

1.png

Preparation

Since the two PBX are behind routers, you need to do port forwarding on the routers.

Note: if you connect Yeastar S-Series IPPBX and FreePBX in local network or via VPN network, you don’t need to do port forwarding.

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

  1. Log in FreePBX Web interface, navigate to Connectivity > Trunks, click Add Trunk, select Add SIP (chan_pjsip) Trunk from the drop-down menu.
  2. On the trunk General page, set a name for the trunk.2.png
  3. 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.3.png
  4. Click PJSIP Advanced tab, set From Domain to Yeastar S100’s IP address.4.png
  5. Click Submit and click Apply Config at the top right corner.
  6. 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.5.png
  7. Navigate to Connectivity > Outbound Routes, click Add Outbound Route.
  8. On Route Settings page, set a name for the outbound route, choose the SIP trunk “Yeastar S100”.6.png
  9. Click Dial Patterns tab, set Match Pattern as 7XXX, which is the same with the Yeastar S100’s extension format.0.png
  10. Click Submit and Apply Config.

Configuration on Yeastar S100

  1. Log in Yeastar S100 web interface, navigate to Settings > PBX > Trunks, click Add to add a new trunk.
  2. Configure the VoIP trunk as the following figure shows.7.png
    • 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.
  3. Click Save and Apply.
  4. Go to PBX Monitor, check the trunk status. If the status shows , then the S100 is successfully connected to FreePBX.8.png
  5. Navigate to Settings > PBX > Call Control > Outbound Route, click Add.
  6. Configure the outbound route as the following figure shows.9.png
    • Name: give the outbound route a name.
    • Patterns: set to “9XXX”, which is the same with the FreePBX’s extension format.
    • 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.

  1. On Yeastar S100, go to PBX Monitor, check if the FXO trunk(505525306) is ready to be used.
  2. 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 Strip1” 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.10.png
  3. Go to Settings > PBX > Call Control > Inbound Routes, create an inbound route for FreePBX SIP trunk.
    11.png
    • 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.
  4. Go to FreePBX Connectivity > Outbound route, edit the outbound route “To-S100”, click  to add a dial pattern, set Match Pattern to “9.”.12.png
  5. Click Submit and Apply Config.
  6. 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.

  1. 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.13.png
    • 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.
  2. Click Save and Apply.
  3. Go to Settings > PBX > Call Control > Inbound Route, create a new inbound route for the FXO trunk (5503306).
    14.png
    • Name: specify a name for the inbound route.
    • Member Trunk: choose FXO trunk (5503306).
    • Destination: choose the outbound route in Step1.
  4. Click Save and Apply.
  5. 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.15.png
  6. Click Save and Apply.
  7. Go to FreePBX Web interface Connectivity > Inbound Routes, click Add Inbound Route.
  8. Specify the route name, set the DID Number to the same DID number of the FXO trunk, then set the route destination.16.png
  9. Click Submit and Apply Config.
  10. Make a call in the FXO trunk (5503306), the call will be forwarded to FreePBX’s inbound route destination.
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.