13
http://www.elastix.org Grandstream GXW410x and Elastix Server Setup Guide

Grandstream GXW410x and Elastix Server · To set up the Elastix Server for the Grandstream GXW41 0x 1. ... /etc/asterisk/extensions_custom.conf and change the context’s name to

Embed Size (px)

Citation preview

Page 1: Grandstream GXW410x and Elastix Server · To set up the Elastix Server for the Grandstream GXW41 0x 1. ... /etc/asterisk/extensions_custom.conf and change the context’s name to

http://www.elastix.org

Grandstream GXW410x

and Elastix Server

Setup Guide

Page 2: Grandstream GXW410x and Elastix Server · To set up the Elastix Server for the Grandstream GXW41 0x 1. ... /etc/asterisk/extensions_custom.conf and change the context’s name to

PaloSanto SolutionsGrandstream GXW4104/8 and Elastix Server Setup Guide

2

1. Setup DiagramFigure 1-1 is a setup diagram for a single gateway Grandstream GXW410xconfiguration. The gateway is setup as a SIP telephony device.

Figure 2-1. Setup Diagram2. Host PC EnvironmentTable 2-1. Host Server Environment Details

DescriptionHardware Type Elastix Appliance ELX-Series

Hardware Version ELX-3000Software Type Elastix

Software Version 2.43. Test Setup EquipmentTable 3.1. Test Setup Equipment

Equipment Model VersionVideo Call IP (SIP) Phone N/A N/AGrandstream Gateway GXW410x 1.3.4.13

Switch N/A N/A

Page 3: Grandstream GXW410x and Elastix Server · To set up the Elastix Server for the Grandstream GXW41 0x 1. ... /etc/asterisk/extensions_custom.conf and change the context’s name to

PaloSanto SolutionsGrandstream GXW4104/8 and Elastix Server Setup Guide

3

4. Setup ProcedureTo 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 determinedby 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 theUsername and Password fields, see Figure 4-1. The username is admin and thepassword 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

Page 4: Grandstream GXW410x and Elastix Server · To set up the Elastix Server for the Grandstream GXW41 0x 1. ... /etc/asterisk/extensions_custom.conf and change the context’s name to

PaloSanto SolutionsGrandstream GXW4104/8 and Elastix Server Setup Guide

4

5. Click on the Submit button to add an extension so we can test the gateway using it whenwe finish the entire configuration, see Figure 4-3. This will take you to the Add SIPExtension 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 onFigure 4-5 displaying the “Apply Configuration Changes Here” pink ribbon on top ofthe screen. Click on there to apply changes.

Page 5: Grandstream GXW410x and Elastix Server · To set up the Elastix Server for the Grandstream GXW41 0x 1. ... /etc/asterisk/extensions_custom.conf and change the context’s name to

PaloSanto SolutionsGrandstream GXW4104/8 and Elastix Server Setup Guide

5

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=dynamicusername=( 801 in this example)secret=( qbp567BBd4GT in this example)type=peerinsecure=veryqualify=yes

Figure 4-6. Add SIP Trunk

Page 6: Grandstream GXW410x and Elastix Server · To set up the Elastix Server for the Grandstream GXW41 0x 1. ... /etc/asterisk/extensions_custom.conf and change the context’s name to

PaloSanto SolutionsGrandstream GXW4104/8 and Elastix Server Setup Guide

6

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 theoutbound 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 thisconfiguration when you want to dial and external number, just dial the number with theprefix “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 thegateway. We’re going to use an IVR for incoming calls. Go to “PBX => PBXConfiguration => 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 Extensiono t - Repeat the options of IVR (Add this option by modifying the

IVR after creation)

Page 7: Grandstream GXW410x and Elastix Server · To set up the Elastix Server for the Grandstream GXW41 0x 1. ... /etc/asterisk/extensions_custom.conf and change the context’s name to

PaloSanto SolutionsGrandstream GXW4104/8 and Elastix Server Setup Guide

7

Figure 4-8. IVR

14.Click on “Save” and Apply changes by clicking on the pink ribbon that appears at thetop 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 tothe number 999999, the IVR will be played to the caller giving him choices to interactwith our Elastix Server.

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

Page 8: Grandstream GXW410x and Elastix Server · To set up the Elastix Server for the Grandstream GXW41 0x 1. ... /etc/asterisk/extensions_custom.conf and change the context’s name to

PaloSanto SolutionsGrandstream GXW4104/8 and Elastix Server Setup Guide

8

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 DHCPWeb Access Password admin

17.Log in to the Grandstream GXW410x WebUI by pointing your browser to the IPaddress 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 thefollowing necessary information on “Channels” section of the Grandstream GatewayWebUI (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;

Page 9: Grandstream GXW410x and Elastix Server · To set up the Elastix Server for the Grandstream GXW41 0x 1. ... /etc/asterisk/extensions_custom.conf and change the context’s name to

PaloSanto SolutionsGrandstream GXW4104/8 and Elastix Server Setup Guide

9

Figure 4-11. Channels

20.Once you have entered the required information, click on ‘Update’ button located at theend 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 directlyto 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 theIncoming Route in Elastix Server, See Figure 4.9)

PSTN to VoIP Caller ID Setting

Page 10: Grandstream GXW410x and Elastix Server · To set up the Elastix Server for the Grandstream GXW41 0x 1. ... /etc/asterisk/extensions_custom.conf and change the context’s name to

PaloSanto SolutionsGrandstream GXW4104/8 and Elastix Server Setup Guide

10

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 ONagain. When it is on, go to “Status” section and check out the channel 1 is registered andthe PSTN line is connected and idle (the PSTN line must be connected in the first port).See Figure 4-14

Page 11: Grandstream GXW410x and Elastix Server · To set up the Elastix Server for the Grandstream GXW41 0x 1. ... /etc/asterisk/extensions_custom.conf and change the context’s name to

PaloSanto SolutionsGrandstream GXW4104/8 and Elastix Server Setup Guide

11

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 toan external number using the prefix “6” (i.e. 6-2235695). The call will use the registeredport 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 beconnected to a registered port in GXW410x gateway, and after some rings you shouldbe able to reach the IVR configured in Elastix.

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

Page 12: Grandstream GXW410x and Elastix Server · To set up the Elastix Server for the Grandstream GXW41 0x 1. ... /etc/asterisk/extensions_custom.conf and change the context’s name to

PaloSanto SolutionsGrandstream GXW4104/8 and Elastix Server Setup Guide

12

IN CASE THE CALLER ID OF INCOMING CALLS ISNOT RECEIVED CORRECTLY

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

2. Go to /etc/asterisk/extensions_additional.conf and search the context of the inboundroute configured in Elastix. As a reference try to find the DID number we set. Inthis 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 thirdline:

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 Trunkconfiguration in Elastix Server. Refer to Figure 4.6 on step 9. At the end the SIPtrunk configuration must be as shown in Figure 4-17.

Page 13: Grandstream GXW410x and Elastix Server · To set up the Elastix Server for the Grandstream GXW41 0x 1. ... /etc/asterisk/extensions_custom.conf and change the context’s name to

PaloSanto SolutionsGrandstream GXW4104/8 and Elastix Server Setup Guide

13

Figure 4-17