You are on page 1of 13

Grandstream GXW410x

and Elastix Server


Setup Guide

http://www.elastix.org
PaloSanto Solutions
Grandstream GXW4104/8 and Elastix Server Setup Guide

1. Setup Diagram

Figure 1-1 is a setup diagram for a single gateway Grandstream GXW410x


configuration. The gateway is setup as a SIP telephony device.

Figure 2-1. Setup Diagram

2. Host PC Environment

Table 2-1. Host Server Environment Details

Description
Hardware Type Elastix Appliance ELX-Series
Hardware Version ELX-3000
Software Type Elastix
Software Version 2.4

3. Test Setup Equipment

Table 3.1. Test Setup Equipment

Equipment Model Version


Video Call IP (SIP) Phone N/A N/A
Grandstream Gateway GXW410x 1.3.4.13
Switch N/A N/A

2
PaloSanto Solutions
Grandstream GXW4104/8 and Elastix Server Setup Guide

4. Setup Procedure

To set up the Elastix Server for the Grandstream GXW410x

1. Go to the web address of the Elastix Server Login page. The web address is determined
by the customer, for this guide we have used the IP address 192.168.1.66

2. On the Login page, type the username and password for an administrative user into the
Username and Password fields, see Figure 4-1. The username is admin and the
password is determined by the customer.

Figure 4-1. Login

3. Press Enter or click on the Submit button to go to Elastix’s Dashboard

4. Once inside, click on the PBX tab on the menu at the top of the screen.

Figure 4-2. Dashboard

3
PaloSanto Solutions
Grandstream GXW4104/8 and Elastix Server Setup Guide

5. Click on the Submit button to add an extension so we can test the gateway using it when
we finish the entire configuration, see Figure 4-3. This will take you to the Add SIP
Extension page.

Figure 4-3. Add an Extension

6. On the Add SIP Extension page (Figure 4-4), fill in the following information:

• User Extension (302 in this example)


• Display Name (“IPPhone” in this example)
• secret (‘h7Dka3Rf9si0t’ in this example)

Figure 4-4. Add SIP Extension

7. Click on the “Submit” button at the end of the page and you will see a similar page on
Figure 4-5 displaying the “Apply Configuration Changes Here” pink ribbon on top of
the screen. Click on there to apply changes.

4
PaloSanto Solutions
Grandstream GXW4104/8 and Elastix Server Setup Guide

Figure 4-5. Apply Configuration

8. Configure an IP Phone with the same settings to register it with Elastix Server.

9. Now we will configure an Outbound Route for outgoing calls depending on a prefix.
For this we have to configure a SIP Trunk first. Go to “PBX => PBX Configuration =>
Trunks”. Click on “Add SIP Trunk”, then “Submit” (Figure 4-6). Set the following:

General Settings

• Trunk Name: (trunk801 in this example)

Outgoing Settings

 Trunk Name: (801 in this example)


 Peer Details:

host=dynamic
username=( 801 in this example)
secret=( qbp567BBd4GT in this example)
type=peer
insecure=very
qualify=yes

Figure 4-6. Add SIP Trunk

5
PaloSanto Solutions
Grandstream GXW4104/8 and Elastix Server Setup Guide

10.Click on the ‘Submit’ button at the end of the page and the SIP Trunk will be created.

11.Now, go to “PBX => PBX Configuration => Outbound Routes” to configure the
outbound route using this trunk. Fill in the following information: (Figure 4-7)

Route Settings
 Route Name: (“6_Line1_gateway” in this example)
Dial patterns
 Prefix: (“6” in this example) | Match pattern: (“.” in this example)
Trunk Sequence for Matched Routes
 0: (“trunk801” in this example)

Figure 4-7. Add Route

12.Click on the “Submit” button at the end of the page and Apply changes. With this
configuration when you want to dial and external number, just dial the number with the
prefix “6” and the call will go out through the port 1 of the gateway.

13.Now, we’ll create an incoming route for the calls from PSTN that pass through the
gateway. We’re going to use an IVR for incoming calls. Go to “PBX => PBX
Configuration => IVR”. Click on the link “Add IVR” (Figure 4.8). Set the following:

 Name: Name of IVR (WelcomeIVR in this example)


 Announcement: Record which will be played for incoming calls.
 Options:
o * - Phone book.
o 0 - 302 Extension
o t - Repeat the options of IVR (Add this option by modifying the
IVR after creation)

6
PaloSanto Solutions
Grandstream GXW4104/8 and Elastix Server Setup Guide

Figure 4-8. IVR

14.Click on “Save” and Apply changes by clicking on the pink ribbon that appears at the
top of the page. Now go to “PBX => PBX Configuration => Inbound Routes”. Click on
“Add Incoming Route”. (Figure 4.9). Set the following:

 Description: Name of inbound route (“Incoming_Calls” in this example)


 DID Number: 999999
 Set destination: Where the call will be routed. (“WelcomeIVR” IVR in this
example)

Figure 4-9. Incoming Route

15.Click on “Submit” button and apply changes. Now when we receive calls from PSTN to
the number 999999, the IVR will be played to the caller giving him choices to interact
with our Elastix Server.

16.To configure the GXW410x you will need to enter the information from the sip trunk
created on the Elastix Server into the gateway.

7
PaloSanto Solutions
Grandstream GXW4104/8 and Elastix Server Setup Guide

For the initial configuration, refer to the Grandstream GXW410x User Manual found at:
http://www.grandstream.com/index.php/products/ip-voice-telephony/enterprise-
analog-gateways/gxw410x

Table 4.1. Factory default settings

IP Addressing DHCP
Web Access Password admin

17.Log in to the Grandstream GXW410x WebUI by pointing your browser to the IP


address of the gateway.

18.When prompted, enter the Web Access Password to access to the WebUI (Figure 4-10).

Figure 4-10. Grandstream WebUI

19.Use the information from the Add SIP Extension page (Figure 4-4) to enter the
following necessary information on “Channels” section of the Grandstream Gateway
WebUI (Figure 4-11):

Phone Number Settings

 Channels: 1 (The number of FXO port where the PSTN line is connected)
 SIP User ID: “801” in this example
 Authenticate ID: “801” in this example
 Authen Password: “qbp567BBd4GT” in this example
 Profile ID: Profile 1 (We are going to set this profile later)

Channel Specific Setting

 DTMF Methods (1-7): ch1-4:2;

8
PaloSanto Solutions
Grandstream GXW4104/8 and Elastix Server Setup Guide

Figure 4-11. Channels

20.Once you have entered the required information, click on ‘Update’ button located at the
end of the page. Now go “Profile 1” to edit some parameters (Figure 4-12).

 Activate Profile: Yes


 SIP Server: Elastix’s IP Address (192.168.1.66)
 User ID is phone number: No
 SIP Registration: Yes

Figure 4-12. Profile 1

21.Click on “Update” button at the end of the page.

22.Go to “FXO Lines” and set the Channel Dialing to PSTN section See Figure 4-13.

Channel Dialing to PSTN

 Stage Method (1/2): ch1-4:1; (This option is for dialing a number directly
to the PSTN, the option is for obtaining a dial tone to dial the number).

Channel Dialing to VoIP

 User ID: ch1-4:999999; (This number has to match the DID number in the
Incoming Route in Elastix Server, See Figure 4.9)

PSTN to VoIP Caller ID Setting

9
PaloSanto Solutions
Grandstream GXW4104/8 and Elastix Server Setup Guide

 Number of Rings Before Pickup: ch1-4:4;


 Caller ID Scheme: ch1-4:1; (Choose the option that better fits to your
PSTN line)
 Caller ID Transport Type: ch1-4:4;

Figure 4-13. FXO Lines

23.Click on the “Update” button and then POWER OFF the gateway and POWER ON
again. When it is on, go to “Status” section and check out the channel 1 is registered and
the PSTN line is connected and idle (the PSTN line must be connected in the first port).
See Figure 4-14

10
PaloSanto Solutions
Grandstream GXW4104/8 and Elastix Server Setup Guide

Figure 4-14. Status

24.If the phone number is not registered please check out all the confirmation.

25.To test the outbound calls, pick up the previously configured IP (SIP) Phone and call to
an external number using the prefix “6” (i.e. 6-2235695). The call will use the registered
port of the gateway to connect to the call and you should be able to hear the ring tone.

To test the inbound calls, from the PSTN call to your public number which should be
connected to a registered port in GXW410x gateway, and after some rings you should
be able to reach the IVR configured in Elastix.

This step completes the procedure of configuration. Make sure you have configured all
the parameters correctly if you are facing problems. For advance configuration please
refer to the gateway manual cited in previous pages.

11
PaloSanto Solutions
Grandstream GXW4104/8 and Elastix Server Setup Guide

IN CASE THE CALLER ID OF INCOMING CALLS IS


NOT RECEIVED CORRECTLY

1. Log in to the console in Elastix Server. You can access remotely or directly from
the server.

2. Go to /etc/asterisk/extensions_additional.conf and search the context of the inbound


route configured in Elastix. As a reference try to find the DID number we set. In
this case the name of the context is [ext-did-0002]. See Figure 4-15.

Figure 4-15

3. Copy the context and paste it at the end of the file


/etc/asterisk/extensions_custom.conf and change the context’s name to [route-gs-
elx]. In addition to this, add the following lines to the context starting from the third
line:

exten => 999999,n,NoOp(Obtaining CallerID ...)


exten => 999999,n,Set(foo=${SIP_HEADER(P-asserted-identity)})
exten => 999999,n,Set(cadnum=${CUT(foo,:,2)})
exten => 999999,n,Set(CALLERID(number)=${CUT(cadnum,@,1)})
exten => 999999,n,Set(CALLERID(name)=${CUT(foo,\",2)})

The context should end as shown in Figure 4-16.

Figure 4-16

4. Add the line context=route-gs-elx in the Peer Settings of the SIP Trunk
configuration in Elastix Server. Refer to Figure 4.6 on step 9. At the end the SIP
trunk configuration must be as shown in Figure 4-17.

12
PaloSanto Solutions
Grandstream GXW4104/8 and Elastix Server Setup Guide

Figure 4-17

13

You might also like