The guide provides step-by-step configuration instructions of how to connect TG gateway and 3CX. The GSM trunk on TG gateway will be extended on 3CX phone system. With the connection you can achieve:
- Make outbound calls from 3CX via the GSM trunks of TG gateway directly.
- Receive calls through GSM trunks of TG gateway at 3CX.
3CX and TG gateway use the Service provider mode to connect with each other.
In the guide, we tested TG400 and 3CX.
IP address of 3CX: http://192.168.9.17:5000
IP address of TG400: 192.168.9.98
Figure 1 Connect 3CX Phone System and TG400
2. Connect 3CX to Yeastar TG400
2.1 Create a VoIP Trunk on TG400
Path: Gateway> VoIP Settings> VoIP trunk> Add VoIP Trunk.
Choose “Service Provider” mode, and fill in 3CX IP address.
Figure 2 Configure the SIP trunk on TG400 to 3CX
Trunk Type: Service Provider
Provider Name: 3CX
Hostname/IP: the IP of the 3CX, 192.168.9.17
After saving and applying the changes, you will see the trunk is “OK” in “Trunk Status”.
Path: Status> System Status> Trunk Status
Figure 3 The status of SIP Trunk on TG400
2.2 Create a VoIP Trunk on 3CX
Path: SIP Trunks> Add SIP Trunk
Figure 4 Configure SIP trunk on 3CX
Select Country: Choose “Generic”
Select Provider in your Country: Choose Generic VoIP Provider
Main Trunk No: Configure the main trunk no you like, but it is at least 4 digits. 8888
Firgure 5 Configure SIP trunk on 3CX
Enter name for Trunk: The name of the sip trunk, TG400
Register/Server/Gateway Hostname or IP: the IP of the TG400, 192.168.9.98
Type of Authentication: Do not require –IP Based
Main Trunk No: the number you configure on the Figure 4, 8888
Destination for calls during office hours: the destination for the office hours. Extension 100
Destination for calls outside office hours: the destination for off work time. Extension 100
You can check the status of the SIP trunk on 3CX after you create it
Path: SIP Trunk> Add SIP Trunk
Figure 6 The status of SIP trunk on 3CX
3. Mobile to IP
In this section, we will configure incoming call to 3CX through Yeastar TG400
Figure 7 Mobile to IP
3.1 Create a "Mobile to IP" Route on TG400
Path: Gateway> Routes Settings> Mobile to IP
Figure 8 Mobile to IP on TG400
Simple Mode: Yes. You can also choose “No” to configure the details like Inbound caller pattern to control the numbers who can call in through the route on TG gateway
Route Name: You can name whatever you want
Call Source: Mobile—GSM1. You can select any GSM line or mobile group. Here we select GSM1 as an example
Call Destination: SPS-3CX. All the calls from GSM1 will be sent to 3CX via this trunk
Hotline: You can enter the number “8888" in this field, which is same with the DID/DDI on 3CX inbound route. And the hotline here is necessary otherwise the call will no route in the 3CX
3.2 Configure the Inbound Route on 3CX
Path: Inbound Rules> Add DID Rules
Figure 9 inbound route on 3CX
Name: you can name it whatever you want
DID/DDI: the DID of the inbound route. Calling party should dial this DID to reach the destination of 3CX
Destination for calls during office hours: choose the destination like call to extension 100
Destination for calls outside office hours: choose the destination like call to extension 100
Now we can test incoming calls for 3CX. If you dial the GSM1 number on TG400, the call will be routed to the extension 100 on 3CX
4. IP to Mobile
In this section, we will configure outbound call from 3CX through Yeastar TG400
Figure 10 IP to mobile
4.1 Create an Outbound Rule on 3CX
Path: Outbound rules> Add
Figure 11 outbound on 3CX
Rule Name: You can name it whatever you want, to_TG400
Calls to numbers starting with prefix: if it is configured which means you need to dial the prefix ahead of your number, in the settings you have to call 6+external number
Call from extension(s): which extension can call from the route, extension 100
Route: choose the SIP trunk, TG400
4.2 Create a "IP to Mobile" Route on TG400
Path: Gateway> Routes Settings> IP to Mobile
Figure 12 IP to mobile on TG400
Simple Mode: Yes
Route Name: You can name whatever you want
Call Source: SPS—3CX, on TG400 call is from 3CX
Call Destination: Mobile—GSM1, call through GSM trunk to the external users
Now we can test outgoing calls from 3CX. If you dial the external number like 13806054321, you have to dial 613806054321 then the call will be routed to the called party. 6 is the prefix on 3CX outbound route.
I have followed this guide to setup a TG400 with 3cx but I am having serious difficulty setting up the 3cx to allow me to select which outgoing line (simcard) i want to call out from. Is there any guide to get this working? I can already recieve calls from all sims routed to my ext but i can only dial out via SIM1 and need to be able to chose between SIM1-4.
Hi Robin. Did you find a solution to this?
The simplest way to do this is to make trunks for every sim card. and route calls from 3cx to match trunk for SIM.
example for TG200:
make 2 trunks to 3CX naming Trunk SIM1 and Trunk SIM2
on 3CX create 2 trunks Trunk SIM1 and Trunk SIM2
Create an outbound rule on 3CX with prefix for choosing
on TG200 create IP to Mobile route
Call source Trunk SIM 1
call destination GSM port 1
Call source Trunk SIM 2
call destination GSM port 2
That's the easiest way.
How do you configure Yeastar TG200 to 3CX on the Cloud?
The same way as on-premise. the only difference is that you need to use public IP's for SIP Trunks and make TG reacheable through the firewall for port 5060 UDP.
All other settings are like in this manual above.
Thank you. I will do so this weekend
I have tg100. I've configured following the guide.
I cal make calls from IP phones to mobiles now.
I've added a 3cx trunk to yeastar and the status is ok, but I do not receive calls to my IP phones(mobile to IP).
Can hear one beep and then hang up. And no any notification on the IP phone. Please help
Hi I configured a tg100 with 3cx as per guide, but I can only receive from tg100 to 3cx. i cant make calls from 3cx to tg100. Thank you