Analog Gateway FXO connect with Freepbx15

This document mainly describes the detailed steps of connecting the analog gateway with Freepbx.

Follow the steps below to configure two-way calls between the phone and the gateway:

  • Outgoing call: from Freepbx SIP extension 3002 to the gateway through relay 1008;

  • Incoming call: call from an outside line to the gateway, through SIP trunk 1008 to Freepbx, and then send the call to the 3002 SIP extension through Freepbx;

 

In the following steps, the parameters below are mandatory configurations, and other parameters can be configured according to your needs.

Step1. Create a SIP Trunk in Freepbx Server

Please login your Freepbx server to create a SIP trunk(1008) .In Freepbx server web, please choose “Connectivity—>Trunks—>Add SIP (chan_sip)Trunk” to set like that:

parameter name

value

parameter name

value

trunk name

1008

host

dynamic

username

1008

fromuser

1008

type

friend

context

from-trunk

Step 2. Create a sip extension named 3002

Create a sip extension named 3002 in webpage “Applications---->Extensions”.

parameter name

value

parameter name

value

display name

3002

secret

3002

 

Step 3. Configure Routings in Freepbx

Outbound routing rules:

parameter name

value

parameter name

value

route name

outbound

trunk

1008

 

Inbound routing rules:

parameter name

value

parameter name

value

description

inbound

DID number

1008

Set destination

Extensions 3002

 

Step 4. Set Network Parameters in Web

Log in to the network in the browser, and click "Network -> LAN Settings" to set your network parameters. The figure below is an example for reference only.

Step 5. Create a SIP Endpoint in Web

Please set SIP trunk. The following figure shows detail information about how to set it.

 

parameter name

value

parameter name

value

name

1008

user name

1008

password

12345678

registration

client

hostname or IP Address

you need to enter your PBX IP. 172.16.2.51

port

The default port of SIP in FreePBX is 5160

About other parameters in SIP, please set by your requirements for there is no need to set them in simple calls.

 

Step 6. Set Routing Rules in Web

Set outbound and inbound routing rules like the following:

Inbound routing rules:

Outbound routing rules:

Please save all your changes to make effect.

 

Step 7. Register a SIP extension by software

Taking advantage of SIP software such as Xlite, eyeBeam to register a SIP extension(3002).

Test call:
Incoming call test: Dial the number of port 1 on the gateway via your mobile to see if 3002 will ring. If 3002 rings, it means your configuration is successful; unless, it means there is something wrong with your configuration, please check it.
Outgoing call test: Dial your mobile number on 3002 extension registered in a software phone. If your mobile rings, it means your configuration is ok; unless, please check your configuration.