Connecting FXO Gateway to Asterisk
Update Time:2018-04-18 16:18:00 Browse Times:2180 Amount Downloads:1004
New Rock’s SIP based VoIP gateways (MX series gateways) with FXO ports are compatible with unified communication solutions, such as Asterisk. In this application note, three popular applications and their related configurations are described, including:
-  Connecting FXO gateway and Asterisk server in the same LAN
-  Enabling DHCP feature on FXO gateway and registering to Asterisk server
-  Directing incoming calls from PSTN to AA system of Asterisk server via FXO gateway

Connecting FXO Gateway and Asterisk  in the Same LAN

In this scenario, New Rock FXO gateway and Asterisk server are in the same LAN.
A static IP address is set on New Rock FXO gateway which is installed with the FXO ports connecting to the PSTN lines.
After the following configurations, the gateway can route the calls from Asterisk server to FXO ports for outbound.

Configuration on FXO Gateway

On Routing > Routing Table page, setup the routing rules for directing call from Asterisk to PSTN via FXO ports in round robin order.


Configuration on Asterisk Server

On extensions.conf file, edit dial plan configuration for Asterisk.
   [default]
   exten   =>_9x.,1,Dial(sip/${EXTEN:1}@192.168.250.99:5060)

Enabling DHCP on FXO Gateway and Registering to Asterisk 

In this scenario, New Rock FXO gateway enables DHCP feature to automatically obtain IP address and other relevant information and registers to Asterisk.

Configuration on FXO Gateway

1. On Basic > SIP page, fill in Asterisk server’s IP address in the Registrar and Proxy Server fields.


2. On Trunk > Feature page, fill in Phone number, Auth User Name and Password fields and enable Registration.


3. On Routing > Routing Table page, setup the routing rules for directing call from Asterisk which start with 9 should be forwarded to PSTN via FXO-1 port and remove prefix 9.


Configuration on Asterisk Server

1. On extensions.conf file, edit dial plan configuration for Asterisk.
   [default]

   exten   =>_9Z.,1,Dial(SIP/trunk1)


2. On sip.conf file, edit SIP configuration for Asterisk.

   [trunk1]

   call-limit=4

   type=friend

   secret=123456

   host=dynamic

   dtmfmode=rfc2833

   qualify=3000

Directing incoming Calls from PSTN to AA system of Asterisk via FXO Gateway

In this scenario, New Rock FXO gateway registers to Asterisk server, and assuming the AA number on Asterisk serve is 8888. The incoming calls from PSTN are directed to AA system of Asterisk via FXO ports and an IVR prompt will be announced to PSTN, then callers on PSTN side can dial extension numbers after they heard the IVR prompt.

Configuration on FXO Gateway

1. On BasicSystem page, select RFC 2833 in the DTMF method field.


2. On Trunk > Feature page, fill in Phone number, Auth User Name and Password fields, enable Registration, select Binding in the Inbound handle field, and fill in the corresponding AA number on Asterisk server in the Number field.


Configuration on Asterisk Server

On extensions.conf file, edit dial plan configuration for Asterisk.

   [default]

   exten => 8888,1,Answer()

   exten => 8888,n(Start),Wait(1)

   exten => 8888,n,Background(welcome.ivr)

   exten => _6XX,1,Dial(sip/${EXTEN})


About New Rock
Corporate Information
Honor
Contact Us
Partner
Partner Benefits
Join the Program
Southeast Asia
North America
News
Latest News
Industry Insights
Announcements
Support
Release & Upgrade
FAQ
Application Notes
Training Materials
Demo
Installation & Maintenance
Others
Videos
Contact Us

 +86 21-61202700
 gs@newrocktech.com
 3F of Building 4, No. 188

       Pingfu Road, Xuhui District,

       Shanghai 200231, China