C H A P T E R  9

Mobile Originated Push Messages

Mobile Originated (MO) push technology makes it possible for subscribers to initiate requests for content. Push listener adapters are used by Content Delivery Server to receive these messages.

A push adapter serves as the interface between Content Delivery Server and your push implementation for receiving messages. Configure Content Delivery Server to use the push listener adapters that you need.

The push listener adapters provided with Content Delivery Server are described in the following sections. If these adapters do not provide the functionality that you need, you can create your own push listener adapter using the Messaging API. See the Sun Java System Content Delivery Server Customization Guide for information on this API.

This chapter contains the following topics:


9.1 Push Listener Adapter

Content Delivery Server provides push listener adapters for an SMSC that supports CIMD2 or SMPP 3.4. Messages directly from the SMSC in HTTP format are also supported.

Messages must be in the following form:


[shared-keyword] [device-prefix | campaign-prefix] bundle-ID | content-ID | keyword | campaign-coupon

TABLE 9-1 describes the message parameters.


TABLE 9-1 MO Push Message Parameters

Parameter

Description

shared-keyword

Identifier assigned by an SMSC. This parameter is required only if you use a shared keyword assigned by your SMSC.

device-prefix

String that identifies the type of device the subscriber is using. This parameter is required only for messages from users not registered with Content Delivery Server.

campaign-prefix

String that identifies the message as a request for a campaign.

bundle-ID

Bundle ID that identifies the bundle that the subscriber is requesting. Bundle IDs consist of a bundle prefix and a number assigned by Content Delivery Server when the bundle is created.

content-ID

Content ID that identifies the content that the subscriber is requesting. Content IDs are assigned by Content Delivery Server when content is submitted.

keyword

Keyword that identifies the content that the subscriber is requesting. Keywords are assigned by the Vending Manager administrator and are optional.

campaign-coupon

Coupon that is associated with the requested campaign. This parameter is valid only if campaign-prefix is used.


To handle MO push messages from subscribers, configure the Subscriber Portal and Messaging Service as described in the following sections.

9.1.1 Configuring the Subscriber Portal for MO Push

Set the following properties in the SubscriberPortal.properties file, which is in the $CDS_HOME/deployment/deployment-name/conf directory:

Set the bundle.prefix property in the CDS.properties file, found in the $CDS_HOME/deployment/deployment-name/conf directory. This property defines the prefix used in a bundle ID. The default is b.

9.1.2 Configuring the Messaging Service for MO Push

Configure the Messaging Service for the formats that your SMSC supports. Adapters are provided for SMPP 3.4 and CIMD2. HTTP directly from the SMSC is also supported. If these formats do not meet your needs, you can write your own adapter using the Messaging API. See the Sun Java System Content Delivery Server Customization Guide for information on this API.

9.1.2.1 Setting Up Support for SMPP or CIMD2

1. If not already installed, install the SMPP API library version 0.3.7 on the server on which the Messaging Service is running.

See Step 1 in Section 8.1.1.1, Setting Up Support for SMPP for instructions.

2. Set the pushlistener.enable property in the MsgService.properties file to true.

This file is in the $CDS_HOME/deployment/deployment-name/conf directory.

3. Save your change to the MsgService.properties file.

4. Set the properties in the PushListener.properties file for the connections that you want to support.

This file is in the $CDS_HOME/deployment/deployment-name/conf directory. By default, a single connection is used to support all types of MO push requests. Set the pushlistener.esme.system_id.all and pushlistener.esme.password.all properties to the values required by your system.


CODE EXAMPLE 9-1 Single Connection for MO Push Requests
cds_mopush_action=all
pushlistener.esme.system_id.all =
pushlistener.esme.password.all =
pushlistener.cds_mopush_url.all = mo_push.do

If you prefer to support connections based on the type of data requested, follow these steps to configure the Messaging Service to support more than one connection to the SMSC:

a. Remove support for the single connection to the SMSC.

Comment out the statements shown in CODE EXAMPLE 9-1 by adding a pound sign (#) to the beginning of each line.

b. Add support for connections based on the type of data requested.

The following types of data are defined:

5. Set the connection properties in the PushListener.properties file as needed for your environment.

This file is in the $CDS_HOME/deployment/deployment-name/conf directory. These properties are used for all connections. The following code shows sample settings for SMPP.


pushlistener.smsc.hostname = 127.0.0.1
pushlistener.smsc.port = 11111
pushlistener.esme.system_id.all = user1
pushlistener.esme.password.all = usrpw
pushlistener.esme.system_type=
pushlistener.esme.destination=
pushlistener.smsc.gsm.ton = 2
pushlistener.smsc.gsm.npi = 0
pushlistener.send.keep_alive=true
pushlistener.keep_alive.milliseconds=30000

The following code shows sample settings for CIMD2.


pushlistener.smsc.hostname = 127.0.0.1
pushlistener.smsc.port = 11111
pushlistener.esme.system_id.all = user1
pushlistener.esme.password.all = usrpw

6. Save your changes to the PushListener.properties file.

7. Register your adapter in the pushlistenerfactory.xml file.

To use the SMPP adapter, specify the following class as your adapter in the pushlistenerfactory.xml file as described in Section 9.2, Using a Push Adapter.


com.sun.content.server.smpp34impl.msgserver.protocol.smpp.SMPPPushMsgListener

To use the CIMD2 adapter, specify the following class as your adapter in the pushlistenerfactory.xml file as described in Section 9.2, Using a Push Adapter.


com.sun.content.server.messagingservice.msgserver.protocol.cimd2.CIMD2PushMsgListener

9.1.2.2 Setting Up Support for HTTP

1. Set the pushlistener.enable property in the MsgService.properties file to false.

This file is in the $CDS_HOME/deployment/deployment-name/conf directory.

2. Save your change.

3. Register the http://server:port/mo_push.do URL with your SMSC.

server is the name of the server on which the Subscriber Portal is deployed. port is the port number on which the Subscriber Portal listens for MO push messages. The values specified must be accessible by systems outside the network on which Content Delivery Server is running.


9.2 Using a Push Adapter

The pushlistenerfactory.xml file is used to register the push listener adapter that you choose to use. The pushmsglistener properties must include the fully qualified name of the push adapter class and the protocol that the adapter supports.

The following sample registers the adapter for CIMD2.


CODE EXAMPLE 9-2 Sample pushlistenerfactory.xml File
<pushmsglistenerset>
  <pushmsglistener0 class=
"com.sun.content.server.messagingservice.msgserver.protocol.cimd2.CIMD2PushMsgListener"
  protocol="sms"/>
</pushmsglistenerset>

To specify the push listener adapter that you want to use, follow these steps:

1. Register the adapter with Content Delivery Server.

Create an XML file named pushlistenerfactory.xml in the $CDS_HOME/deployment/deployment-name/conf directory and set the properties as needed.

See CODE EXAMPLE 9-2 for an example of this file.

2. Include the adapter class and any dependent classes in your classpath.