

This document is an application note that briefly describes how to connect the GS8 modular gateway to an Asterisk software PBX. The GS8 modular gateway is a gateway that can accommodate interfaces for VoIP (standard SIP), GSM, CDMA, analog FXO, and analog FXS. It can connect any interface to any other interface. In this application note it is used to connect VoIP to GSM.
Please refer to the Data Sheets, Quick Start Guides, and User’s Manuals for both products for further details.
We have an IP network to which an Asterisk IP PBX, several SIP telephones, and a GS8 modular gateway are connected. The connection instructions assume the following information
The typical connection diagram shown in the diagram:

2.1 Log in to the GS8
2.1.1 Ensure the GS8 is properly connected to the network.
2.1.2 Launch a web browser on your PC and enter the default IP address of GS8 http:// 192.168.0.100
2.1.3 Enter user name and password in the log in window. The default user name and password are admin.
2.2 Configuring The IP Address of the GS8
2.2.1 Select Administration | Network settings
2.2.2 After entering all parameters click on SET
2.3 Line Settings
You now configure the parameters that instruct the GS8 where to send the invite packet during a GSM to VoIP incoming call. You also configure the parameters to instruct the GS8 from which IP address the GS8 may receive SIP packets.
2.3.1 Select Line settings | IP Lineand enter the following:
2.3.2 Click on Add
2.3.3 Click on GSMon the left
2.4 Routing Settings
2.4.1 Select Call settings | Route
2.4.2 Enter the routing table. The following parameters have to configured to route GSM call on IP (Asterisk), and IP (Asterisk) call on GSM:
2.4.3 Click on Add
2.4.4 Now add another route GSM to Asterisk
2.4.5 Click on Add
Now add a few lines in the IP PBX configuration for both proper routing of outgoing calls to the GS8 modular gateway and receiving calls coming from the GSM gateway to Asterisk.
3.1 Outgoing Calls
The core of Asterisk connection lies in the file:
/etc/asterisk/extensions.conf
Open this file in your favorite editor and add the following lines:
exten => _Z.,1,Dial(sip/${EXTEN:0}@192.168.1.240)
When you want direct dialling without any prefix, add the country code before Z.
exten => _5Z.,1,Dial(SIP/${EXTEN:1}@192.168.1.240)
exten => _6Z.,1,Dial(SIP/${EXTEN:1}@192.168.1.240)
exten => _7Z.,1,Dial(SIP/${EXTEN:1}@192.168.1.240)
Once you have saved and closed the file, restart Asterisk and from now on all calls starting with country code and number and 5,6,7 should be routed to the GS8 modular gateway.
You can use any pattern.
3.2 Outgoing Calls
The GS8 modular gateway works with SIP, so modify the /etc/asterisk/sip.conf file where the GS8 modular gateway section could look as follows, for example:
type=peer
insecure=very
disallow=all
allow=ulaw
allow=alaw
allow=gsm
context=--------------?
host=192.168.1240
username=GS8
permit=192.168.1.240/255.255.255.255
qualify=yes
canreinvite=no
call-limit=4
The context should be the same as you have written in extensions.conf for the incoming call.
Again, restart Asterisk after saving the file. After that, Asterisk will be ready to receive calls coming from the GS8 modular gateway.