If you have 4 IP phones and one FXO gateway in the LAN, and you hope realize the function:
1. the 4 IP phones can call each other.
2. Any calls from the IP phone 1 will go out through FXO 1, any calls form FXO 1 will make IP phone 1 ring directly;
3. Any calls from the IP phone 2 will go out through FXO 2, any calls form FXO 2 will make IP phone 2 ring directly;
4. Any calls from the IP phone 3 will go out through FXO 3, any calls form FXO 3 will make IP phone 3 ring directly;
5. Any calls from the IP phone 4 will go out through FXO 4, any calls form FXO 4 will make IP phone 4 ring directly;
We need to set the IP address of all the IP phones and the gateway as static IP, and the related information is as follows:
The detailed steps are:
1. let us set the IP phone 1, after we set it as static IP, we need to go to VOIP->DIAL PEER, and do the following setting like this:
Because the number of IP phone 1 we set is 801, at this time, we just need to set the routing to the other IP phones and the gateway.
It means when phone 1 dilas 802, the call will be transferred to the IP 192.168.5.22, so the phone 2 will ring, at the same time, and 803 and 804 is the similar rule.
[0,1-7,9]T means when phone 1 dials the number starting with 0,1-7 or 9, the call will be transferred to the gateway(IP 192.168.5.20).
About the phone 2, it is the similar setting, and we just need to set the routing to phone 1 801, phone 3 803, phone 4 804 and the gateway.
About the phone 3, we just need to set the routing to phone 1 801, phone 2 802, phone 4 804 and the gateway.
About the phone 4, we just need to set the routing to phone 1 801, phone 2 802, phone 3 803 and the gateway.
2. Let us set the gateway, after we set the network as static IP 192.168.5.20, please go to Routing->Routing Table.
IP[192.168.5.21] X ROUTE FXO 1
it means any calls from 192.168.5.21 will be transferrd to FXO 1.
FXO X ROUTE IP 192.168.5.21:5060
it means any calls from FXO 1 will be transferred to the IP 192.168.5.21.
Next let us go to Line->Trunk, and input the related information.
here we set the binding number of FXO 1 as 801, FXO 2 as 802, FXO 3 as 803, FXO 4 as 804, and enable the option of Call ID detection.
That is all we need to set.
By the way, we donot need to set the network and dial peer in all the IP phones one by one, and there is another method to simplify the settings.
After we set the phone 1, we can export its config.txt like this:
In the config file, we can change it as what we want, such as IP address, and the dial peer:
after we change it, we need to save it and then import it to the other phone.
so phone 2, phone 3 and phone 4 can be changed the setting through the config.txt.