How to connect TG gateway with P-series cloud PBX

1. Introduction

The guide shows how to connect the TG gateway and Yeastar P-Series cloud PBX. 

With the connection of TG gateway and P-series cloud PBX, you can achieve:

  • Make outbound calls from Yeastar P-Series cloud PBX via the GSM trunks of TG gateway directly.
  • Receive calls from GSM trunks of TG gateway at Yeastar P-Series cloud PBX.



Use the firmware version of cloud PBX at least


3. Connect TG gateway and P-series cloud PBX 

3.1  Create an account trunk in P-series cloud PBX

Path: Extension and Trunk>Trunk

  • Select Account Trunk in the Trunk Type


  • Enable the option 'Use User Name as Account Trunk's Authentication Name
  • Save and Apply


3.2  Create an account trunk in TG gateway

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


  • In TG100/TG200/TG400/TG800/TG1600 V2,select Trunk in the Trunk Type



In TG200/TG400/TG800/TG1600 V3,select Register Trunk in the Trunk Type


  • Then fill trunk info from cloud PBX in TG gateway:


  • Save and Apply changes
  • You can check the status in Trunk Status.





4. P-series Cloud PBX Receive Call Through TG gateway  

4.1  Create Mobile to IP Route In TG Gateway

Path:Gateway>Routes Settings>Mobile to IP


  • Simple Mode: No,if you only use one SIM card,you can select Yes.
  • Choose “Simple Mode” to “No”, you will see the advanced settings.
  • Call Source: Mobile—UMTS1. You can select any mobile line or mobile group. Here we select UMTS1 as an example.
  • Call Destination: SIP trunk-cloud PBX. All the calls from UMTS1 will be sent to P-Series cloud PBX via this trunk.
  • Hotline: 9999. This means deliver DID number 9999 to SIP trunk.

4.2  Create an Inbound Route on P-Series cloud PBX

Path: Call Control>Inbound Route




  • Route Name: TG
  • DID Number: 9999. DID number should be same to the Hotline number which you set in TG’s Mobile to IP route.
  • Selected Trunks: TG, which is created on P-Series cloud PBX connecting to TG gateway.
  • Destination: IVR-6200. The call which DID is 9999 will reach the IVR-6200

Note:The call flow is: External number>SIM card>Mobile to IP route>SIP trunk>Inbound route

So if you have many SIM cards in TG gateway,you need to set different Mobile to IP route and corresponding Inbound route based on hotline and DID number.Then the call from different SIM card can be sent to different destinations in cloud PBX.

4.3  Make a Call to P-Series cloud PBX through TG gateway

Now we can test incoming calls for P-Series cloud PBX. If you dial the SIM card number on TG gateway, the call will be routed to the IVR on P-Series cloud PBX.



5. P-series Cloud PBX Call Out Through TG gateway

5.1  Create an Outbound Route on P-Series Cloud PBX

Path: Call Control>Outbound Route



  • Dial Pattern: X.
  • Seleted Trunk:TG(Account Trunk)
  • Seleted Extension you want

5.2  Create IP to Mobile Route In TG Gateway

Path: Gateway>Routes Settings>IP to Mobile


  • Simple Mode: No
  • Choose “Simple Mode” to “No”, you will see the advanced settings.
  • Call Source: SIP trunk-cloud PBX
  • Call Destination: Mobile—UMTS1

If you have want different extension in cloud PBX use different SIM card in TG gateway,you can set the dial pattern like this:


In outbound route,set Pattern 5.


  • Call Destination:which SIM card or group you want to use
  • In IP to Mobile route,set DID Number same as Pattern in Outbound Route
  • Strip: 1,automatically remove the first digit when calling out

In the rule,if you want to call 123456,you can dial 5123456 from extension in cloud PBX,then will call out via this Call Destination in TG gateway.So when you want use this SIM card or group,you can dial 5 in front of the number to be dialed.If you set two digits in the dial pattern,need to set Strip as 2.

You can set many Outbound routes and corresponding IP to Mobile route but all the same source Account Trunk from cloud PBX.

Have more questions? Submit a request


Please sign in to leave a comment.