Grandstream Gateway(Model 4104/4108) is a FXO analog gateway and it’s working smoothly with MyPBX, here is a simple guide for the configuration.
Note: In this guide, IP of MyPBX: 192.168.0.1, Gateway 4104: 192.168.0.16
And Grandstream gw will work using trunk mode, all the calls from the pstn lines will reach IVR of MyPBX, and you can dial out from these pstn lines from extensions of MyPBX
Step 1: Log in Grandstream gw with its IP address 192.168.0.16, and you will see this configuration page as Figure 1.
Step 2: Edit Profile 1
Activate Profile: Yes
Profile Name: name of profile, you can design it by yourself, for example: mypbx
SIP server: the IP of MyPBX, in this example: 192.168.0.1
User ID is phone number: No
SIP transport: UDP
Step 3: Click ‘channels’ to edit some settings.
Channel Voice Setting: You can keep the default first, if not, modify it to 4.
DTMF: RFC2833, so please input: ch1-4:2;
SRTP: disable SRTP, input: ch1-4:1;
Click ‘update’ to save the settings and ‘reboot’ to make them take effect
Then the configuration in Grandstream gw side is finished
Step 4: Log in MyPBX, Click ‘trunks’ --->’add service provider’ to create a peer-to-peer trunk to Grandstream gw.
Click ‘save’ and ‘apply the changes’, this trunk will show ‘ok’ in Line status page
Step 5: create outbound route for this trunk in MyPBX side.
Click ‘outbound routes’ to create one, and the content is as Figure 25- 6
Step 6: create a inbound route for this trunk and choose a destination, in this example, IVR is the destination.
Click ‘save’ and ‘apply the changes’ on the web to take effect.