Connect Yeastar P-Series PBX and Yeastar TG GSM Gateway

This guide provides a configuration example to describe how to extend GSM/3G/4G trunks for Yeastar P-Series PBX system.

Background

The instructions provided in this guide are based on the following test environment.

Table 1.
Equipment Firmware Version IP Address
Yeastar P560 PBX System 37.2.0.81 192.168.6.124
Yeastar TG400 GSM Gateway 91.3.0.21.4 192.168.6.200
There are two SIM cards installed in Yeastar TG400 GSM Gateway. SIM card 1 is provided by carrier A; SIM card 2 is provided by carrier B. The following table shows mobile number prefixes of the two carriers.
Table 2.
Carrier Mobile Prefix
Carrier A 92
12
Carrier B 10

Objectives

This guide provides guidance based on the above scenario to help you achieve following objectives:

Connect Yeastar P560 PBX and Yeastar TG400 Gateway

Follow the steps below to connect Yeastar P560 and Yeastar TG400 via SIP peer trunks. After the two devices are connected, GSM trunks are extended on the Yeastar P560 PBX.

  1. Create a SIP peer trunk on Yeastar P560 PBX.
    1. Log in to the PBX web interface, go to Extension and Trunk > Trunk, click Add.
    2. Configure the trunk basic settings.
      • Name: Enter a name to help you identify it. For example, TG400.
      • Trunk Status: Select Enabled.
      • Select ITSP Template: Select General.
      • Trunk Type: Select Peer Trunk.
      • Transport: Select UDP.
      • Hostname/IP: Enter the IP address of Yeastar TG400 gateway. In this example, enter 192.168.6.200.
      • Port: Enter the SIP port of Yeastar TG400 gateway. In this example, enter the default port 5060.
      • Domain: Enter the IP address of Yeastar TG400 gateway. In this example, enter 192.168.6.200.

    3. Click Save and Apply.
    4. Wait for seconds and check the trunk status on the Trunk page.

      If the status shows , Yeastar P560 PBX is connected to the Yeastar TG400 gateway.

  2. Create a SIP peer trunk on Yeastar TG400 Gateway.
    1. Log in to the gateway web interface, go to Gateway > VoIP Settings > VoIP Trunk, click Add VoIP Trunk.
    2. In the pop-up window, configure the following settings:
      • Trunk Type: Select Peer Trunk.
      • Type: Select SIP.
      • Provider Name: Enter a name to help you identify it. For example, P560.
      • Hostname/IP: Enter the IP address of Yeastar P560 PBX and the SIP port. In this example, enter 192.168.6.124 and the default SIP port 5060.

    3. Click Save and Apply Changes.
    4. Wait for seconds and check the trunk status on the Status > System Status > Trunk Status page.

      If the status shows "OK", Yeastar TG400 gateway is connected to the Yeastar P560 PBX.

Make outbound calls through designated GSM trunks

Many carriers have call plans that let you make free or low-cost calls between other numbers through the same carrier network.

In this scenario, we will route outbound calls through designated GSM trunks as follows:

Table 3.
Outbound Number Format Trunk Carrier
Number with prefix 92 or 12 GSM trunk 1 Carrier A
Number with prefix 10 GSM trunk 2 Carrier B

Follow the instructions below to achieve this objective.

  1. Create an outbound route on Yeastar P560 PBX to allow users reach the Yeastar TG400 gateway.
    1. Log in to the PBX web interface, go to Call Control > Outbound Route, click Add.
    2. Configure the following settings for the outbound route and leave other settings as default.
      • Name: Enter a name to help you identify it. For example, TO-TG400.
      • Dial Pattern: Set the dial patterns according to your needs. In this example, set Pattern to X., which means that users can dial any number without limitation.

      • Trunk: Select the SIP peer trunk that is connected to the Yeastar TG400. In this example, select the trunk TG400.

      • Extension/Extension Group: Select the extensions that are allowed to make calls through this outbound route. In this example, select the all extensions.

    3. Click Save and Apply.
  2. Create an IP to Mobile route on Yeastar TG400 gateway to route outbound calls through GSM trunk 1.
    1. Log in to the gateway web interface, go to Gateway > Route Settings > IP to Mobile, click Add IP to Mobile Route.
    2. In the pop-up window, configure the route.
      • Simple Mode: No
      • Route Name: Enter a name to help you identify it. For example, To-CarrierA.
      • Call Source: Select the SIP trunk that is connected to Yeastar P560 PBX. In this example, select the trunk SPS – P560.
      • DID Number: Enter the pattern or number to match dialed numbers from Yeastar P560. In this example, enter [91]2. to allow the numbers with prefix 92 or 12.
        Note: If you want to match any incoming calls, you need to set DID Number to . (dot), or outbound calls would fail.
      • Call Destination: Select the GSM trunks that will be used to call out. In this example, select the trunk Mobile – Trunk1.

    3. Click Save and Apply Changes.
  3. Create an IP to Mobile route on Yeastar TG400 gateway to route outbound calls through GSM trunk 2.
    1. Log in to the gateway web interface, go to Gateway > Route Settings > IP to Mobile, click Add IP to Mobile Route.
    2. In the pop-up window, configure the route.
      • Simple Mode: No
      • Route Name: Enter a name to help you identify it. For example, To-CarrierB.
      • Call Source: Select the SIP trunk that is connected to Yeastar P560 PBX. In this example, select the trunk SPS – P560.
      • DID Number: Enter the pattern or number to match dialed numbers from Yeastar P560. In this example, enter 10. to allow the numbers with prefix 10.
        Note: If you want to match any incoming calls, you need to set DID Number to . (dot), or outbound calls would fail.
      • Call Destination: Select the GSM trunks that will be used to call out. In this example, select the trunk Mobile – Trunk2.

    3. Click Save and Apply Changes.
  4. Make test calls from a P560 extension.

    Examples:

    • Dial number 921234567, the call will be made through GSM trunk1.
    • Dial number 108192837, the call will be made through GSM trunk 2.

Receive inbound calls through designated GSM trunks

In this scenario, we will route inbound calls through designated GSM trunks as follows:

Table 4.
Format of Incoming Caller ID Trunk Carrier
Caller ID with prefix 92 or 12 GSM trunk 1 Carrier A
Caller ID with prefix 10 GSM trunk 2 Carrier B

Follow the instructions below to achieve this objective.

  1. Create an inbound route on Yeastar P560 PBX to accept incoming calls from Carrier A.
    1. Log in to the PBX web interface, go to Call Control > Inbound Route, click Add.
    2. Configure the following settings for the inbound route and leave other settings as default.
      • Name: Enter a name to help you identify it. For example, From-TG400.
      • DID Pattern:
        • DID Matching Mode: Select DID Matching Mode.
        • Pattern: Enter a DID number. This DID number will be used to match the incoming calls from TG400 gateway.

          In this example, enter 888888.

      • Trunk: Select the SIP peer trunk that is connected to the Yeastar TG400. In this example, select the trunk TG400.

      • Default Destination: Select a destination for the inbound route.

        In this example, set the Destination to extension 2000. When incoming calls from TG400 gateway reach the PBX, the calls will be routed to extension 2000.

    3. Click Save and Apply.
  2. Create an inbound route on Yeastar P560 PBX to accept incoming calls from Carrier B.
    1. Log in to the PBX web interface, go to Call Control > Inbound Route, click Add.
    2. Configure the following settings for the inbound route and leave other settings as default.
      • Name: Enter a name to help you identify it. For example, From-TG400.
      • DID Pattern:
        • DID Matching Mode: Select DID Matching Mode.
        • Pattern: Enter a DID number. This DID number will be used to match the incoming calls from TG400 gateway.

          In this example, enter 999999.

      • Trunk: Select the SIP peer trunk that is connected to the Yeastar TG400. In this example, select the trunk TG400.

      • Default Destination: Select a destination for the inbound route.

        In this example, set the Destination to extension 2001. When incoming calls from TG400 gateway reach the PBX, the calls will be routed to extension 2001.

    3. Click Save and Apply.
  3. Create a Mobile to IP route on Yeastar TG400 gateway to route incoming calls from Carrier A to Yeastar P560.
    1. Log in to the gateway web interface, go to Gateway > Route Settings > Mobile to IP, click Add Mobile to IP Route.
    2. In the pop-up window, configure the route.
      • Simple Mode: Yes
      • Route Name: Enter a name to help you identify it. For example, To-P560.
      • Call Source: Select the GSM trunks that will be used to call out. In this example, select Mobile -- Trunk 1.
      • Call Destination: Select the SIP trunk that is connected to Yeastar P560 PBX. In this example, select the trunk SPS – P560.
      • Hotline: Enter the DID number that is set on the inbound route of Yeastar P560 PBX. In this example, enter 888888.

  4. Create a Mobile to IP route on Yeastar TG400 gateway to route incoming calls from Carrier B to Yeastar P560.
    1. Log in to the gateway web interface, go to Gateway > Route Settings > Mobile to IP, click Add Mobile to IP Route.
    2. In the pop-up window, configure the route.
      • Simple Mode: Yes
      • Route Name: Enter a name to help you identify it. For example, To-P560.
      • Call Source: Select the GSM trunks that will be used to call out. In this example, select Mobile -- Trunk 2.
      • Call Destination: Select the SIP trunk that is connected to Yeastar P560 PBX. In this example, select the trunk SPS – P560.
      • Hotline: Enter the DID number that is set on the inbound route of Yeastar P560 PBX. In this example, enter 999999.

  5. Make test calls to the GSM trunks.

    Examples:

    • The number of GSM trunk 1 is 9218273, when user 9218270 calls to the GSM trunk, the call will be routed to extension 2000.
    • The number of GSM trunk 2 is 1019238, when user 1019239 calls to the GSM trunk, the call will be routed to extension 2001.