How to setup Ozeki VoIP GSM Gateway for Asterisk PBX

Ozeki VoIP GSM Gateway is an ideal product to connect Asterisk PBX to the GSM network. Ozeki VoIP GSM Gateway allows you to send and recieve high-quality GSM voice calls SMS messages via up to 4 GSM channels. The correct settings enables seamless connection between the GSM network and VoIP network.

Installation

  1. What you need
  2. Opening the box
  3. Connecting the DC Adapter and a SIM card to each other
  4. Connecting the Ozeki VoIP GSM Gateway to a computer
  5. Network settings in the Ozeki VoIP GSM Gateway
  6. SIM Card Settings in the Ozeki VoIP GSM Gateway
  7. SIP Settings in the Ozeki VoIP GSM Gateway
  8. Dialing rules in the Ozeki VoIP GSM Gateway
  9. Settings in the Asterisk PBX
  10. Video tutorial about how to connect Ozeki VoIP GSM Gateway to Asterisk PBX

1. What you need

In order to make calls from the Asterisk PBX through a GSM network you need to connect the Ozeki VoIP GSM Gateway and the Asterisk PBX together and you need to insert a SIM card into the Ozeki VoIP GSM Gateway. In the Figure 1 you can see the accessories:

  • SIM card: It is used to provide a connection to a GSM service provider. You can buy it directly from a GSM service provider.
  • Ozeki VoIP GSM Gateway: It is a device that is used between the GSM network and the Asterisk PBX. It is a gateway that allows you to make calls toward the Public Switched Telephone Network from the VoIP phone network. You can order it directly from Ozeki with delivery times of 2-3 weeks.
  • Asterisk PBX: It is an IP phone system for Linux operating system. It allows you to make calls toward the GSM network with the help of Ozeki VoIP GSM Gateway.

sim card ozeki voip gsm gateway and asterisk pbx
Figure 1 - SIM Card, Ozeki VoIP GSM Gateway and Asterisk PBX

2. Opening the box

After you have got the Ozeki VoIP GSM Gateway package, first unpack the box. In the Figure 2 you can see the box that you should get.

ozeki voip gsm gateway package
Figure 2 - Ozeki VoIP GSM Gateway package

The Figure 3 shows the opened package with its content.

opened box
Figure 3 - The opened box

After you have taken the accessories out of the box, you should check them. The Figure 4 shows what you can find in the box (from right):

  • 1× Ozeki VoIP GSM Gateway
  • 1× DC Power Adapter
  • 1× Ethernet cable

In addition you can see a mini-SIM card (25.00 mm × 15.00 mm × 0.76 mm) that will be inserted into a SIM card slot (Figure 4 on the left).

contents of package and mini sim card
Figure 4 - The contents of the package and a mini SIM card


3. Connecting the DC Adapter and a SIM card to each other

After you have checked the content of the package, you need to connect the Ozeki GSM Gateway to a plug, to the computer network and you need to put one-four SIM card(s) into the device.

The Figure 5 shows the slots where the SIM cards and the DC adapter have to be plugged.

  • The DC adapter is plugged into the rightmost connector that is signed with a DC12V label.
  • The SIM cards are plugged into the slots which are located between the Channel 1-4 labels and the antennas. The chip on the SIM card has to see up when you put it into the slot.

dc adapter and sim card slots while sim card out
Figure 5 - DC adapter and SIM card slots while sim card out

After you have inserted the SIM cards into the slots you need to push it while a click is not listened (Figure 6).

dc adapter and sim card slots while sim card in
Figure 6 - DC adapter and SIM card slots while sim card in


4. Connecting the Ozeki VoIP GSM Gateway to a computer

If the SIM card and DC adapter have been plugged, you need to connect the Ozeki GSM Gateway to a computer to set the IP address of the device.

To connect a gateway and a computer to each other you need to use a straight-through Ethernet cable (the yellow cable on Figure 7). One of the ends of the cable has to be plugged into the Ethernet port of the computer and the other has to be plugged into the PC port of the Ozeki VoIP GSM Gateway.

connecting ozeki voip gsm gateway to a pc
Figure 7 - Connecting the Ozeki VoIP GSM Gateway to a PC

Now you can configure the Ozeki VoIP GSM Gateway in a web browser.

By default the IP address of the gateway’s PC port is 192.168.8.1. To reach the graphical user interface of the device you need to set an IP address on the Ethernet port of the computer that is in the same network. The IP address of the PC can be from the range of 192.168.8.2 – 192.168.8.254.


5. Network settings in the Ozeki VoIP GSM Gateway

Open a web browser, such as Internet Explorer and enter http://192.168.8.1 in the address bar. Then the login page is popped up (Figure 8) to give the username in the User Name and password in the Password field (root username: admin; root password: admin).

login to ozeki voip gsm gateway
Figure 8 - Login to Ozeki VoIP GSM Gateway

After you have clicked on the Ok button, the Status page will be loaded. To set the IP address of the gateway, click on the Configurations and Network links. The Figure 9 shows what you need to set on the LAN port:

  • LAN port mode: Static IP.
  • IP address: An address from the network to which you would like to connect the gateway.
  • Subnet mask: The proper mask that belongs to the connected network.
  • Default route: The IP address of the default gateway. This is the IP address of that router’s interface which is connected to the local computer network.
  • Primary DNS: The IP address of the domain name server that is responsible for assigning the IP addresses and the domain names.

network settings
Figure 9 - Network settings

Then click on the Save Changes and follow the below instructions:

  • Connect the gateway to the local computer network through the LAN port of the device (Figure 10).
  • Disconnect the computer from the gateway and connect it back to the local computer network.
  • Set the IP address of the computer back.

connecting gateway to local computer network
Figure 10 - Connecting the gateway to the local computer network

After doing these settings, you can configure the Ozeki VoIP GSM Gateway from any computer in the same computer network. Just type the previously set IP address to the web browser, give the login data and you can configure it from anywhere.


6. SIM Card Settings in the Ozeki VoIP GSM Gateway

After you have inserted the SIM card into the device, you need to add the phone number and unlock code (PIN code).

Click on the Call Management link under the Configurations menupoint on the left side of the web page (Figure 11).

On the right side of the web page, find the SIM Card Parameters and click on it. On the loaded section, give the following data:

  • SIM Card Number textbox: GSM phone number that belongs to the SIM card.
  • Unlock PIN textbox: PIN code that belongs to the SIM card.

sim card settings
Figure 11 - SIM card settings


7. SIP Settings in the Ozeki VoIP GSM Gateway

To connect the gateway to the phone system, choose the VoIP menupoint from the menu on the left side (Figure 12).

On the right side of the page the configuration page will be loaded. You need to choose the Config by Line configuration mode, where you can connect every line (Line 1-4) to the Ozeki Phone System by giving the following data:

  • Phone Number: This parameter is used to set the telephone number of the line. The telephone number is a unique ID that is served by the Ozeki Phone System.
  • Display Name: It can be anything.
  • SIP Proxy: This parameter is used to set the address of the SIP proxy server. If the SIP proxy server uses the special port (other than the SIP default port 5060), you can add the detailed port number at the end of the IP address or domain name of the proxy server. For example, 192.168.2.26:3000 or pbx.com:3000.
  • SIP Registrar Server: This parameter is used to set the IP address or domain name of the SIP registration server. You can use the same method for setting a port number than in case of a SIP Proxy.
  • Outbound Proxy: This parameter is used if the server has a private address. In that case you need to type that IP address or host name.
  • Home Domain: This parameter is used for the domain management host of the SIP (a host that provides the SIP service).
  • Authentication ID: This parameter is used for the authentication process. The same value will also be registered in the Ozeki Phone System XE.
  • Password: This parameter is used for the authentication process. The same value will also be registered in the Ozeki Phone System XE.

sip settings
Figure 12 - SIP Settings

After you have filled every texbox, click on the Save Changes button. If you use more than one SIM card, you need to set the Line 2, Line 3 or Line 4 as well.

If you have set the phone lines under the VoIP menupoint, you need to give the same values in the Asterisk PBX as well. For more information, see the chapter 8.


8. Dialing rules in the Ozeki VoIP GSM Gateway

The Ozeki VoIP GSM Gateway supports number dialing by rules. To use a dial plan, choose the Call Management option in the left menu (Figure 13).

call management
Figure 13 - Call Management

In the Call OUT via GSM and Call IN via GSM sections you can set the followings:

  • Forward Number: In case of an outgoing call the phone calls will be forwarded to the given phone number. Or if a call is incoming the given extension will be ringing in the connected VoIP network.
  • Dial Plan textbox: In case of an outgoing call you can add a rule for the destination phone number. It can be necessary if a call is coming from the PBX, and a prefix was used in front of the phone number. In this case the rule will remove the prefix from the front of the number. For example:
  • The prefix is 82 and the destination 0036301234567. This means that the called number is 820036301234567.
  • Dial plan: 82:-82
  • Using this dial plan, the 82 prefix will be removed from the front of the phone number, so the 0036301234567 phone number will be called.

Format of Dialing Rules

  1. You can specify multiple rules, which are separated by the delimiter „|?. For example, “00:-00|0:-0+86|:+86755”.
  2. The number is matched from the left of the dialing rules to the right. When the number matches the correct rule, the number stops matching. Otherwise, the number continues to match the next rule.
  3. The rule format is “AA:-aa+bb”. Where, “AA” indicates the number to match and “-aa+bb” indicates detailed actions to be taken on the number. If the number is successfully matched, “aa” is deducted and “bb” is added. If the number fails to match, the number continues to match the next rule.
  4. You can specify a range for matching of dialing rules. The rule format is “[A-B]A:-aa+bb” or “A[A-B]:-aa+bb”. For example, you can specify the range of numbers beginning with 2 to 8 as “[2-8]: -aa+bb” or numbers beginning with 13 to 15 as “1[3-5]: -aa+bb”.

9. Settings in the Asterisk PBX

After you have set the Ozeki VoIP GSM Gateway, you need to add a new SIP Extension and a new Dial plan in the Asterisk PBX in order to connect the two devices to each other.

First open the Linux that you are using and login with your username and password (Figure 14).

linux login
Figure 14 - Linux login

First add a new SIP extension with the same data that you have given in the Ozeki VoIP GSM Gateway. First open the sip.conf file of the Asterisk VoIP server with an optional text editor. For example you can use the nano text editor that is shown in the Figure 15.. You can find the sip.conf in the /etc/asterisk/ folders.

sip conf opening command
Figure 15 - Sip conf opening command

Figure 15 shows what you need to give to connect the Asterisk PBX to the Ozeki VoIP GSM Gateway.

sip conf settings
Figure 16 - Sip conf settings

The save the file. If you use the nano editor, you can save the file with pushing the Ctrl+y together. Now open the extensions.conf to add a new dial plan. You can find the extensions.conf in the /etc/asterisk/ folders.

extensions conf opening command
Figure 17 - Extensions conf opening command

In the Figure 18 you can see how you can add new dial plans for the Asterisk PBX. In the following cases the calls will be forwarded on that SIP extension (11) which belongs to the Ozeki VoIP GSM Gateway. The _11 is a prefix. The X indicates the numbers of the dialed phone number.

For example if the dialed number is 1106302225588, the 11 indicates a prefix. It means that the call will be forwarded on the 11 extension, and the 06302225588 phone number will be the destination phone number.

new dial plan
Figure 18 - New dial plan

After the configuration is read, restart the Asterisk server and then open it (Figure 19). In addition you can increase the verbosity level when you connect to the Asterisk CLI from the Linux prompt, by using one or more -v parameters to the asterisk application. For example, this would connect to the Asterisk CLI and set the verbosity to three, because we added three -v parameters:

asterisk restarting and opening
Figure 19 - Asterisk restarting and opening

In the Figure 20 you can see a call report on the Asterisk command line interface. You can see that the destination of the call is 11201 which means that the call will be forwarded on the 11 SIP extension.

asterisk sip calling
Figure 20 - Asterisk SIP calling

10. Video tutorial about how to connect Ozeki VoIP GSM Gateway to Asterisk PBX

Conclusion

This guide above presented how to setup Ozeki VoIP GSM Gateway for Asterisk PBX. If you follow these steps you will able to establish connection between the GSM network and the IP network quickly and easily.

If you have any questions or need assistance, please contact us at  info@ozekiphone.com


Read more about Ozeki VoIP GSM Gateway:



More information