Вы находитесь на странице: 1из 10
Khomp KGSM-U SB SPX and Elasti x Server Setu p Guide http://www.elastix.org
Khomp KGSM-U SB SPX and Elasti x Server Setu p Guide http://www.elastix.org
Khomp KGSM-U SB SPX and Elasti x Server Setu p Guide http://www.elastix.org

Khomp KGSM-U SB SPX and Elasti x Server

Setu p Guide

Khomp KGSM-U SB SPX and Elasti x Server Setu p Guide http://www.elastix.org

PaloSanto Solutions Khomp KGSM-USB SPX Server Setup Guide

PaloSanto Solutions Khomp KGSM-USB SPX Server Setup Guide

1.0 Setup Diagram

Figure 1-1 is a setup diagram for a single Khomp KGSM-USB SPX Interface Card configuration.

Figure 1-1. Setup Diagram

SPX Interface Card configuration. Figure 1-1. Setup Diagram 2.0 Host PC Environment Table 2-1. Host Server

2.0 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.0 Test Setup Equipment

Table 3-1. Test Setup Equipment

Equipment

Model

Version

IP (SIP) Phone

N/A

N/A

Khomp

KGSM-USB SPX

asterisk-chan_khomp-3.0-011.0

Switch

N/A

N/A

 

2

PaloSant o Solutions Khomp KGSM-USB SPX Server S etup Guide

PaloSant o Solutions Khomp KGSM-USB SPX Server S etup Guide

4.0 Setup Proce dure

To set up the Elastix Server for the Khomp KGSM-USB SPX Inte rface Card:

1. First go to the El astix Command Line Interface and install a khom p module for this

card. You can us e ssh connection or directly from the Elastix S erver. Once there, type the followin g:

yum install k ernel-module-khomp

service asteri sk stop

/etc/rc.d/init.d d/khompdrv

service kserv er start

service asteri sk start

Figure 4-1. Elastix CLI

er start service asteri sk start Figure 4-1. Elastix CLI 2. To see the statu s

2. To see the statu s of the Khomp KGSM Card enter to Asteris k CLI by typing asterisk r. Once there type khomp channels show (Figure 4-2).

Figure 4-2. Asterisk CLI

khomp channels show (Figure 4-2). Figure 4-2. Asterisk CLI 3. We can see an ac tive

3. We can see an ac tive channel that is where we placed the SIMCA RD in the Khomp KGSM-USB. Clo se Asterisk CLI by typing exit.

4. Now you need t o edit a configuration file to make incoming ca lls use the PSTN

line type vim Press “i” key to

context in Ela stix (or any context). In the command /etc/asterisk/kho mp.conf and find the line “;context-gsm-call”.

3

PaloSanto Solutions Khomp KGSM-USB SPX Server Setup Guide

PaloSanto Solutions Khomp KGSM-USB SPX Server Setup Guide

switch to the Vim Edition Mode and erase the semicolon and the current value and replace it by “from-pstn” (Figure 4-3).

Figure 4-3. Editor VIM

by “from - pstn” (Figure 4 -3). Figure 4-3. Editor VIM 5. Press ESC key and

5. Press ESC key and type “:x” followed by ENTER to save changes and exit the Vim Editor. You can close the file without saving changes with “:q!”. Reload asterisk by typing asterisk –rx “reload” in Elastix CLI (Figure 4-4).

Figure 4-4. Reload Asterisk

in Elastix CLI (Figure 4-4) . Figure 4-4. Reload Asterisk 6. Now, we go to the

6. Now, we 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.186

7. On the Login page, type the username and password for an administrative user into the Username and Password fields, see Figure 4-5. The username and password are determined by the customer.

Figure 4-5. Login

password are determined by the customer. Figure 4-5. Login 8. Press Enter or click on the

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

9. Once inside, we will create a trunk for outbound calls. Click on the PBX tab on the menu at the top of the screen

4

PaloSanto Solutions Khomp KGSM-USB SPX Server Setup Guide

PaloSanto Solutions Khomp KGSM-USB SPX Server Setup Guide

Figure 4-6. PBX

Khomp KGSM-USB SPX Server Setup Guide Figure 4-6. PBX 10. Go to “Extensions” and select “Generic

10. Go to “Extensions” and select “Generic SIP Device” to create an extension for our IPPhone. In the Add SIP Extension page fill in the following information (Figure 4-

7):

Add Extension

User Extension: (302 in this example)

Display name: (“IPPhone” in this example)

Device Options

Secret: (“h7Dka3Rf9si0t” in this example)

Figure 4-7. Add SIP Extension

” in this example) Figure 4-7. Add SIP Extension 11. Click on “Submit” located at the
” in this example) Figure 4-7. Add SIP Extension 11. Click on “Submit” located at the

11. Click on “Submit” located at the end of the page and apply changes. Now, click on Trunkson the left side and select “Add Custom Trunk” (Figure 4-8).

5

PaloSanto Solutions Khomp KGSM-USB SPX Server Setup Guide

PaloSanto Solutions Khomp KGSM-USB SPX Server Setup Guide

Figure 4-8. Trunks

Khomp KGSM-USB SPX Server Setup Guide Figure 4-8. Trunks 12. On the Add Custom Trunk page,

12. On the Add Custom Trunk page, set the following (Figure 4-9).

General Settings

Trunk Name: (“KhompTrunk” in this example)

Outgoing Settings

Custom Dial String: khomp/b0c0/$OUTNUM$

Figure 4-9

 Custom Dial String: khomp/b0c0/$OUTNUM$ Figure 4-9 13. Click on “Submit Changes ” button located at
 Custom Dial String: khomp/b0c0/$OUTNUM$ Figure 4-9 13. Click on “Submit Changes ” button located at

13. Click on “Submit Changes” button located at the end of the page. Go to “PBX => PBX Configuration => Outbound Routes”. Click on “Add Route” (Figure 4-10). Set the following:

Route Settings

Route Name: (“9_Outside_Test” in this example)

Dial patterns

Prefix: (“9” in this example) | Match pattern: (“.” in this example)

Trunk Sequence for Matched Routes

0: The trunk that we just created (“KhompTrunk” in this example)

6

PaloSanto Solutions Khomp KGSM-USB SPX Server Setup Guide

PaloSanto Solutions Khomp KGSM-USB SPX Server Setup Guide

Figure 4-10. Outbound Route

KGSM-USB SPX Server Setup Guide Figure 4-10. Outbound Route 14. Now you can make outbound calls
KGSM-USB SPX Server Setup Guide Figure 4-10. Outbound Route 14. Now you can make outbound calls
KGSM-USB SPX Server Setup Guide Figure 4-10. Outbound Route 14. Now you can make outbound calls

14. Now you can make outbound calls through the SIMCARD calling a telephone number with “9” as prefix.

15. We’ll create an incoming route for the calls from any external number to our SIMCARD. We’re going to use an IVR for incoming calls. Go to “PBX => PBX Configuration => IVR”. Click on “Add IVR” (Figure 4.11). 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)

Figure 4-11. IVR

Extension o t - Repeat the options of IVR (Add this option by modifying the IVR

7

PaloSanto Solutions Khomp KGSM-USB SPX Server Setup Guide

PaloSanto Solutions Khomp KGSM-USB SPX Server Setup Guide
PaloSanto Solutions Khomp KGSM-USB SPX Server Setup Guide 16. Click on “Save” and Apply changes by

16. 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.12). Set the following:

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

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

Figure 4-12. Incoming Route

IVR in this example) Figure 4-12. Incoming Route 17. Click on “Submit” and apply changes. Now
IVR in this example) Figure 4-12. Incoming Route 17. Click on “Submit” and apply changes. Now

17. Click on “Submit” and apply changes. Now when we receive calls to the SIMCARD the IVR will play to the caller giving him choices to interact with Elastix Server.

18. Configure the IP (SIP) Phone with the correct parameters.

19. To test the configurations, pick up the previously configured IP (SIP) Phone and dial a mobile phone with “9” as prefix. When the call is established, speak into the phone and verify that the mobile phone can hear your voice. Next, from your mobile phone call to the SIMCARD number and when the call is established you should be interacting with the IVR.

8

PaloSanto Solutions Khomp KGSM-USB SPX Server Setup Guide

PaloSanto Solutions Khomp KGSM-USB SPX Server Setup Guide

SMS Configuration

We can also set SMS functions for Khomp KGSM-USB.

1. For

the

“/etc/asterisk/extensions_custom.conf” (Figure 4-11). Inside the [from-internal- custom] context, add the line:

sending

SMS

from

the

SIMCARD,

edit

include => sms-out

sms-out is a name that can be defined by the user.

Add the context:

[sms-out] exten => 700,1,KSendSMS(b0c0|0989532586|Testing SMS.) exten => 700,n,Hangup()

700: Extension we have to dial in order to send the message b0c0: The zeros in b0c0 represent the number of the board/card and the number of the channel/module where the SIM card you want to use is located respectively. 0989532586: The mobile phone number that will receive SMS Testing SMS: The message content you want to send.

2. When finish, reload asterisk by typing asterisk –rx “reload” in the Elastix CLI. You can also use the Asterisk CLI to send a message. Use the following command:

khomp sms b0c0 0989532586 "Your message here"

3. Now, for receiving SMS to the SIMCARD from any mobile phone, edit the “/etc/asterisk/extensions_custom.conf” (Figure 4-13). Inside the [from-internal- custom] context, add the line:

include => khomp-sms-00-00

The first two zeros (00) define the board/card you want to create the context for. The second two zeros (00) will define which GSM Module (on the card) you want to create the context for. Since in this configuration only one card is used it is allocated the 00 position, and the SIMCARD is located in the first position (00).

Add the context:

[khomp-sms-00-00]

exten => s,1,System(${KSmsFrom} ${KSmsBody})

9

PaloSanto Solutions Khomp KGSM-USB SPX Server Setup Guide

PaloSanto Solutions Khomp KGSM-USB SPX Server Setup Guide

KSmsFrom and KSmsBody are variables available for processing of SMS, they contain the Sender and Content of the text message respectively.

Figure 4-13

and Content of the text message respectively. Figure 4-13 4. When finish, restart asterisk service by

4. When finish, restart asterisk service by typing service asterisk restart in the Elastix

CLI.

5. To test the SMS sending, pick up your IPPhone and dial 700. After finish the call you will receive a message in the cell phone in the next seconds. To test the SMS receiving, enter to Asterisk CLI with the command “asterisk -r” in Elastix CLI, and send a message from any cell phone to the SIMCARD number. In the next seconds you will see something like figure 4-14.

Figure 4-14

seconds you will see something like figure 4-14. Figure 4-14 NOTE: If at any time you

NOTE: If at any time you want to remove or stop using a Khomp card, be sure to first edit the file: /etc/asterisk/modules.conf by adding the line: "noload => chan_khomp.so" in its [modules] , otherwise the asterisk process will not be able to start properly.

10