Академический Документы
Профессиональный Документы
Культура Документы
http://www.elastix.org
PaloSanto Solutions
Khomp KGSM-USB SPX Server Setup Guide
2
PaloSanto Solutions
Khomp KGSM-USB SPX Server Setup Guide
To set up the Elastix Server for the Khomp KGSM-USB SPX Interface Card:
1. First go to the Elastix Command Line Interface and install a khomp module for this
card. You can use ssh connection or directly from the Elastix Server. Once there,
type the following:
/etc/rc.d/init.d/khompdrv
2. To see the status of the Khomp KGSM Card enter to Asterisk CLI by typing
asterisk –r. Once there type khomp channels show (Figure 4-2).
3. We can see an active channel that is where we placed the SIMCARD in the Khomp
KGSM-USB. Close Asterisk CLI by typing exit.
4. Now you need to edit a configuration file to make incoming calls use the PSTN
context in Elastix (or any context). In the command line type vim
/etc/asterisk/khomp.conf and find the line “;context-gsm-call”. Press “i” key to
3
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).
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).
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.
4
PaloSanto Solutions
Khomp KGSM-USB SPX Server Setup Guide
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
Device Options
11. Click on “Submit” located at the end of the page and apply changes. Now, click on
“Trunks” on the left side and select “Add Custom Trunk” (Figure 4-8).
5
PaloSanto Solutions
Khomp KGSM-USB SPX Server Setup Guide
12. On the Add Custom Trunk page, set the following (Figure 4-9).
General Settings
Outgoing Settings
Figure 4-9
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
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:
7
PaloSanto Solutions
Khomp KGSM-USB SPX Server Setup Guide
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:
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.
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
SMS Configuration
We can also set SMS functions for Khomp KGSM-USB.
[sms-out]
exten => 700,1,KSendSMS(b0c0|0989532586|Testing SMS.)
exten => 700,n,Hangup()
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:
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:
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).
[khomp-sms-00-00]
exten => s,1,System(${KSmsFrom} ${KSmsBody})
9
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
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
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