Sie sind auf Seite 1von 68

Celtius Mobile Messaging Gateway User's Guide

Release 2.0

Celtius Ltd.

http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide

-2Nov 27, 2006

Copyright 2004-2006 Celtius Ltd. All rights reserved. This documentation is confidential and copyrighted. Reproduction, distribution or transmission of part or all of this documentation in any form without prior written consent of Celtius is prohibited. The content of this document may be changed by Celtius without prior notice. Liability of Celtius for any errors in the document is limited to the documentary correction of errors. Celtius will not be responsible in any event for errors in this document or for any damages, incidental or consequential (including monetary losses), that might arise from the use of this document or the information in it.

Contact Celtius for license issues and additional information: Web: http://www.celtius.com

Celtius Ltd.

http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide

-3-

Table of Contents
1 Introduction.........................................................................................................................5 1.1 Architecture..................................................................................................................5 1.2 Applications and Mobile Messaging Gateway.............................................................6 1.3 Message Routing in Mobile Messaging Gateway.......................................................7 1.4 Lite and Pro versions...................................................................................................8 2 Quick Start..........................................................................................................................9 2.1 Starting the Mobile Messaging Gateway Manager..................................................... 9 3 Installation.........................................................................................................................10 3.1 Installing the Gateway...............................................................................................10 3.2 License files...............................................................................................................11 3.3 Supported Modems...................................................................................................12 3.4 Using Modem Installation Wizard..............................................................................13 3.4.1 Wizard steps.......................................................................................................13 3.5 Connecting GSM/GPRS Modem Manually...............................................................19 3.5.1 Installing the Modem..........................................................................................19 3.5.2 Setting up a GPRS Dialup Connection..............................................................19 4 Gateway Manager.............................................................................................................27 4.1 Manager Configuration..............................................................................................28 4.2 General Gateway Configuration................................................................................29 4.3 Application Configuration..........................................................................................30 4.3.1 Celtius Form Applications..................................................................................32 4.3.2 EAIF Applications...............................................................................................34 4.3.3 MM7 Applications...............................................................................................36 4.4 Connection Configuration..........................................................................................37 4.4.1 Connections Tab................................................................................................37 4.4.2 SMS Connection................................................................................................39 4.4.3 MM1 Connection................................................................................................40 4.4.4 Nokia D211 Connection (Windows)...................................................................45 4.4.5 Eaif Connection..................................................................................................46 4.4.6 MM7 Connection................................................................................................47 4.4.7 SMTP Connection..............................................................................................48 4.4.8 SMPP Connection (Linux)..................................................................................49 4.4.9 CIMD2 Connection (Linux).................................................................................51 4.4.10 UCP/EMI Connection (Linux)...........................................................................52 4.5 Monitoring and Starting/Stopping the Gateway.........................................................53 4.6 About Message Routing............................................................................................54 5 Celtius Form Application Interface....................................................................................56 5.1 Data Formats.............................................................................................................56 5.1.1 application/x-www-form-urlencoded...................................................................56 5.1.2 multipart/form-data.............................................................................................56 5.1.3 Sending over HTTP............................................................................................57 5.1.4 From Application to Gateway.............................................................................58 5.1.5 From Gateway to Application.............................................................................58 5.2 Parameters................................................................................................................58 5.3 SMS Sending and Receiving.....................................................................................61 5.3.1 Sending Textual SMSs.......................................................................................61 5.3.2 Sending Service Indications...............................................................................62 5.3.3 Sending Binary SMSs........................................................................................63 5.3.4 Receiving Textual SMSs....................................................................................63 Celtius Ltd. http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide

-4-

5.3.5 Receiving Binary SMSs......................................................................................63 5.4 MMS Sending and Receiving....................................................................................64 5.4.1 Sending a Multimedia Message.........................................................................64 5.4.2 Receiving a Multimedia Message......................................................................65 5.4.3 Sending a Read Report......................................................................................65 5.5 Receiving Reports.....................................................................................................65 6 Sample Applications.........................................................................................................66 7 Feedback..........................................................................................................................67 8 Troubleshooting................................................................................................................67 9 Acknowledgements...........................................................................................................68

Celtius Ltd.

http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide

-5-

1 Introduction
Mobile Messaging Gateway enables mobile messaging for your applications. It offers:

MMS sending and reception SMS sending and reception WAP Push sending (Service Indication) SMS/MMS delivery report reception

With Mobile Messaging Gateway, you can add mobile features to your existing intranet, extranet or Internet solutions and rapidly develop and deploy new MMS/SMS/pushenabled applications. You should read at least Sections 2. Quick Start and 3. Installation to start using the Mobile Messaging Gateway. Other chapters give more detailed information about configuring the Gateway.

1.1 Architecture
GSM Network
MM1 GSM 07.05 (MMS) (SMS)

Your Application

HTTP HTTP EAIF MM7

(MMS) (SMS) (MMS) (MMS)

Celtius Mobile Messaging Gateway

Internet
EAIF (MMS) MM7 (MMS) SMPP (SMS)* CIMD2 (SMS)* UCP (SMS)*

Operator's SMS/MMS Center

Mobile User

* Available only in Linux version

Figure 1 Applications connect to Mobile Messaging Gateway with simple Internet protocols. Mobile Messaging Gateway hides the complexity of MMS/SMS protocols.

Mobile Messaging Gateway acts as middleware between SMS/MMS-enabled applications and the mobile network. It hides the telecom operator-specific interfaces so that applications will be independent of the utilized SMS and MMS protocols. Mobile Messaging Gateway itself is independent of the telecom operator. Mobile Messaging Gateway can send SMS and MMS messages both over the Internet and over-the-air. It supports:

Direct access to mobile operators network over the Internet. This requires a special contract with the telecom operator for charging and billing. Wireless GPRS access to mobile operators network. This requires only a GSM/GPRS modem and a SIM card. http://www.celtius.com

Celtius Ltd.

Celtius Mobile Messaging Gateway User's Guide

-6-

You can start using your applications with GPRS modem only and when higher message rate is needed, you can migrate to direct connection to the operator's messaging center. This change will be transparent to the applications.

1.2 Applications and Mobile Messaging Gateway


Your applications can be, for example:

Web applications Windows applications Console applications Shell scripts

Your programming language can be any modern programming language, such as Java, C, C++, C#, PHP, or Visual Basic. Mobile Messaging Gateway can add MMS/SMS features to all these languages. Mobile Messaging Gateway can run on the same computer as the applications or on a separate server. The gateway supports multiple applications so the GPRS modem or the direct operator connection can be shared between several users. Applications send messages to Mobile Messaging Gateway with standard Internet protocols (HTTP). The gateway forwards messages to a suitable MMS/SMS connection according to its routing table. Mobile Messaging Gateway package includes sample MMS/SMS applications for the major programming languages and platforms. See Section 6 for more information about the sample applications.

Celtius Ltd.

http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide

-7-

1.3 Message Routing in Mobile Messaging Gateway

Mobile Messaging Gateway


GSM/GPRS Modem

Application 1

SMS Connection

Application 2

MM1 Connection

Application 3

Internal Router

Operator's MMS Center EAIF Connection

Application 4

Email Connection

SMTP Server

Applications

Connections

Figure 2 The gateway architecture. The gateway routes messages from Applications to Connections and vice versa. Depending on the routing rules, one message may be routed to several applications (or connections). Figure shows four applications and four examples of connections to the telecom operator.

The gateway routes SMS/MMS messages between Applications and Connections. Applications are SMS/MMS-enabled software written by the user of the gateway, and connections are links to external messaging servers, such as MMS centers, SMS centers, and email servers. The basic rules concerning routing between applications and connections are:

Messages arriving from Applications will be routed to Connections. Messages arriving from Connections will be routed to Applications.

Messages will NOT be routed from one Application to another Application, or from one Connection to another Connection. Here are more facts about the routing:

Each application and each connection has its own routing rules. If a message from a Connection matches the routing rules of an Application, the message will be routed to that Application. If a message from an Application matches the routing rules of a Connection, the message will be routed to that Connection. If rules of several Applications (or Connections) match, the message will be sent to all of them.

Figure 2 shows the gateway performing message routing between four connections and four applications (each having their own routing rules). In the middle, there is a router performing routing decisions based on the routing rules. In the figure, a message arrives Celtius Ltd. http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide from Application 1, and only the routing rules of SMS Connection match. Another message arrives from EAIF connection, and the routing rules of applications 3 and 4 match. For more detailed information about message routing, see Section 4.6.

-8-

1.4 Lite and Pro versions


Celtius Mobile Messaging Gateway is delivered as two versions: Lite and Pro. Lite version supports connections operating over GSM network with a GSM/GPRS Modem (see Figure 1). For the moment these connections are:

MM1 SMS Nokia D211

(MMS over GPRS) (SMS over GSM modem; GSM 07.05) (SMS support for Nokia D211 multimode card)

Pro version supports connections operating over GSM network or over Internet. Supported connections are:

MM1 SMS Nokia D211 EAIF MM7 SMTP SMPP* CIMD2* UCP/EMI*

(MMS over GPRS) (SMS over GSM modem; GSM 07.05) (SMS support for Nokia D211 multimode card) (MMS over Internet) (MMS over Internet) (SMS and MMS over Internet to e-mail: sending only) (SMS over Internet) (SMS over Internet) (SMS over Internet)

*Available on in the Linux version Availability of the Nokia D211 connection depends on the platform. For the moment it is supported only on Windows. See Section 4.4 Connection Configuration for additional information about the connections and supported protocols.

Celtius Ltd.

http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide

-9-

2 Quick Start
Here are step-by-step instructions for setting up the gateway and running the Java sample SMS/MMS application. The instructions assume you are going to use a GSM/GPRS connection for the MMS/SMS sending/reception. On the other hand, if you are going to use a direct Internet connection to operator's messaging centers, after installing the gateway you can skip to Section 4.

1. Install the gateway.


(See Section 3.1 on page 10)

In Windows: Run the setup.exe application In Linux: Install the RPM package or unzip the ZIP package

2. Run the Modem Installation Wizard to install the modem and configure basic connections. (See Section 3.4 on page 13)

Connect the modem to the computer and start the Wizard from the start menu (Celtius Mobile Messaging Gateway/Modem Wizard) as an Administrator in Windows or run the run_modem_wizard.sh script as root in Linux.

3. When the wizard has finished, browse to the Status tab, and start the Gateway. (See Section 4.5 on page 53) 4. Run the Java sample application: change directory to <gateway_dir>/samples/java and execute run.bat or run.sh.
If Modem Installation Wizard (step 2) fails to detect a modem, see Section 3.5 on page 19 to install the modem manually. If Modem Installation Wizard fails to configure SMS/MMS connections, or if you want to use some other type of connection, see Section 4.4 on page 37. If you want to use some other application than the included sample applications, see Section 4.3 on page 30.

2.1 Starting the Mobile Messaging Gateway Manager


Configuration of the gateway is done with a www-based Gateway Manager. Normally (when the Modem Installation Wizard is already run once) you would like to start the Gateway Manager directly: In Windows: Run the Manager from the Start Menu (Celtius Mobile Messaging Gateway/Mobile Messaging Gateway Manager), or use the desktop shortcut. Run the run_manager.sh script in the installation directory

In Linux:

See Section 4 on page 27 for instructions of the Gateway Manager.

Celtius Ltd.

http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide

- 10 -

3 Installation
Mobile Messaging Gateway requires Windows XP, or Linux operating system. X Window support is very recommended in Linux, but not an absolute requirement.

3.1 Installing the Gateway


NOTE: Any previous versions of Mobile Messaging Gateway must be uninstalled before installing a new version. Hardware requirements:

15 MB of disk space 128 MB of memory

Installing on Windows
You must be logged on as an administrator or a member of the Administrators group in order to install Mobile Messaging Gateway, which is delivered as a single self-extracting installer package. To start installation, just run the installer executable. The installer will: 1. Extract Mobile Messaging Gateway files to the specified location. 2. Add shortcuts to the Start menu and optionally on the desktop. 3. Install and start the Mobile Messaging Gateway as a windows service.

Installing on Linux, ZIP package


If the Mobile Messaging Gateway is delivered as a zip package: 1. Extract Mobile Messaging Gateway files to the specified location. 2. If you have X Window System installed: In the gateway's installation directory run the Modem Installation Wizard by calling ./run_modem_wizard.sh, or skip the wizard and start the Gateway Manager by calling ./run_manager.sh If you don't have X Window System, call ./gwmanager 20304 and browse to the gateway manager's URL (http://<ip-address>:20304) with a text-based browser, such as Lynx, or with a graphical browser from another computer. 3. Mobile Messaging Gateway can be started via gateway manager or on command line. In both cases the gateway starts running as a background (daemon) process. Note that you don't have to run the gateway or manager as root (see Adjusting the routing table section on page 27 for instructions). However, root privileges are needed if you are using the Modem Installation Wizard (see Section 3.4).

Installing on Linux, RPM package


RPM version of the Mobile Messaging Gateway requires that the target Linux distribution supports 'Sys V' style service control. In other words the gateway will install its startup scripts to /etc/rc.d/init.d directory. RPM package should work at least on the following distributions:

Mandrakelinux 10.1 Fedora Core 2 http://www.celtius.com

Celtius Ltd.

Celtius Mobile Messaging Gateway User's Guide

- 11 -

Red Hat 9

Mobile Messaging Gateway RPM package is installed just like other RPM packages. To install the RPM package, follow these steps: 1. As root give the following command (replace the name with the name the package has) rpm -i celtiusmmg-2.x.x-1.i386.rpm RPM installer will inform you, if the gateway needs some dependency packages (for example 'ppp'). You should install those packages first and then run again the command above. If the installation succeeded, you can query the version by typing rpm -q celtiusmmg 2. The gateway manager can be started in two ways: 1. If you have X Window System installed, call /usr/local/bin/cmmg_manager

The gateway manager starts and a web browser will be launched If you want to start the Modem Installation Wizard, run run_modem_wizard.sh instead of cmmg_manager

2. Without X Window support, call /usr/local/celtiusmmg/gwmanager 20304 gateway.conf and browse to the gateway manager's URL (http://<ip-address>:20304) with a text-based browser, such as Lynx, or with a graphical browser from another computer. Note that the RPM version of the Mobile Messaging Gateway (including Gateway Manager) needs root privileges to install and run. Documentation, sample applications etc. are installed to /usr/local/celtiusmmg directory. The installed Mobile Messaging Gateway can be updated with a new version by using the rpm -U <package-name> command, and it can be removed by calling rpm -e celtiusmmg

3.2 License files


In order to use this product you need a valid license file "clicense.bin". If the license file was not included in the CMMG package, you can request one from Celtius Ltd. An evaluation license will be valid for a limited number of days, typically 21 days. On Windows, the license file must be placed either in gateway's installation directory e.g. C:\Program Files\Celtius\Celtius Mobile Messaging Gateway Lite\clicense.bin OR in the root directory of drive 'C': C:\clicense.bin. On Linux the license file must be placed in the gateway's installation directory. Without the license file, you will receive error "Could not read license file". If the license file has expired (or is not found), you will receive error "Your license for this software has expired."

Celtius Ltd.

http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide

- 12 -

3.3 Supported Modems


We highly recommend the following modems:

Siemens MC35iT GPRS modem MultiModem EDGE, RS-232 Model

These are dedicated GPRS modems with AT-command support and multiplexing mode. They have been proven to be reliable and compatible with the gateway. Siemens provides multiplexing drivers for the MC35iT modem in Windows environment. Both modems are connected with RS232 serial interface. Note: We do not recommend USB connected modems because of their unreliability. For example, the COM-port/device name may be different when the modem is inserted at different times. In addition, some USB modems do not work on Linux at all, and even on Windows the USB drivers can be poor. Additionally, such modem cannot be switched on through the USB interface as is possible with RS-232. However, Mobile Messaging Gateway should work with any modem supporting GPRS data connections and GSM 07.05 AT-commands. Additionally, the gateway supports Nokia D211 PC-Card modem, but we recommend using modems that use AT-commands for SMS reception (D211 does not). The following modem types are supported:

A dedicated GSM/GPRS modem (recommended)


Can be an external modem or a PC-card. Works for both SMS and MMS sending/reception. Some modems have multiplexing support (see below).

A mobile phone with GPRS modem support (not recommended) It is possible to use the gateway with a mobile phone with built-in modem support. You need a cable (or infrared/bluetooth port) that allows the phone to be used as a modem (e.g. for internet connection). Mobile phone modems have the following characteristics:

SMS and MMS sending usually works. MMS reception does not work. SMS reception MAY not work. MMS delivery report reception does not work. SMS delivery report reception MAY not work.

Some mobile phones, such as Nokia 9210 Communicator and Nokia Series 60 phones do not support SMS reception when used as modem. There could also be problems receiving concatenated SMS messages with a mobile phone.

Multiplexing Mode in Modems


Certain modems support GSM 07.10 multiplexing (Mux) mode that can divide one physical serial port into two or three virtual serial ports. One virtual serial port can be used for GPRS connection and the others can be used for AT-commands (e.g. an SMS connection). Celtius Ltd. http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide

- 13 -

To take this mode into use, special multiplexing drivers must be installed into the operating system. After installing the drivers, the modem will be visible as two or three virtual serial ports. By using different ports for GPRS connection and SMS connection, the gateway does not have to alternate between a dialup connection and AT-command connection. Multiplexing drivers are freely available for Linux (written by one of our employees). But the availability of Windows drivers depends on the modem manufacturer. For example, Siemens provides good multiplexing drivers for their Siemens MC35(i) modems.

3.4 Using Modem Installation Wizard


If you want Mobile Messaging Gateway to send SMS messages with modem AT commands or send MMS messages over a GPRS connection, a GPRS/GSM modem must be installed. Celtius Mobile Messaging Gateway Manager provides a modem detecting and installation wizard. The wizard can be used to install dial-up connection and test sending of SMS and MMS messages. The wizard creates SMS and MM1 connections so that you can test the gateway with GSM/GPRS modem. Follow these steps: 1. Insert a working SIM card into the modem. But before inserting a SIM card, make sure MMS sending and reception works with the same SIM card in an MMS phone. 2. Connect the modem to the computer with PC Card slot, Serial cable, IRDA, USB, or Bluetooth as instructed in the modem's manual. Switch on the modem. 3. Start the Modem Installation Wizard: In Windows: In Linux: Start the wizard from the start menu (Celtius Mobile Messaging Gateway/Modem Wizard) Log in as root and start the wizard from command line by entering ./run_modem_wizard.sh" in the installation directory. If you don't have X Window System installed, you may have to start the wizard manually by calling ./gwmanager 20304 and access the wizard with a text based browser, or by using a web browser from another computer.

The wizard should open automatically a web page in following address: http://localhost:20304/?page=admingui/8&new=1&wizard=1 . If the wizard doesn't start, please start your browser manually and try to go to this URL. 3.4.1 Wizard steps Step 0

Celtius Ltd.

http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide

- 14 -

Figure 3: Start page of the Modem Installation Wizard

After starting the Wizard, a web browser is started and you should see the page shown in Figure 3. The wizard is divided into nine steps. By clicking the Start button, the wizard starts detecting modems that are installed to the system. Note: Depending on the operating system, detection of the modem(s) may take several minutes. The next page of the wizard is loaded when the detection step is finished. Please be patient. Step 1

Figure 4: Finding and selecting modem

On this page the modem device is selected. The page should contain a selection with every modem in the system. After you have selected the modem, which you want to install, press the Next button on the page. In Windows it is recommended to select some Modem device if possible instead of a serial port device, if your modem has installed some special drivers into operating system. For example, if the wizard detected a Standard 19200 bps Modem and a device in serial port COM1, you should select the Standard 19200 bps Modem. If the Modem device doesn't work, then you should try with the serial port. If the wizard didn't find any modems, please check that your modem is properly connected to your system and device is switched on. Check that modem drivers have been installed. Celtius Ltd. http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide

- 15 -

Try again by reloading the web page. If this doesn't work you should try to install the modem manually (see Section 3.5) and configure connections with the Gateway Manager (see Section 4). Step 2

Figure 5: Inserting the PIN code

After Step 1 you should see the web page shown in Figure 5. Here you should insert the PIN code for the modem's SIM card. If you don't have PIN code set for the SIM card leave the field empty. Press Next button to move to the next page. Step 3

Figure 6: Sending a test SMS message

On this page (Figure 6) you can set a phone number to test your modem connection for SMS messages. If the field is left empty no test message is send, otherwise the Wizard will try to send a SMS message to this phone number after you have pressed the next button. The message should contain text: Celtius Mobile Message Gateway Test Message. Please note that this will take some time and you should wait for some time to receive this message before answering the question on the next wizard page. Celtius Ltd. http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide

- 16 -

Step 4

Figure 7: Confirming the receiving of SMS

On the fourth page (Figure 7) you are asked whether you received the test SMS-message or not. If you didn't set any phone number, please answer yes, although you didn't receive any SMS message. If you didn't receive the SMS message although you did set a phone number, please go back and try to change the settings set earlier. If you cannot send a SMS, please check that the SIM card is properly installed into your modem device. Step 5

Figure 8: Configuring the MM1 Connection

After you have answered yes to the question, the fifth step of the wizard will open and page should look like the page shown in Figure 8. On this page settings for MM1 Celtius Ltd. http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide

- 17 -

connection are configured. There are several pre-configured operator settings in the wizard. Please select your operator from the list of operators. If you didn't find your operator select the User Defined selection from the drop down list. Some of the settings may be out of date. You should check the correctness of these settings and correct them into the fields if needed. Some of the settings are not even required or have to be left empty for some operators. For example username and password are usually left empty for many operators. Access Point Name (APN) is a required setting. Operators have usually separate access points for MMS traffic and general internet access. You should use the MMS access point (e.g mms.example.com) given by your operator. Some operators may have not enabled the MMS support by default (in this case contact your operator's customer services first). If your operator gives you a password for MMS messaging, fill it to the Password field. After you press the next button, the wizard will try to install a new dial-up connection and test this connection by dialing. This may take several minutes, especially in Windows . If you have problems with the installation, try to change the settings. If this doesn't help you should try manual configuration and dial-up installation explained in Section 3.5 If you don't want to configure an MM1 Connection for MMS messages, press the No MMS Support button. Step 6

Figure 9: Configuring additional MM1 settings and sending a test MMS message

On the sixth page (Figure 9) additional MM1 connection settings are configured. If you did find your operator on the previous page in the list, the two first fields (MMSC URL, gateway/proxy) should be filled with correct settings (please check the correctness). Otherwise:

Fill the Multimedia Message Service Center URL (MMSC URL), for example http://mms.example.com:8002/. Value depends on operator. Fill the WAP Gateway/HTTP Proxy address in format <ip-address>:<port>, for http://www.celtius.com

Celtius Ltd.

Celtius Mobile Messaging Gateway User's Guide example: 192.168.43.8:8080. Value depends on operator. See Section 4.4.3 for details of these settings, if needed.

- 18 -

Again if you want to test your MM1 connection fill the phone number field to test the sending of MMS message. Please note that the sending of the message will take some time and that is why you should wait for some time before pressing any buttons. Step 7

Figure 10: Confirming the receiving of MMS

On the seventh page (Figure 10) of the wizard you are asked, whether you received a MMS message or not. If you didn't set any phone number, answer here Yes. Please note that usually receiving the MMS message to your mobile phone can take much longer than receiving a SMS message so you should wait for some time before answering No to this question. If you didn't receive the MMS message try to go back and change some settings and try again. If this doesn't help try to configure with the Manager (see Section 4). Step 8 The final step (Figure 11) tells you that the wizard has finished.

Figure 11: Wizard done

Celtius Ltd.

http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide After you have answered done, the normal manager view should appear (Figure 12).

- 19 -

Figure 12: Mobile Messaging Gateway Manager

3.5 Connecting GSM/GPRS Modem Manually


If Modem Installation Wizard did not detect any modems, you can try to install the modem and configure the dial-up connection manually. If the Wizard completed successfully, you may skip this chapter and proceed to Section 4. 3.5.1 Installing the Modem Here are the steps for setting up the modem: 1. Insert a working SIM card into the modem. But before inserting a SIM card, make sure MMS sending and reception works with the same SIM card in an MMS phone. 2. Connect the modem to the computer with PC Card slot, Serial cable, IRDA, USB, or Bluetooth as instructed in the modem's manual. Switch on the modem. 3. Test the serial port connection:

Open Hyperterminal (Start->Programs->Accessories->Communications in Windows) or Minicom (in Linux). Note that if you aren't logged in as root in Linux, your username has to belong to the uucp group (defined in /etc/group). Select the port where the modem is connected. Try writing ATZ and pressing return. (ATZ-command should initialize the modem) The modem should respond OK or 0, when the connection is working. If not, try different ports and baud rates. Write down the working port/device name and the baud rate, and then exit the serial communication program.

3.5.2 Setting up a GPRS Dialup Connection GPRS connection is required for MMS sending and reception over GPRS/GSM modem. Celtius Mobile Messaging Gateway uses the dialup networking of your operating system. Before setting up the dial-up networking, you need the following information from your Celtius Ltd. http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide operator:

- 20 -

MMS Access Point Name (APN), which is usually different from the internet APN: The access point name (APN) selects the network to which the GPRS will connect. Typically operators have access point called internet for Internet access and something else for the MMS access.

Username and password for the APN.

If your modem came with instructions on setting up a GPRS dial-up connection, follow them. If not, read one of the following sections. After you have created a dialup connection, you can create a Dialer (see Section ), an SMS Connection, and an MM1 Connection in the Mobile Gateway Manager. Section 4 describes how this can be done.

Adding a Dialup Connection on Windows

Figure 13 Selecting the correct modem.

Dial-up connections are configured in slightly different ways in Windows 2000 and Windows XP. These instructions are made for Windows 2000, but they should work also for Windows XP. Please note that Windows XP is the only supported Windows platform for the gateway.

Go to Control panel and go to Phone and modem options.

Celtius Ltd.

http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide


- 21 -

Click on the modem tab along the top of the dialog box. Windows usually automatically adds infrared and bluetooth modems. If your modem doesn't already show on the list, click on Add... (Figure 13).

You may let the Windows recognize your modem automatically or you can configure it by hand (Figure 14).

Figure 14 Installing a new modem driver.

If you configure the modem by hand, use the information you acquired before (baud rate and serial port name) and select a modem that corresponds those (Standard xxx bps modems work usually well).

Figure 15

When the modem is installed, click on Finish (Figure 15).

Select your modem from the list and click on Properties... (Figure 13) to bring up a http://www.celtius.com

Celtius Ltd.

Celtius Mobile Messaging Gateway User's Guide configuration screen.


- 22 -

Go through each of the tabs along the top and make sure your modem is configured correctly. On the Advanced tab, add a command to set the Access Point Name. Generic command is AT+CGDCONT=1,"IP","<APN>" Figure 16 shows an example where APN is mms. Note that the APN depends on the operator.

Figure 16 Set APN for the GPRS connection.

Click Ok to save the changes.

Your modem is now setup correctly under Windows. The next stage is to configure Dial up Networking for your GPRS connection.

Go to Network and Dial-up Connections in the Control Panel. Click on Make New Connection or New Connection Wizard. Click Next on the wizard startup screen. Choose Dial-up to the Internet or in Windows XP Connect to Internet and click Next (Figure 17).

Celtius Ltd.

http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide

- 23 -

Figure 17

On the next screen, select Set up my connection manually and click Next. Then select I connect through phone line or modem or in Windows XP Connect using a dial-up modem and click Next. Select your GPRS modem from the list and click Next.

Figure 18

For the phone number, use *99***1#, which is the standard way to initiate a GPRS connection (Figure 18) and click Next. If your operator requires username and password, specify them and click Next. Give a descriptive name for the connection, e.g. GPRS MMS.

Celtius Ltd.

http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide


- 24 -

Choose not to set up Internet mail account. Don't make the dial-up connection your default Internet connection.

Now you have configured a dial-up connection to GPRS network. Usually you want to be able to use your LAN connection simultaneously with the dial-up connection. In order to do that, you still need to do the following things.

Right click the connection you just created in Network and Dial-up Connections and click on properties in the pop-up menu. Click on the networking tab along the top of the dialog box.

Figure 19

Select Internet Protocol (TCP/IP) from the list and click on Properties... (Figure 19). Click on Advanced... from the next dialog. Uncheck Use default gateway on remote network (Figure 20).

Celtius Ltd.

http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide

- 25 -

Figure 20

Click Ok on all dialogs to save changes.

Now you can test to connect to your dial-up connection. If you're prompted for a password, enter the correct password and save it, because the gateway cannot enter a password. The test might fail, if you haven't entered the PIN code of the SIM card. You can give the PIN code in Hyperterminal with the command: AT+CPIN=1234 When the connection is used from Celtius Mobile Messaging Gateway, this is not the problem, because the SMS Connection is capable of entering the PIN code.

Adding a Dialup Connection on Linux


You need to have ppp installed when using dialup connections on Linux. Also minicom or other terminal emulator is recommended for testing the modem. To help setting up the GPRS connection, the gateway includes sample pppd configuration files in the pppscripts directory. The gateway will call one shell command (init-gprs.sh) to establish the GPRS connection, and another command (kill) to disconnect. To make init-gprs.sh work, you need to perform the following steps: 1. Add the following line to /etc/modules.conf (or /etc/modprobe.conf if kernel version is 2.6 or greater) options ppp_async flag_time=0 Celtius Ltd. http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide This makes ppp framing more reliable. Some phones/modems need this setting.

- 26 -

2. Edit pppscripts/gprs_cmmg-connect-chat and write your operator's MMS Access Point Name (APN) there. The APN depends on your operator and is typically something like mms or mms.operator.net. 3. Edit pppscripts/gprs_cmmg and select the serial device on which the modem is connected. Select also the port speed: this must be the same as in the corresponding SMS Modem Connection (see SMS Connection section on page 39). 4. Edit pppscripts/init-gprs_cmmg.sh and write the first three numbers of you operator's gateway/proxy IP address to the route command: route add -net x.y.z.0 netmask 255.255.255.0 dev `tail -1 /var/run/ppp-gprs_cmmg.pid` Replace x.y.z with the first three numbers of your operator's WAP Gateway / HTTP proxy IP address. This routes all packets with destination addresses between x.y.z.0 x.y.z.255 to the dial-up connection, while other packets are still routed to your normal default gateway. It's good practice to use address range instead of a single address, because the operator might do some load balancing redirections to other addresses than the actual WAP gateway address. The routing command above and the fact that defaultroute pppd option is NOT used in gprs_cmmg, enable your LAN and the GPRS connection to work simultaneously. 5. Copy gprs_cmmg, gprs_cmmg-connect-chat, and gprs_cmmg-disconnectchat scripts to /etc/ppp/peers and set their permissions: # cp pppscripts/gprs_cmmg* /etc/ppp/peers/ # chown root:root /etc/ppp/peers/gprs_cmmg* # chmod u+rwx,g=rx,o=rx /etc/ppp/peers/gprs_cmmg-connect-chat # chmod u+rwx,g=rx,o=rx /etc/ppp/peers/gprs_cmmg-disconnect-chat Note: The script names should use following formats (in the example case <name> is gprs_cmmg): <name> <name>-connect-chat <name>-disconnect-chat init-<name>.sh 6. Make sure init-gprs.sh has execution permissions. # chmod u+rwx,g=rx,o=rx pppscripts/init-gprs.sh 7. Test the GPRS connection:

Run minicom or other communications program and give the PIN code for the modem: (Replace 1234 with your SIM card's PIN code) AT+CPIN=1234 This phase is needed only when testing the ppp connection: The Mobile Messaging Gateway will automatically give the PIN code to the modem when started.

Quit minicom Execute the pppscripts/init-gprs.sh script and see if there are any errors. When the script returns, the GPRS connection should be open. You can e.g. run http://www.celtius.com

Celtius Ltd.

Celtius Mobile Messaging Gateway User's Guide ifconfig to view information about the connection.

- 27 -

Close the PPP connection: kill `head -1 /var/run/ppp-gprs_cmmg.pid`

Now the dialup connection should be ready for the Mobile Messaging Gateway. See section on page for instructions on how the Mobile Messaging Gateway will use the init-gprs.sh script to form the dial-up connection. Adjusting the routing table Note that adjusting the routing table with init-gprs.sh needs root privileges. You have three alternatives to allow the adjustments: 1. Run the Mobile Messaging Gateway as root OR 2. Set SUID mode on /sbin/route OR 3. Use sudo to get temporary root access for /sbin/route :

Make sure that sudo is installed on your system Run the visudo configuration tool and add add the following line to the /etc/sudoers configuration file (replace user_name with your name or group name): your_name ALL= NOPASSWD: /sbin/route In init-gprs.sh uncomment the route command that begins with 'sudo', and comment the other route command without 'sudo'.

If you have problems setting up the GPRS connection or you need more information about the pppd settings, please see the following URL: http://www.iki.fi/mikko.rapeli/linux_gprs.html

4 Gateway Manager
Mobile Messaging Gateway Manager helps you to configure Mobile Messaging Gateway. In Windows: Start the Mobile Messaging Gateway manager from the start menu (Celtius Mobile Messaging Gateway). In Linux: Start the Mobile Messaging Gateway manager from command line by entering ./run_manager.sh in the installation directory. If the gateway was installed as an RPM package, also cmmg_manager command works. If you don't have X Window System installed, you may have to start the manager manually by calling ./gwmanager 20304 and access the manager with a text based browser, or by using a web browser from another computer.

The manager should open automatically a web page in following address: http://localhost:20304/ .If it doesn't, start your browser and browse to the address. You should see the web page shown in Figure 22. The manager has five tabs: General, Applications, Connections, Status and Manager. Following sections describe the functions of each tab. Please note the following things: Celtius Ltd. http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide

- 28 -

When you change settings, you must always click Save button in order to save the changes. You must restart the gateway (in the Status tab) to make the changes take effect.

Figure 21 You can set a password for the Mobile Messaging Gateway Manager in the Manager screen.

4.1 Manager Configuration


Switch first to the manager tab (Figure 21). The manager can be also used remotely, so you should configure the manager to require user authentication.

Type in username and password. Press Save button. Press Stop Manager to stop the manager. Restart the manager from your Start menu or command line.

The manager settings are now saved, but they won't affect until the manager is restarted.

Celtius Ltd.

http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide

- 29 -

Figure 22 The General screen can be used to change the global settings of the gateway.

4.2 General Gateway Configuration


On this tab (Figure 22), you can change global Mobile Messaging Gateway settings. The available settings are discussed below: Log file name Logged Classes The absolute path and file name of the log file that will be produced by the gateway. Usually you don't need to change this. This setting affects what kind of messages are written to the log file. Here are the explanations of each log level: Fatal Critical Warning Debug A serious problem that stops the gateway. A serious problem. The operation fails, but the gateway continues working. A small problem. The operation may still succeed. Some additional information about the gateway's actions.

It's normally enough to have Fatal, Critical, and Warning logging levels checked, but when you're configuring gateway or having problems, you should also have Debug class checked. Filename for id storage The absolute path and file name of the file where the gateway stores information about message IDs. Usually you don't need to change this. Gateway default port This changes the port to which the applications (and EAIF connections) connect when they send messages to the gateway. http://www.celtius.com

Celtius Ltd.

Celtius Mobile Messaging Gateway User's Guide

- 30 -

If you have already a server running in the port 8009, change the port number to a free one. Number of threads This limits the number of simultaneous connections to the gateway's default port. If you receive hundreds of messages from several applications or if you have over 20 applications using persistent connections, you should increase this value. Normally you don't need to change this number.

After you have changed values, click Save to save the changes. Note: For the changes to take effect, you must restart the gateway in the Status tab.

4.3 Application Configuration

Figure 23 The screen shows one Celtius Form Application (c_sample)

On the Applications tab (Figure 23), you specify the applications that use the gateway. Figure 23 shows the Applications screen with five Celtius Form Applications. EAIF Applications can be viewed by clicking the EAIF Application link on the left. The applications can send/receive SMS and MMS messages to/from the Gateway with the following protocols: Celtius Form (SMS and MMS over HTTP) EAIF (MMS only) The future releases of Mobile Messaging Gateway will support also MM7 and SMTP for MMS messaging. Table shows an overview of the configured applications: Name Gateway Address The symbolic name of the application. The address in which the gateway listens messages from this application. The address is automatically generated by the gateway and each application uses a different gateway URL. Configure this URL as the gateway address in your application. http://www.celtius.com

Celtius Ltd.

Celtius Mobile Messaging Gateway User's Guide Buttons are: Edit

- 31 -

Modify the settings for this application. This opens a new configuration screen that allows application settings and addresses to be changed. The available settings depend on the application type. Deletes the application. Messages will not be sent/received anymore to/from this application and any application settings will be lost. Inserts a new application. New configuration screen is opened. To help testing your Connections, there is a Test... button on each CeltiusForm application row. This button will open a HTML page from which you can send messages to the gateway with your Web browser. This is possible because CeltiusForm uses the same message format as Web browsers. From the gateway's point of view, it seems like your application sent the messages. Note that the test page will NOT send the messages to your application. So it can be used only for testing the Connections.

Delete

Add Test...

After installation, the gateway has several sample applications configured. If you want, you can remove them by clicking Delete button on the end of the application row.

Celtius Ltd.

http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide

- 32 -

Figure 24: Configuring a Celtius Form application

4.3.1 Celtius Form Applications Celtius Form Application interface is fairly simple but powerful. All the sample applications use Celtius Form connections. It can be used both for receiving and sending of SMS and MMS messages. It uses HTML form POST methods in communication (see Section 5) for details). Figure 24 shows details of an application. The settings are: Name The symbolic name of the application. This can be freely chosen but may contain only characters 'a'-'z' and '_'. The name may not contain spaces or special characters. After the application has been created, the name cannot be changed. This is part of the routing rules. It lets you specify, which To address the messages must have in order to be forwarded to this application:

Destination

If you don't want to receive messages having a certain address in the to field, set that address to the destination field and check the is not checkbox above. http://www.celtius.com

Celtius Ltd.

Celtius Mobile Messaging Gateway User's Guide If you want to receive messages irrespective of the To address, use * and don't check the checkbox. Keyword

- 33 -

This is part of the routing rules. It lets you specify the word, which must be the first word of the messages forwarded to the application (only messages starting with the keyword will be sent to the application). In MMS messages, the word will be searched in the textual attachments. The keyword is case insensitive. For example: If keyword is alert, this application will only receive messages starting with word alert. If the is not checkbox above is checked, the application will only receive messages that are not starting with alert.

Message Type options Application URL

This is part of the routing rules. You can choose whether the application wants to receive SMS or MMS messages or both. Specifies the address in which the application listens for messages from the gateway. This must be of the form: http://hostname:port/path. Specifies the character set encoding which the gateway uses when forwarding messages to the application. Gateway converts all textual parts of the message to this character set. The gateway supports the following character sets: ISO-8859-1 UTF-8 UTF-16 UTF-16LE UTF-16BE iso-10646-ucs-2 UTF-32 UTF-32LE UTF-32BE Note: This setting does not affect how the gateway interprets characters sent from the application. The application must set the Charset parameter when sending messages to the gateway (see Section 5).

Charset

Allowed IP Address/mask Specifies the address or address range from which the gateway

will accept connections. You should normally write here the IPaddress of the computer on which your application is running. If you set this to 0.0.0.0/0, the gateway will allow connections from any IP address. You can use a mask, for example: 192.168.13.0/24 The sample applications are configured so that they have to run on the same machine as the gateway (127.0.0.1 means localhost). If you run the sample applications on some other Celtius Ltd. http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide host, change this field. Basic Authentication

- 34 -

These fields specify whether the gateway should require authentication from the application. If the fields are empty, no authentication is required from the application.

Once you have filled all the necessary fields, click Save to create the new application or save the changes you have made to an existing application. When you save the settings you will get back to Applications list (Figure 23). If you don't want to save your changes, use the Back button of your browser to get to the Applications list. Note: For the changes to take effect, you must restart the gateway in the Status tab.

Figure 25 Configuring an EAIF application

4.3.2 EAIF Applications EAIF is an MMS messaging protocol specified by Nokia [EAIF]. It can be used for sending and receiving MMS messages. Celtius Mobile Messaging Gateway package does not include sample code for building EAIF applications but e.g. Nokia provides a free Java MMS SDK for EAIF applications. EAIF library for C++ is available from Celtius Ltd. Figure 25 shows EAIF Application settings form for a new application. The Message Routing and Application URL fields are similar to Celtius Form application. The screen has Celtius Ltd. http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide the following fields: Name Destination

- 35 -

The symbolic name of the application. Same limitations apply as in Celtius Form application names (See Section 4.3.1). Part of the routing rules. Determines what the recipient address must be in messages routed to this application. This is same as in Celtius Form applications, see Section 4.3.1. Part of the routing rules. Determines what keyword must exist in the messages routed to this application. This is same as in Celtius Form applications, see Section 4.3.1. The address where the EAIF application will wait for messages. The gateway will send the incoming messages to this address. This is same as in Celtius Form applications, see Section 4.3.1.

Keyword

Application URL

Basic Authentication tokens expected by the application. If the EAIF application requires basic HTTP authentication, put the credentials here. Basic Authentication that Gateway requires from the application. If you want the gateway to require basic HTTP authentication from the application, configure the settings here. When you have typed in new application settings, click Save. Note: For the changes to take effect, you must restart the gateway in the Status tab.

Celtius Ltd.

http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide

- 36 -

Figure 26: Creating MM7 Application

4.3.3 MM7 Applications MM7 is the protocol for sending/receiving MMS messages between a Value Added Service Provider (VASP) and an MMSC. It requires a special contract with the telecom operator. MM7 is similar to EAIF, except that it is a vendor-independent protocol specified by 3GPP. Unlike MM1, MM7 works over a wired TCP/IP network such as the Internet. The protocol uses SOAP and HTTP to transfer the messages. Here are descriptions of each of the fields when creating an MM7 Application: Name Destination Symbolic name for the MM7 application. Part of the routing rules. Determines what the recipient address must be in messages routed to this application. This is same as in Celtius Form applications, see Section 4.3.1. It's usually good to check is not and type in *@*, so that messages targeted to e-mail addresses are not sent through this connection. MM7 does support sending messages to email addresses, but it may cost much more than a direct SMTP connection. Keyword Part of the routing rules. Determines what keyword must exist in messages routed to this connection. This is same as in Celtius Form applications, see Section 4.3.1. http://www.celtius.com

Celtius Ltd.

Celtius Mobile Messaging Gateway User's Guide Application URL

- 37 -

Type in the address of the application. The address must start with http://. This is the address where the application listens to MM7 messages. If your program requires HTTP Basic Authentication, type here the username and password.

Username, Password

4.4 Connection Configuration


Applications don't have to know or care how the MMS and SMS messages are delivered to their recipients: this task is performed by Connections to various messaging centers. These connections send SMS/MMS messages to external servers, such as MMS centers, SMS centers or email servers. Mobile Messaging Gateway supports the following protocols:

MM1 EAIF GSM 07.05 SMTP MM7 SMPP* CIMD2* UCP/EMI*

(MMS over GPRS) (MMS over Internet) (SMS over GSM modem) (SMS and MMS over Internet to e-mail: sending only) (MMS over Internet) (SMS over Internet) (SMS over Internet) (SMS over Internet)

* Only available in Linux Note that Lite version of the Mobile Messaging Gateway supports only a subset of the protocols listed above. After running the Modem Installation Wizard, there should be SMS and MM1 connections configured in the gateway. These connections enable sending and receiving of SMS/MMS messages, depending on the modem. You can add, edit, or remove connections any time. For the changes to take effect, you must restart the gateway in the Status tab. 4.4.1 Connections Tab The connections to modems and messaging servers are managed on the Connections tab. Figure 27 shows the tab with two SMS connections. Other type of connections can be viewed from the list on the left. A connection can be an SMS or MMS connection to your operator's network via a GPRS/GSM modem or Nokia D211 multimode card. The table shows the connections of the specified type and some essential information about them. By clicking the Edit button details of the connection can be viewed and edited.

Celtius Ltd.

http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide

- 38 -

Figure 27 Overview of the configured SMS connections

Name Protocol Settings Message Type

Name of the application. This can be chosen by the user. This shows the connection type (the protocol used by the connection). This shows the most important settings for the connection. The settings depend on the connection type. You can change these settings by editing the connection (see below). Shows what types of messages (SMS and/or MMS) the connection will handle. For some connection types, such as SMTP, this can be selected by the user, but for the others, it is predetermined.

Destination Addresses Shows what the recipient address must be for the messages to be sent to this connection. For example, it is useful to make the SMTP connection send all messages having '@' in recipient address, and make the other connections send any other messages (that don't have '@' in recipient address). The buttons are: Edit Modify the settings for this connection. This opens a new configuration screen that allows connection settings to be changed. Deletes the connection. Messages will not be sent/received anymore to/from this connection and any settings will be lost.

Delete

The Add button adds a new connection. The following sections describe the configuration of the connections.

Celtius Ltd.

http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide

- 39 -

Figure 28 SMS Connection settings

4.4.2 SMS Connection SMS Connection uses AT-commands to send and receive SMS messages with a GSM/GPRS modem or phone. Figure 28 shows the setting fields. If you are editing an existing connection, some of the fields may be pre-configured. If you didn't use the wizard, here you need the information you got when you tested the modem with Hyperterminal or Minicom (See page 19). Name Symbolic name for the SMS connection. Do not use special characters here. The name will be used when creating an MM1 connection that reads notification messages from SMS messages. Part of the routing rules. Determines what the recipient address must be in messages routed to this connection. This is same as in Celtius Form applications, see Section 4.3.1 on page 32. It's usually good to check is not and type in *@*, so that messages targeted to e-mail addresses are not sent through this connection. Keyword Part of the routing rules. Determines what keyword must exist in messages routed to this connection. This is same as in Celtius Form applications, see Section 4.3.1 on page 32. http://www.celtius.com

Destination

Celtius Ltd.

Celtius Mobile Messaging Gateway User's Guide Device

- 40 -

The modem or serial port that will be used for the SMS connection. The connection will send AT-commands to this port. You can select the port from the list or if there is no list, type in the port/device name (to which the modem is connected). If your modem supports multiplexing (several virtual serial ports), choose a different serial port from the one you used for the dialup connection modem. In addition, use only the virtual ports, not the actual port. For example, if modem is connected to /dev/ttyS0 and this port is multiplexed, do not use directly the /dev/ttyS0. Use /dev/mux0 etc. instead. See Section 3.5.1 for details.

PIN code

Write here the PIN (Personal Identification Number) code of the SIM card in the modem. The gateway will give the code to the modem when it is started. Type here the phone number of the SIM card. This is used as To-field in SMSs when they are forwarded to the applications. This is needed because an incoming SMS message does not contain the recipient address. Enter the baud rate in which the modem worked, when you tested the modem. Typically, 19200 works here but values as high as 57600 or 115200 may also work. In Linux the baud rate should be the same as in the GPRS connection settings, see Section 3.5.2 on page 19.

Phone number

Baud Rate

Hardware flow control This is another serial port setting. It's usually good to enable hardware flow control. GSM Phase 2+ commands If you experience problems in SMS receiving, uncheck this option. The connection usually detects automatically whether the modem supports these commands. SMS over GPRS If this is checked, the modem tries to send the SMSs over GPRS (+CGSMS=2). However, if GPRS is not available the SMSs are sent over the circuit switched service (+CGSMS=3). SMS over GPRS mode may be a bit faster, but the operator may not support this service. If you still experience problems in SMS receiving, check this option. This mode of SMS reception is slower but may work better. Instead of giving the SMS directly (+CMT), the modem will give a message notification (+CMTI), and the message is then read (and deleted) from the SIM card.

Receive SMS via SIM

Click Save to save the connection. Note: For the changes to take effect, you must restart the gateway in the Status tab. 4.4.3 MM1 Connection MM1 is the protocol used by mobile phones to send/receive MMS messages. All you need is a SIM card and a GPRS modem to start using this connection type. From the telecom Celtius Ltd. http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide

- 41 -

operator's point of view, the Gateway (with MM1 connection) looks like an MMS-enabled mobile phone. No special contract with the operator is needed. The same MMS settings used in mobile phones must be given for the MM1 connection. The MM1 protocol can work over two transports: WAP (WAP 1.2) and HTTP (WAP 2.0). The Gateway supports both of them. All operators should support WAP transport but HTTP may not be supported. Before you can configure an MM1 connection, you need to find out the following MMS settings (you may have given these settings already during the Modem Installation Wizard):

GPRS access point (APN) for MMS messaging (If you are configuring dial-up connection manually without the wizard: put this in modem settings, see Section 3.5.2). WAP Gateway IP address (also known as Gateway IP, or IP Address) OR HTTP proxy IP address only if you are going to use HTTP transport. MMS Center URL (also known as Home Page, URL address, or MMS Message Server). wap.sonera.net 195.156.25.33:9201 195.156.25.33:80 http://mms.sonera.net:8002/

For example, TeliaSonera Finland has the following settings: APN: WAP gateway: HTTP proxy: MMSC URL:

You can find your settings by: Looking at the settings of an MMS-enabled mobile phone that uses the same operator as your modem. Searching your operator's Internet pages for the MMS settings. Searching the Internet for your operator's MMS settings.

When you have found the correct MMS settings, you can start the MM1 connection configuration. Note: Before you can configure an MM1 Connection, there should be a configured SMS connection (see the previous sections). Here are descriptions of each of the fields when creating an MM1 Connection (see Figure 29):

Celtius Ltd.

http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide

- 42 -

Figure 29 You need to know your operator's MMS settings when configuring an MM1 connection.

Name Destination

Symbolic name for the MM1 connection. The name is not significant to the gateway. Part of the routing rules. Determines what the recipient address must be in messages routed to this application. This is same as in Celtius Form applications, see Section 4.3.1 on page 32. If you have configured an SMTP connection, it's usually good to check is not and type in *@*, so that messages targeted to email addresses are not sent through this connection. MM1 does support sending messages to email addresses, but it costs much more than a direct SMTP connection.

Keyword

Part of the routing rules. Determines what keyword must exist in messages routed to this connection. This is same as in Celtius http://www.celtius.com

Celtius Ltd.

Celtius Mobile Messaging Gateway User's Guide Form applications, see Section 4.3.1 on page 32. Protocol The transport protocol that you intend to use. This is closely related to the WAP gateway/HTTP proxy setting:

- 43 -

If you select WSP, you must type WAP gateway address. If you select HTTP, you must type HTTP proxy address.

All operators should support WAP, so try it first and use the WAP gateway setting. If it does not work, only then try HTTP and the HTTP proxy setting. Operator There are several pre-configured operator settings in the Manager. Please select your operator from the list of operators. If you didn't find your operator select the User Defined selection from the drop down list. Some of the settings may be out of date. You should check the correctness of these settings and correct them into the fields if needed. Type in the address of the operator's MMS center. The address must start with http://. Type in the gateway/proxy IP address and port. The address must be of the form: a.b.c.d:port, where a,b,c, and d are decimal numbers between 0-255 and the port is a decimal number. Do not use extra leading zeros in the address: Do not write 010.000.000.001:9201, but write it like this: 10.0.0.1:9201. You must use:

The URL of MMSC

WAP gateway/HTTP proxy

WAP gateway IP address, if you are using WSP as the protocol. Note that the WAP gateway port is always 9201. HTTP proxy IP address, if you're using HTTP. The port is usually 80 or 8080 but can be something else. The IP address could be the same as for the WAP gateway.

Phone number SMS connection

The phone number of the SIM card. This is necessary if you use Destination based routing in applications. MM1 protocol uses SMSs for receiving certain special messages (MMS notifications and delivery reports) from the MMS Center. This is why MM1 Connection needs an associated SMS connection. The SMS connection must use the same modem as the Dialer that will be selected below. Select the dialer (you configured earlier) that will be used to connect to the operator's GPRS network. (If you have a direct connection, leave this empty.) If your SMS connection uses the same serial port/device as the dialup connection of the dialer, select alternating . If your modem supports multiplexing (drivers must be installed) and you use

Dialer

SMS connection and dialer co-operation

Celtius Ltd.

http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide different serial ports for dialer and SMS connection, select simultaneous (See Section 3.5).

- 44 -

If you select alternating, the gateway will switch between SMS connection using AT commands and MM1 connection using GPRS dialup (not supported for Nokia D211 Connections). Dialers are links from the gateway to the dialup connections of the operating system. You must configure a dialer if you are going to use an MM1 connection (MMS over GPRS modem). Modem Installation Wizard may already have filled the Dialer Settings. If you didn't use the wizard, you have to fill these settings manually: Access Point Name The access point name (APN) selects the network to which the GPRS will connect. Typically operators have access point called internet for Internet access and something else for the MMS access. You must use the APN specified for MMS traffic. Select from the drop-down list the Dial-up connection you have created in Windows, or type the name of the GPRS connection script you have created in Linux. See Section 3.5.2 for details how to set-up a dial-up connection. If you have created the MM1 connection with the Modem Installation Wizard, you should leave this setting unchanged. If your operator requires username for GPRS access, fill it here. If your operator requires password for GPRS access, fill it here. If the gateway computer is connected to a LAN and/or the Internet (usually this is the case), you need to specify the destination IP-address range that will be routed to the dial-up connection. Type in the IP address range of the WAP gateway or HTTP proxy. If the WAP gateway / proxy address is a.b.c.d, usually a good address range is a.b.c.0/24. It's good practice to use an address range instead of a single address, because the operator might do some load balancing redirections to other addresses than the actual WAP gateway address. Automatically restore default gateway after dial-up connection has been formed You don't have to check the last box, if you changed the advanced IP settings as instructed on page 24 or if you don't have other network connections than the dial-up connection on your computer. If you check the last box, the mobile messaging gateway will save the default gateway before forming a dial-up connection and after the dial-up connection is formed, it will restore the original default gateway. You can try using this setting if your LAN or Internet connection stops working when the dial-up connection starts.

Dial-up Connection

Username Password IP Address / mask

Celtius Ltd.

http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide When you have made all the settings, click Save to save the MM1 connection.

- 45 -

Note: For the changes to take effect, you must restart the gateway in the Status tab. 4.4.4 Nokia D211 Connection (Windows) This connection allows the usage of Nokia D211 PCMCIA (PC-Card) modem for simultaneous SMS sending/receiving and dial-up connection on Windows. It depends on the version of Celtius Mobile Messaging Gateway, whether this connection is included. In order to use this connection, you need to have d211ipc.dll in your path. You can get the DLL file from Nokia D211 SDK. It is recommended to select the simultaneous mode for the SMS connection and dialer cooperation setting (see Section 4.4.3), if you are using Nokia D211. You only need to configure Message Routing fields for this connection. They are configured same way as in SMS Connection, see Section 4.4.2. Note that Nokia D211 Connection is an alternative to a SMS Connection. So if you have a Nokia D211 Connection, you don't have to configure any SMS Connections.

Figure 30: Settings for Nokia D211 Connection

Celtius Ltd.

http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide 4.4.5 Eaif Connection

- 46 -

Figure 31 EAIF Connection settings.

EAIF is a protocol for sending/receiving MMS messages to/from operator's MMSC over the Internet [EAIF]. It requires a special contract with the telecom operator. EAIF is a proprietary protocol from Nokia. Recenlty 3GPP has specified MM7 protocol (see Section 4.4.6), which is a common vendor-independent protocol intended to replace EAIF and other vendor-specific solutions. However, EAIF is still widely used and usually more efficient than MM7. EAIF Connection configuration is similar to EAIF application configuration (page 34). The only differences are:

Type in the MMSC address instead of the application address. If you want the gateway to receive messages from the operator asynchronously, check the Asynchronous receiving used and set the number of threads to the number messages you want the gateway to process simultaneously.

Celtius Ltd.

http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide

- 47 -

Figure 32: Creating MM7 Connection

4.4.6 MM7 Connection MM7 is the protocol for sending/receiving MMS messages between a Value Added Service Provider (VASP) and an MMSC. It requires a special contract with the telecom operator. MM7 is similar to EAIF, except that it is a vendor-independent protocol specified by 3GPP. Unlike MM1, MM7 works over a wired TCP/IP network such as the Internet. The protocol uses SOAP and HTTP to transfer the messages. Here are descriptions of each of the fields when creating an MM7 Connection: Name Destination Symbolic name for the MM7 connection. Part of the routing rules. Determines what the recipient address must be in messages routed to this application. This is same as in Celtius Form applications, see Section 4.3.1. It's usually good to check is not and type in *@*, so that messages targeted to e-mail addresses are not sent through this connection. MM7 does support sending messages to email addresses, but it may cost much more than a direct SMTP connection. Celtius Ltd. http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide Keyword

- 48 -

Part of the routing rules. Determines what keyword must exist in messages routed to this connection. This is same as in Celtius Form applications, see Section 4.3.1. Type in the address of the operator's MMS center. The address must start with http://. This is the address where the MMSC listens to MM7 messages. If the MMSC requires HTTP Basic Authentication, type here the username and password. The identifier of the Value Added Service Provider. If necessary, this will be given to you by the operator. The identifier of the Value Added Service. If necessary, this will be given to you by the operator. Code to be used in charging by the operator MMSC. Select the version your operator's MMSC supports. If you have problems with the MM7 connection, you may have to try all the different versions.

The URL of MMSC

Username, Password VASPID VASID Service Code MM7 Version

4.4.7 SMTP Connection SMTP (e-mail) connection can be used for sending SMS and MMS messages directly to e-mail accounts. This saves money because messages don't go through the Operator's MMSC. SMTP connection is useful for inexpensive testing of your MMS/SMS sender applications. Currently, the email connection does not support receiving messages from email servers. SMTP connection configuration page is shown in Figure 33. Name, Destination, Keyword, and message type fields are similar to the application configuration (see Section 4.3.1). Name Destination Symbolic name for the SMTP connection. Part of the routing rules. Determines what the recipient address must be in messages routed to this connection. This is same as in Celtius Form applications, see Section 4.3.1. Typically, you should enter *@*, so that messages intended to e-mail addresses will be forwarded through this connection. Keyword Part of the routing rules. Determines what keyword must exist in messages routed to this connection. This is same as in Celtius Form applications, see Section 4.3.1. Specifies the server to which the gateway sends e-mails with smtp protocol. This is the same server that you use in your email client. The sender address that is used if the message from the application does not contain the From field.

SMTP server

Default sender

Click Save to add the SMTP connection. Note: For the changes to take effect, you must restart the gateway in the Status tab. Celtius Ltd. http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide

- 49 -

Figure 33: Creating SMPP Connection

4.4.8 SMPP Connection (Linux) Here are descriptions of each of the fields when creating an SMPP Connection: Name Destination Symbolic name for the SMPP connection. Part of the routing rules. Determines what the recipient address must be in messages routed to this application. This is same as in Celtius Form applications, see Section 4.3.1. Part of the routing rules. Determines what keyword must exist in messages routed to this connection. This is same as in Celtius Form applications, see Section 4.3.1. Hostname or IP-address of the SMSC Port, where SMSC is listening SMPP connections If used messages are send and received using the same port. In this case there is no need to set a reiceiver-port. Receive port Port number, where we listen for incoming SMPP connections. This used to receive SMS messages if the TRANCEIVER mode http://www.celtius.com

Keyword

SMSC host SMSC port

Use TRANCEIVER mode

Celtius Ltd.

Celtius Mobile Messaging Gateway User's Guide is not used. SMSC username SMSC password Service type Service type Interface version Address range My number Used for authentication to the server. Used for authentication to the server. See [SMPP]. Usually left empty. See [SMPP]. Usually left empty.

- 50 -

Which version of the protocol should be used. Currently versions 3.3 and 3.4 are supported. See [SMPP]. Usually left empty. It is likely that this field is not supported by many smsc or is ignored. Smsc short number See [SMPP].

Source address TON, Source address NPI Destination address TON, Destination adresss NPI See [SMPP]. Message id type Used to define which type of message ids are used by the SMSC in deliver_sm and submit_sm_resp messages.

Celtius Ltd.

http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide

- 51 -

Figure 34: Creating CIMD2 Connection

4.4.9 CIMD2 Connection (Linux) Here are descriptions of each of the fields when creating a CIMD2 Connection: Name Destination Symbolic name for the CIMD2 connection. Part of the routing rules. Determines what the recipient address must be in messages routed to this application. This is same as in Celtius Form applications, see Section 4.3.1. Part of the routing rules. Determines what keyword must exist in messages routed to this connection. This is same as in Celtius Form applications, see Section 4.3.1. Hostname or IP-address of the SMSC Port, where SMSC is listening CIMD2 connections Used for authentication to the server. Used for authentication to the server. Integer value. The maximum amount of time (seconds) that the http://www.celtius.com

Keyword

SMSC host SMSC port SMSC username SMSC password Keepalive Celtius Ltd.

Celtius Mobile Messaging Gateway User's Guide connection will be kept idle. Value 0 disables this feature. Do not request deliver reports If set true no delivery-report will be requested. Our port If you want to bind the port in our side, set the port here.

- 52 -

Figure 35: Creating UCP/EMI connection

4.4.10 UCP/EMI Connection (Linux) Here are descriptions of each of the fields when creating a UCP/EMI Connection: Name Destination Symbolic name for the UCP/EMI connection. Part of the routing rules. Determines what the recipient address must be in messages routed to this application. This is same as in Celtius Form applications, see Section 4.3.1. Part of the routing rules. Determines what keyword must exist in messages routed to this connection. This is same as in Celtius Form applications, see Section 4.3.1. Hostname or IP-address of the SMSC Port, where SMSC is listening UCP/EMI connections http://www.celtius.com

Keyword

SMSC host SMSC port Celtius Ltd.

Celtius Mobile Messaging Gateway User's Guide Alternative Host Alternative Port SMSC username SMSC password Our port Receive port Optional, alternative SMSC host Optional, alternative SMSC port Used for authentication to the server. Used for authentication to the server. Optional, if you want to bind our connection to specific port

- 53 -

Optional, the port in which we listen for SMSC to send messages. Needed if the SMSC needs separate connections for sending and receiving. Only from these addresses are allowed to connect to the receive port Interger, Connections will be closed after the amount of idle timeout secods. Integer, Sends a keepalive message after this many seconds after last message. Time (seconds) we wait for message ack. After this Ack expire action is performed. Action for expired ack Either stop and wait or windowing. Size of the window. Max value 100. Used for short number See [UCP/EMI].

Allow Idle timeout Keepalive Wait for ack Ack expire action Flow-control Window size My number

Notification PID, Notification Address

4.5 Monitoring and Starting/Stopping the Gateway


On the top of the Status tab shown in Figure 36, you can see whether the gateway is running or not. You can also start and stop the gateway on this page by clicking the appropriate button. You must stop and start the gateway each time you have changed the settings.

Celtius Ltd.

http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide

- 54 -

Figure 36 The Status tab shows that the gateway is stopped.

The bottom of the Status tab shows the last lines of the gateway log file. The log file will contain various kinds of messages depending on the logged message classes selected in the General tab (see Section 4.2.). The Status page is automatically refreshed every 5 seconds. You can change the refresh rate in the drop-down list. You can also change the number of log lines shown on the screen from the other drop-down list. If JavaScript is enabled in your browser, the changes will be applied automatically. If not, you will have to click on Apply. Note that you don't have to stop or restart the manager itself, when you have changed some of the gateway's settings. In addition, you can leave the gateway running and stop the manager (and leave the browser), because the Gateway and the Gateway Manager run independently from each other.

4.6 About Message Routing


Celtius Mobile Messaging gateway routes messages based on the message type, destination and keyword. The gateway manager lets you control the routing rules. On Applications tab you can specify, how messages from connections are routed to the applications, and on Connections tab you can specify, how messages from applications are routed to the connections. If a message matches to the routing rules of several connections or applications, it's routed to all of them. Celtius Ltd. http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide

- 55 -

Currently the gateway supports three message types: SMS, MMS and reports in routing. Reports are automatically routed back to the original sender applications. It depends on the application/connection type whether you can specify the message type that it accepts. For example EAIF can be used only for MMS, so the gateway automatically routes only MMS messages to it, but Celtius Form Applications and SMTP connections can accept both SMS and MMS messages. For these you must specify what kind of messages they will accept. Destination address is given in the To parameter for a message. Currently gateway supports e-mail addresses and phone numbers. Internally the gateway uses MMS style addressing in which the phone numbers have a /TYPE=PLMN postfix while e-mail addresses are normal. So if an application sends a phone number as +358501234567, the gateway will change it to +358501234567/TYPE=PLMN for routing. You can use stars as wildcard in beginning and end of the destination address. This allows quite versatile routing as shown in Figure 37.

Application 1 Application 2 Application n


Figure 37

To=*@*

Celtius Mobile Messaging Gateway

SMTP Connection SMS Connection EAIF Connection MM1 Connection

Type=SMS, To=*/TYPE=PLMN Type=MMS, To=+35840* Type=MMS, To=+35850*

Keyword is the first word of the message. It's useful when there are several applications that want to receive messages from the same connection as shown in Figure 38.

Application 1 Application 2 Application n


Figure 38

The SMTP (email) connection should typically have a rule that recipient address must be of the form *@*. On the other hand, other connections should then have rules that recipient address must NOT be of the form *@*.

Celtius Ltd.

...

Keyword=weather Keyword=news

Keyword=xyz

Celtius Mobile Messaging Gateway

MM1 Connection SMS Connection

...

http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide

- 56 -

5 Celtius Form Application Interface


Celtius Form Applications communicate with the gateway over HTTP using the same message formats as Web browsers when they send form data (see [HTML]), namely:

application/x-www-form-urlencoded multipart/form-data

The basic idea of these formats is to pass Names-Values-pairs called Parameters over HTTP. These parameters will carry the SMS/MMS message data to/from the gateway. For example parameter named Text will carry the SMS text in its value. The next section describes these data formats in more detail and discusses how the gateway uses them. You don't need to know the exact data formats if you use one of the sample applications as starting point. In this case, you can skip the following section.

5.1 Data Formats


The data formats application/x-www-form-urlencoded [HTML] and multipart/form-data [RFC2388] were chosen because many programming languages have libraries for handling them. For example, all Web server side programming languages have support for receiving application/x-www-form-urlencoded format, because this is the format sent from HTML forms. Most server side programming languages support also multipart/form-data. 5.1.1 application/x-www-form-urlencoded Application/x-www-form-urlencoded format looks like this: name1=value1&name2=value2 In addition, spaces are replaced with '+' and non-alphanumeric characters are replaced by '%HH', where HH is the hexadecimal representation of the character. See [HTML] for more information. 5.1.2 multipart/form-data Multipart/form-data is similar to other MIME multipart formats and looks like this: Content-Type: multipart/form-data; boundary=ABC123 --ABC123 Content-Disposition: form-data; name="name1" value1 --ABC123 Content-Disposition: form-data; name="name2" value2 --ABC123-See [RFC2388] for more information about the format. Most web-application programming languages support multipart/form-data format by default. The format is similar to MIME multipart/mixed, so the MIME functions of the Celtius Ltd. http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide programming language can be used, if the language doesn't support directly the multipart/form-data encoding. 5.1.3 Sending over HTTP There are three ways to send parameters over HTTP with these data formats: 1. HTTP GET with parameters in the query part of the URL in application/x-www-formurlencoded format. For example:

- 57 -

http://mobilegw.company.com/?To=%2B358501234567&Text=Hello+world 2. HTTP POST with parameters in the HTTP message body in application/x-www-formurlencoded format. For example: POST / HTTP/1.1 Host: mobilegw.company.com Connection: close Content-Type: application/x-www-form-urlencoded Content-Length: 35 To=%2B358501234567&Text=Hello+world 3. HTTP POST with parameters in the HTTP message body in multipart/form-data format. For example: POST / HTTP/1.1 Host: mobilegw.company.com Connection: close Content-Type: multipart/form-data; boundary=---------------------------7d42361f1072c Content-Length: 345 -----------------------------7d42361f1072c Content-Disposition: form-data; name="To" +358503682898 -----------------------------7d42361f1072c Content-Disposition: form-data; name="Text" Hello world! -----------------------------7d42361f1072c Content-Disposition: form-data; name="File"; filename="Z:\projects\mm1\samples\sample.gif" Content-Type: image/gif GIF89ad ( # B# ########B#B#J... -----------------------------7d42361f1072c-Multimedia messages are always sent the third way (multipart/form-data over HTTP POST) because application/x-www-form-urlencoded is not suitable for binary files (e.g. pictures). SMS messages can be sent in all three ways, as discussed in the following sections. However, HTTP and HTML specifications state that GET method should be used only for requests that cause no side-effects, so the first way is not recommended.

Celtius Ltd.

http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide 5.1.4 From Application to Gateway Applications can send messages to the Gateway as follows:

- 58 -

SMS:

application/x-www-form-urlencoded over HTTP GET (the first way above) application/x-www-form-urlencoded over HTTP POST (the second way above) multipart/form-data over HTTP POST (the third way above) multipart/form-data over HTTP POST (the third way above)

MMS:

In order to send a message, the application makes a HTTP request to the mobile gateway. In other words, the application works as a HTTP client. After the application has sent the message, the gateway responds with one of the following HTTP statuses:

200 303

If message sending succeeded (and ContinueURL parameter was not specified). If the user has specified ContinueErrorURL or ContinueURL. This is useful if the message was sent directly from a Web browser: the browser will be redirected to either the ContinueErrorURL or the ContinueURL (specified in the message request), depending on the success. If message sending failed (and ContinueErrorURL was not specified).

400

If the message was received successfully, the gateway returns a Message-ID header in the HTTP response. The header will contain a message ID assigned for the message by the gateway. The same message ID will be used later in delivery reports sent by the gateway. 5.1.5 From Gateway to Application The Gateway sends messages to Applications as follows:

SMS: application/x-www-form-urlencoded over HTTP POST (second way above) MMS: multipart/form-data over HTTP POST (the third way above)

If the application wants to receive messages, it must listen to HTTP requests from the gateway. This means the application must work as a HTTP server. Web applications are naturally running on a Web server so this is not a problem. But in other kinds of applications, the application must contain an embedded HTTP server (see the Java sample in Section ). The gateway expects to get 2xx OK response from the application when sending messages. It ignores about body of the response.

5.2 Parameters
This section describes the parameters (name-value-pairs) that are used when sending/receiving messages in a CeltiusForm connection. The parameters are encoded in application/x-www-form-urlencoded or multipart/form-data formats as Celtius Ltd. http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide discussed in the previous section. Same parameter names are used both in reception and sending of messages. The following table lists all the parameter names the Celtius Mobile Messaging Gateway supports. The following sections describe in more detail the parameters required for certain message types. Parameter Name Type Message Type All Description

- 59 -

Specifies the message type, which can be sms, mms, sms_report, si, mms_delivery_report, or mms_read_report. If the application doesn't provide this parameter, the gateway will try to guess the type. Specifies the recipients. If there are several recipients, they are separated by commas. It is also possible to have several To parameters (the gateway will concatenate the values with comma). Text for the message. The gateway will split automatically SMSs longer than 160 characters long (or 60 characters long when UTF-16 charset is used). Specifies the charset used in textual parameters such as Text and Subject. This is by default UTF-8. Other supported values are: ISO-8859-1, UTF-16BE, UTF16LE, etc. Sender phone number or address. Note that sender address cannot be changed for messages, if the transport protocol doesn't support it (e.g. SMSs sent with GSM modem).

To

All

Text

All (Not reports) All with Text field

Charset

From

All

ContinueURL

All from The URL to which the gateway will redirect the application browser after successful message submission. If this parameter is not given, the gateway will only return HTTP 200 OK status and Message-ID header with the id given for the message by the gateway. All from URL to which the gateway will redirect the browser if application the message submission fails. MM Subject for the message. MM from Contains the contents of an uploaded file posted via the a form with a MIME encoding of multipart/form-data, application or specifies an HTTP URL pointing to the file content when specified in an HTTP GET request. The gateway will generate content-ids automatically for files. MM from the gateway List of parameter names that contain attached files. When the gateway submits multimedia messages to the application, the Content-IDs of the files will be http://www.celtius.com

ContinueErrorURL Subject File

Files

Celtius Ltd.

Celtius Mobile Messaging Gateway User's Guide Parameter Name Message Type Description

- 60 -

used as parameter names. If the multimedia message contains a presentation part, that will be the first one in the list. <xxx> MM Contains the contents of an uploaded file posted via a form with a MIME encoding of multipart/form-data. xxx is the content-id of the file.

ImmediateDisplay StatusReport Message-ID

Text SMS Set to 1, if the SMS should be shown immediately on the recipient's device. SMS Set to 1, if a status report is requested. Reports The id of the message that the report concerns. and messages from gateway Reports Reports Binary SMS Binary SMS Binary SMS Binary SMS Binary SMS MM MM MM Status code Textual description of the status code. Set to 1 for binary message submission Data of binary SMS. A text string of hexadecimal characters representing the Header of binary SMS (UDH). A hex value representing the SMS Protocol ID (PID) of the message. A hex value representing the value of the SMS Data Coding Scheme (DCS) for this message. Set to Yes, if read report is requested. Set to Yes, if delivery report is requested. In addition to parameters described above, the gateway will send all headers of mms messages as parameters to the application. The URL to which the Service Indication points. The service indication creation time (must be in ISO format e.g. 2004-12-24T10:00Z). The service indication expire time (must be in ISO format e.g. 2004-12-24T12:00Z). Service Indication ID The action of service indication: signal-none, http://www.celtius.com

Status StatusText Binary Data UDH PID DCS X-Mms-Read-Report X-Mms-DeliveryReport Bcc, Cc, Date, etc.

WAPURL WAPSICREATED WAPSIEXPIRES WAPSIID WAPSIACTION Celtius Ltd.

SI SI SI SI SI

Celtius Mobile Messaging Gateway User's Guide Parameter Name Message Type Description

- 61 -

signal-low, signal-medium, signal-high, or signal-delete. (SI means Service Indication, a WAP push message containing an URL. SI is sent over SMS.) To be compatible with applications written for Now SMS/MMS gateway, the gateway supports the following parameters as aliases in requests from the application to the gateway: Parameter Name PhoneNumber MMSText MMSSubject MMSFrom Sender MMSFile Message Type All MM MM MM All MM To Text Subject From From File Mapped to

5.3 SMS Sending and Receiving


There are various different SMS message types

Textual SMSs

7-bit GSM default character set 16-bit UCS-2 character set (allows use of oriental and other special characters) WAP Push

Binary SMSs

Service Indication

Operator logos Ring tones etc.

Status reports

Mobile Messaging Gateway supports sending/receiving of textual/binary SMS messages and receiving of status reports. 5.3.1 Sending Textual SMSs If the application wants to send a text message, it's usually sufficient to specify the following fields:

Type

The message type. For SMS messages this is sms. http://www.celtius.com

Celtius Ltd.

Celtius Mobile Messaging Gateway User's Guide

- 62 -

To

The recipient of the message, typically a phone number. This can be also an email address if SMTP connection has been configured in the gateway (see Section 4.4.7). The text for the SMS message.

Text

The following URL could be used for example for text message sending with HTTP GET: http://mobilegw.company.com/apps/myapp?Type=sms&To=%2B358501234567 &Text=Hello+world SMS messages can be sent also with HTTP POST as discussed in Section 5.1.3 The application can also specify following parameters:

Charset

The character set for data in the Text parameter. If not specified, UTF-8 is assumed. See Section 4.3.1 for the list of available character sets. The sender of the message.

From

ImmediateDisplay If set to 1, the SMS will be shown on the screen of the mobile phone immediately after receiving. StatusReport If set to 1, the gateway will send an acknowledgement about the delivery of the message (or an error if the message could not be delivered).

Before sending the SMS, gateway will convert the Text part to either UCS-2 or the 7-bit SMS character set. If Charset parameter is set to UTF-16, UTF-16BE, or UTF-16LE, the 16 bit UCS-2 character set will be used, otherwise the 7-bit character set. The gateway supports long SMS messages: if the Text does not fit in one SMS message, the gateway will automatically split it to two or more SMSs. 5.3.2 Sending Service Indications Service Indication (SI) is a WAP push message containing an URL and a short textual message. URL is a link to some online content and after receiving the SI, the mobile user can download the content over GPRS. Service Indications are sent over SMS and are thus inexpensive. Many value added service providers use Service Indications instead of MMS messages for transmitting images, videos, ring tones, etc to mobile phones. In order to send a service indication the application must send the following parameters:

Type Text To WAPURL

The message type. For Service Indications, this is si. The short text part for the service indication. The receiver of the service indication, typically a phone number. The URL to be sent to the mobile phone.

Sending an SI with HTTP GET would look something like this: http://mobilegw/apps/myapp?Type=si&To=%2B358401234567&WAPURL=http% 3A%2F%2Fwww.celtius.com%2F&Text=Visit+Celtius SI messages can be sent also with HTTP POST as discussed in Section 5.1.3.

Celtius Ltd.

http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide The application can also specify the following parameters:

- 63 -

Charset WAPSIACTION WAPSICREATED WAPSIEXPIRES WAPSIID StatusReport

5.3.3 Sending Binary SMSs There is currently no customized interface for other binary SMSs than the service indications. If the application wants to send other kind of binary SMSs, it must set the parameter Binary=1 and put the correct values for the following parameters:

PID UDH DCS Data

SMS Protocol ID (See Section 5.2) User data header, specified in GSM 03.40, (See Section 5.2) SMS Data Coding Scheme (See Section 5.2) The binary data.

If the message is so long that it needs to be split to several pieces, the gateway will do that automatically. 5.3.4 Receiving Textual SMSs When Celtius Mobile Messaging Gateway sends text messages to an application it uses the following parameters:

Type From Text Message-ID

sms The sender of the message. The text of the message converted to the character set specified in the application configuration (see page ). An id assigned for the message by the gateway.

If the text message was so long that it was split into several SMSs, the gateway will concatenate the parts before delivering the message to the application. 5.3.5 Receiving Binary SMSs When Celtius Mobile Messaging Gateway sends binary SMSs to an application it uses following parameters:

Type Binary From Data DCS

sms 1 The sender of the message. The message data. SMS Data Coding Scheme (See Section 5.2)

Celtius Ltd.

http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide


- 64 -

PID UDH Message-ID

SMS Protocol ID (See Section 5.2) User data header, specified in GSM 03.40, (See Section 5.2) An id assigned for the message by the gateway.

If the binary message is so long that it's split to several SMSs, the gateway will concatenate the parts before delivering the message to the application.

5.4 MMS Sending and Receiving


Multimedia message is a set of multimedia files. It similar to an e-mail message with attachments. It can contain for example text, pictures, audio, and video. A multimedia message can also contain a special SMIL-file telling how to present the multimedia content. Operators and mobile phones usually limit the size of multimedia messages (e.g. to 100 kbytes). This should be taken into account when sending a multimedia message. Celtius Mobile Messaging Gateway supports sending and receiving of multimedia messages, and receiving of delivery reports and read reports. Note: Not many operator or phones support read reports, so they should not be requested. 5.4.1 Sending a Multimedia Message Normally when application sends a multimedia message, it uses the following parameters:

Type To Text File

The message type. For multimedia messages, this is mms. The destination address(es) separated by commas For example, first.lastname@company.com, +3585012345 Text for the message. This will be added as a textual attachment to the message. File to be attached to the message. There can be several File parameters and each one contains an attached file or an HTTP URL of a file. If there is an URL, the gateway will read the file from that location. The subject of the message. Set to Yes, if the application wants to get a read report (not usually supported by the operator). The sender of the message. If the application uses other charset than UTF-8 in Text or Subject parameters, this field must be used. See Section 4.3.1 for the list of available character sets.

The application can also specify following parameters:


Subject X-Mms-Read-Report From Charset

X-Mms-Delivery-Report Set to Yes, if the application wants to get a delivery report.

Celtius Ltd.

http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide 5.4.2 Receiving a Multimedia Message

- 65 -

The most important parameters sent by the gateway are listed below. The gateway converts header values and textual (text/plain) attachments to the character set specified in the application configuration.

Type From To Message-ID Files <xxx>

mms The sender of the multimedia message. The recipients of the multimedia message. A message ID generated by the gateway. Lists the parameter names containing attachments. The names are separated by spaces. (See Section 5.2) The attachments. The xxx is the attachment name, which exists in Files.

The gateway sends also all the multimedia message headers (such as Subject, Cc, XMms-Read-Report etc.) as parameters to the application. 5.4.3 Sending a Read Report Read reports are not usually supported by mobile phones and operators. But in some cases the sender of the multimedia message might request a read report. This is indicated by the X-Mms-Read-Report being set to Yes. When receiving such a message the application should send a read report with the following fields to the gateway:

Type=mms_read_report Message-ID Status The message-id of the received message Set to 128 to indicate Read or Set to 129 to indicate Deleted without being read

5.5 Receiving Reports


If the application requests a report (with StatusReport, X-Mms-Delivery-Report or X-MmsRead-Report parameters) when it sends a message, the gateway will later report message status back to the application. Every time application sends a message to the gateway, the gateway will return a Message ID in the HTTP response headers. The same ID is included in the reports so that the application can identify which message the report concerns. The gateway uses following parameters in reports:

Type Message-ID From StatusText

Indicates the report type, which can be sms_report, mms_delivery_report, or mms_read_report Indicates the message, which the report concerns. Indicates which recipient of the message the report concerns. Textual description of the Status parameter. http://www.celtius.com

Celtius Ltd.

Celtius Mobile Messaging Gateway User's Guide

- 66 -

Status

Numeric status code which depends on the status type:

For sms_report it can be: 1 SMS delivered successfully. 2 SMS delivery failed. 4 SMS buffered for delivery. 8 SMS delivered successfully to SMSC (not all connections use this). 16 SMS delivery to SMSC failed (not all connections use this, they use 2 instead). 128 Message was read. 129 Message was deleted without being read. 128 Expired 129 Retrieved 130 Rejected 131 Deferred 132 Unrecognised 133 Indeterminate 134 Forwarded 135 Unreachable

For mms_read_report it can be:


For mms_delivery_report it can be:


6 Sample Applications
The Celtius Mobile Messaging Gateway package includes several sample applications that you can use as a starting point for your own applications. Currently, sample applications are provided for the following programming languages:

Java C PHP Visual C#.NET / ASP.NET Visual Basic.NET / ASP.NET

The samples demonstrate how to send/receive SMS/MMS messages to/from the gateway. The samples are located under samples/directory in the Gateway's installation directory. You can start browsing the samples directory by clicking Explore Samples Folder in the Start menu (under Celtius Mobile Messaging Gateway). After installation, the Gateway has all sample applications preconfigured in its Applications list. But to prevent security problems, they are allowed to connect only from localhost. So you should run the sample applications on the same computer as the Gateway OR you Celtius Ltd. http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide should change the IP-allowing settings of the sample applications with the Gateway Manager.

- 67 -

For more information about running the samples, see readme.txt under each sample's directory.

7 Feedback
If you want send some feedback concerning the Celtius Mobile Messaging Gateway, please use the Feedback form in the Gateway Manager. This requires working Internet connection.

8 Troubleshooting
This section lists solutions to some problems that may be encountered.

In Linux the evaluation license (clicense.bin) is in the installation directory, but the gateway still claims the license has expired.
Check that the configuration file (gateway.conf) is in the same directory with the license file. Another reason could be that the license has indeed expired.

Can I run Mobile Messaging Gateway and the Gateway Manager in Linux without X Window support?
Yes, you can. Instead of the 'run_manager.sh' script, you should start the Gateway Manager manually by typing ./gwmanager 20304 gateway.conf in the installation directory. After this browse to the Gateway Manager's URL with a graphical web browser from another computer, or use a text based browser (e.g. Lynx) locally. The URL is of the form http://<ip-address>:20304, for example http://192.168.11.20:20304.

In Linux the status page of Mobile Messaging Gateway Manager keeps saying that the gateway is starting or stopping and there is no buttons to stop or restart the gateway.
This may happen if the starting or stopping has failed or another error has occurred. You should remove mobilegw.starting, mobilegw.stopping, and mobilegw.pid files (if present) from the installation directory. Check also that the gateway isn't running in the background, by calling ps -e | grep mobilegw . If you find processes named as mobilegw, kill them all by calling kill <process-id>. After these steps you should be able to start the gateway via the gateway manager.

In Linux the Mobile Messaging Gateway Manager doesn't start but just says
Couldn't start HTTP server!

The gateway manager may already be running. Another reason is that the gateway was stopped just a moment ago and the port (e.g. 20304) is still in TIME_WAIT state. You should wait a while, e.g. one minute, and try to start the gateway manager again. Alternatively you can start the gateway in another port (e.g. 20305).

Mobile Messaging Gateway Manager cannot open the log file.


Check that the file names defined on the General page have absolute paths (e.g. Celtius Ltd. http://www.celtius.com

Celtius Mobile Messaging Gateway User's Guide


/tmp/gw_log.txt

- 68 -

in Linux). Note that the log file is generated during the first start of the Mobile Messaging Gateway.

Starting the Mobile Messaging Gateway fails with Couldn't open serial port! and Mobile Messaging Gateway startup failed error messages in the log file.
Check that the dial-up connection isn't formed. If the dial-up connection is active, the gateway cannot access the modem during the startup, and so you should shutdown (or kill) the dial-up process manually and then try to start the gateway again. In Linux check also that your username belongs to the uucp group (defined in /etc/group). Otherwise you don't have access to the serial port without root privileges.

The gateway opens the dialup connection OK, but the MMS sending does not work
Make sure you have the correct MMS access point name (APN) configured in the MM1 Connection settings. Make sure you have not configured the the internet access point name there. Most operators offer two GPRS access points: one for Internet access, and another for MMS sending/receiving. The gateway needs to use the MMS access point.

On Windows: make sure you don't have active Winsock Proxy client on your computer. This prevents dialup connections from working properly. Go to Control Panel - WSP Client and disable the proxy client there.

References
EAIF: , Nokia MMS Center 3.0 External Applications Developer's Guide, 2003 SMPP: SMS Forum, Short Message Peer-to-Peer Protocol Specification Version 3.4, UCP/EMI: LogicaCMG, Short Message Service Centre EMI-UCP Interface, HTML: Dave Raggett, Arnaud Le Hors, Ian Jacobs, HTML 4.01 Specification, 1999 RFC2388: L. Masinter, RFC 2388 - Returning Values from Forms: multipart/form-data, 1988

9 Acknowledgements
This product includes software developed by the Kannel Group (http://www.kannel.org/).

Celtius Ltd.

http://www.celtius.com

Das könnte Ihnen auch gefallen