 |
| |
| META TOPICPARENT | name="MobicentsFAQ" |
Introduction
The Short Message Peer to Peer (SMPP) protocol is an open, industry standard protocol designed to provide a flexible data communications interface for transfer of short message data between a Message Center, such as a Short Message Service Centre (SMSC), GSM Unstructured Supplementary Services Data (USSD) Server or other type of Message Centerand a SMS application system, such as a WAP Proxy Server, EMail Gateway or other Messaging Gateway. | |
< < | Using the SMPP protocol, an SMS application system called the ‘External Short Message Entity’ (ESME) may initiate an application layer connection with an SMSC over a TCP/IP network connection and may then send short messages and receive short messages to and from the SMSC respectively. The ESME may also query, cancel or replace short messages using SMPP. SMPP supports a full featured set of two-way messaging functions such as: | > > | Using the SMPP protocol, an SMS application system called the �External Short Message Entity� (ESME) may initiate an application layer connection with an SMSC over a TCP/IP network connection and may then send short messages and receive short messages to and from the SMSC respectively. The ESME may also query, cancel or replace short messages using SMPP. SMPP supports a full featured set of two-way messaging functions such as: | | |
- Transmit messages from an ESME to single or multiple destinations via the SMSC
| |
< < |
- An ESME may receive messages via the SMSC from other SME’s (e.g. mobile stations).
| > > |
- An ESME may receive messages via the SMSC from other SME�s (e.g. mobile stations).
| | |
- Query the status of a short message stored on the SMSC
- Cancel or replace a short message stored on the SMSC
| |
< < |
- Send a registered short message (for which a ‘delivery receipt’ will be returned by the SMSC to the message originator)
| > > |
- Send a registered short message (for which a �delivery receipt� will be returned by the SMSC to the message originator)
| | |
- Schedule the message delivery date and time
- Select the message mode, i.e. datagram or store and forward
- Set the delivery priority of the short message
| | | }
| |
< < | Handling server transactons | > > | Handling server transactions | | | Each time message received from SMSC, the resource adaptor emits DELIVER_SM message. The RequestEvent event object may be used to get direct access to the activity object ServerTransaction. The event handler method respond to the SMSC using transaction's respond(int) method. | | | }
| |
< < | Handling client transactons | > > | Handling client transactions | | | The SmppProvider object should be used to prepare outgoing message and a client transaction. Here we assume that 0020 specifies the number of ESME as RA entity is configured. The ActivityContextInterfaceFactory used to allow to this Sbb handle events related to the client transaction. |
| |
| META TOPICPARENT | name="MobicentsFAQ" |
| | | SMPP Resource Adaptor | |
< < | The SMPP Resource adaptor adopts SMSC to the requirements of the SLEE and built on top of the implementation of the SMPP. The source code for the core SMPP stack implementation can be found at https://smppapi.sourceforge.net. The source code of the RA implementation located https://mobicents.dev.java.net/source/browse/mobicents/ra/smpp-ra/. The SMPP RA defines the follwing resource adaptor concepts. | > > | The SMPP Resource adaptor adopts SMSC to the requirements of the SLEE and built on top of the implementation of the SMPP. The source code for the core SMPP stack implementation can be found at http://smppapi.sourceforge.net. The source code of the RA implementation located https://mobicents.dev.java.net/source/browse/mobicents/ra/smppra/. The SMPP RA defines the follwing resource adaptor concepts. | | |
SMPP Resource Adaptor Type
Resource adaptor type identifier | |
< < | The resource adaptor type name is "SMPPResourceAdaptor". The resource adaptor type vendor is "net.java". The resource adaptor type version is "1.0". | > > | The resource adaptor type name is "SMPPResourceAdaptor". The resource adaptor type vendor is "net.java". The resource adaptor type version is "3.4". | | | Activity objects
The activity objects for SMPP resource adaptor are net.java.slee.resource.smpp.ClientTransaction, net.java.slee.resource.smpp.ServerTransaction and net.java.slee.resource.smpp.Dialog The transaction objects belong to transaction which handles the requests and responses, Dialog object belongs to session established between mobile station and ESME. | | | where addressString is native for the domain user address: The mobile number in E164 format for messages addressed to mobile user and gmail address for messages addressed to GoogleTalk? user.
Source code | |
< < | The full source code can be found at https://mobicents.dev.java.net/source/browse/mobicents-examples/smpp | > > | The full source code can be found at https://mobicents.dev.java.net/source/browse/mobicents-examples/smpp-example | | | Accesing resource adaptor from Sbb
Sbb explicitly lookup resource adaptor object using resource-adaptor-entity-binding element in the SBB's deployment descriptor. |
| |
| META TOPICPARENT | name="MobicentsFAQ" |
| | | try {
logger.info("Called setSbbContext PtinAudioConf?!!!");
Context myEnv = (Context) new InitialContext?().lookup("java:comp/env"); | |
< < | xmppSbbInterface = (XmppResourceAdaptorSbbInterface?) | > > | xmppProvider = (XmppResourceAdaptorSbbInterface?) | | | myEnv.lookup("slee/resources/xmpp/2.0/xmppinterface"); | |
> > | smppProvider = (SmppProvider?)
myEnv.lookup("slee/resources/smpp/3.4/smppinterface");
smppAcif = (ActivityContextInterfaceFactory?)
myEnv.lookup("slee/resources/smpp/3.4/factoryprovider"); | | | } catch (NamingException? ne) {
logger.warn("Could not set SBB context:" + ne.getMessage());
}
}
| |
< < | Handle SMPP events
Each time message received from SMSC, the resource adaptor emits DELIVER_SM message. The RequestEvent event object may be used to get direct access to the activity object ServerTransaction. The event handler method parse message body with accordance of the proposed message format, forward message and should explicitly respond to the SMSC using transaction's respond(int) method. | > > | Handling server transactons
Each time message received from SMSC, the resource adaptor emits DELIVER_SM message. The RequestEvent event object may be used to get direct access to the activity object ServerTransaction. The event handler method respond to the SMSC using transaction's respond(int) method. | | |
public void onSmsMessage(RequestEvent event, ActivityContextInterface aci) { | |
< < | logger.info("SMS message received");
ShortMessage? smsMessage = event.getMessage();
String text = smsMessage.getText(); | > > | logger.info("Sending message to " + address);
....
event.getTransaction().respond(Transaction.OK);
}
| | | | |
< < | int splitter = text.indexOf(" "); | > > | Handling client transactons
The SmppProvider object should be used to prepare outgoing message and a client transaction. Here we assume that 0020 specifies the number of ESME as RA entity is configured. The ActivityContextInterfaceFactory used to allow to this Sbb handle events related to the client transaction. | | | | |
< < | String address = text.substring(0, splitter).trim();
String txt = text.substring(splitter).trim();
txt = "<" + smsMessage.getOriginator() + ">\r\n" + txt; | > > |
public void onGoogleMessage(Message message, ActivityContextInterface aci) {
Dialog dialog = smppProvider.getDialog(address, "0020"); | | | | |
< < | Message gtMessage = new Message(address, Message.Type.CHAT);
gtMessage.setBody(txt); | > > | ShortMessage? sms = dialog.createMessage();
sms.setText(txt); | | | | |
< < | try {
logger.info("Sending message to " + address);
xmppSbbInterface.sendPacket(connectionID,gtMessage);
event.getTransaction().respond(0);
} catch (IOException e) {
logger.error("Failed. Caused by", e);
} | > > | ClientTransaction? tx = dialog.createSubmitSmTransaction();
ActivityContextInterface? ac = smppAcif.getActivityContextInterface(tx);
ac.attach(sbbContext.getSbbLocalObject());
tx.send(sms); | | | }
| |
> > | Howto install, setup and run
- Get updated version of mobicents and mobicents-examples from CVS.
- Create 2 accounts on gmail .
- Login in Google Talk through one account .
- Use other account to set the username and password in Google Talk Bot Sbb.java
- For example if the gmail account is mgsgateway@gmail.com , then in Google Talk Bot Sbb.java it will look like this :
private final String username = "msggateway" Similarliy set your password .
- Add the above account as your buddy in the Google Talk .
- Run mobicents .
- Run SMPPSim
- Deploy the XMPP RA .
- Deploy the SMPP RA.
- Deploy the message gateway example.
Now use the "Mobile landscape" thml page, shipped with SMPPSim, to send a message (like from mobile device). Put 0020 to the destination_address field and type your message in the short_message field. The message format specified above should be used. For example: some_user@gmail.com hi. The message "hi" will be delivered, you can then answer typing in the GoogleTalk? the mobile address of the recipient and message body. | | | Related resources
- [[http://www.seleniumsoftware.com/downloads.html[SMPP Simulator]]
| |
< < | | > > | Waht's next.
Improve implementation quality. Currently, the SMPPA operates in a client mode. This means that it can't be used to implement logic on the server (SMSC) side. But the core SMPP API can be extended with this feature. | | | -- Main.ivelin - 06 Jul 2006 |
| |
| META TOPICPARENT | name="MobicentsFAQ" |
| | |
Resource adaptor type identifier | |
< < | The resource adaptor type name is "SMPPResourceAdaptor". The resource adaptor type vendor is "net.java". The resource adaptor type version is "1.1". | > > | The resource adaptor type name is "SMPPResourceAdaptor". The resource adaptor type vendor is "net.java". The resource adaptor type version is "1.0". | | | Activity objects
The activity objects for SMPP resource adaptor are net.java.slee.resource.smpp.ClientTransaction, net.java.slee.resource.smpp.ServerTransaction and net.java.slee.resource.smpp.Dialog The transaction objects belong to transaction which handles the requests and responses, Dialog object belongs to session established between mobile station and ESME. |
| |
| META TOPICPARENT | name="MobicentsFAQ" |
| | | }
| |
> > | Handle SMPP events
Each time message received from SMSC, the resource adaptor emits DELIVER_SM message. The RequestEvent event object may be used to get direct access to the activity object ServerTransaction. The event handler method parse message body with accordance of the proposed message format, forward message and should explicitly respond to the SMSC using transaction's respond(int) method.
public void onSmsMessage(RequestEvent event, ActivityContextInterface aci) {
logger.info("SMS message received");
ShortMessage smsMessage = event.getMessage();
String text = smsMessage.getText();
int splitter = text.indexOf(" ");
String address = text.substring(0, splitter).trim();
String txt = text.substring(splitter).trim();
txt = "<" + smsMessage.getOriginator() + ">\r\n" + txt;
Message gtMessage = new Message(address, Message.Type.CHAT);
gtMessage.setBody(txt);
try {
logger.info("Sending message to " + address);
xmppSbbInterface.sendPacket(connectionID,gtMessage);
event.getTransaction().respond(0);
} catch (IOException e) {
logger.error("Failed. Caused by", e);
}
}
| | | Related resources
- [[http://www.seleniumsoftware.com/downloads.html[SMPP Simulator]]
|
| |
| META TOPICPARENT | name="MobicentsFAQ" |
| | | We will work in a "client" mode. It is not a matter for this example application but it just means that GoogleTalk? users will see mobile domain as virtual user, and this user should be registered in the contact list. Same is for the mobile subscriber, there is a predefined mobile number (short or full) wich will serves as gateway to the GoogleTalk? domain. And in both cases, the additional, native for other side, address should be specified in the message body to allow recognize the recipient of the message. So the follwing message format may be adopted for the gateway: | |
< < |
addressString
Message text
| > > | addressString Message_text
where addressString is native for the domain user address: The mobile number in E164 format for messages addressed to mobile user and gmail address for messages addressed to GoogleTalk? user. | | | | |
< < | Here addressString is native for the domain user address: The mobile number in E164 format for messages addressed to mobile user and gmail address for messages addressed to GoogleTalk? user. | > > | Source code
The full source code can be found at https://mobicents.dev.java.net/source/browse/mobicents-examples/smpp | | | | |
< < | The following code snipped explains how to use SMPP RA | > > | Accesing resource adaptor from Sbb
Sbb explicitly lookup resource adaptor object using resource-adaptor-entity-binding element in the SBB's deployment descriptor.
public void setSbbContext(SbbContext sbbContext) {
this.sbbContext = sbbContext;
try {
logger.info("Called setSbbContext PtinAudioConf!!!");
Context myEnv = (Context) new InitialContext().lookup("java:comp/env");
xmppSbbInterface = (XmppResourceAdaptorSbbInterface)
myEnv.lookup("slee/resources/xmpp/2.0/xmppinterface");
} catch (NamingException ne) {
logger.warn("Could not set SBB context:" + ne.getMessage());
}
}
| | | Related resources |
| |
| META TOPICPARENT | name="MobicentsFAQ" |
| | | Example
The real-time communication is signficant attribute of the modern life. Initially, instant messaging applications began to appear in the 1970s on multi-user operating systems such as UNIX, to facilitate communication with other users logged in to the same machine, then on the local network, and subsequently across the Internet. Currently, there are a lot of communication islands in the Internet such as Skype or Google Talk wich are already widely used for text messaging. From other hand, the mobile phones also very used by peoples and short message service may be adopted for the Google Talk to allow to reache user using mobile network. So we can extend GoogleTalk?-Bot example application in such a way as to forward messages received from GoogleTalk? user to mobile subsciber and, inversely, forward messages received from mobile subscriber to GoogleTalk? user.
| |
< < | The following code snipped explains how to use SMPP RA
...
public abstract class SmsSimpleSbb implements Sbb {
public void onMessageEvent(Message event, ActivityContextInterface ac) {
logger.info("Recieved message: " + event.getId());
String text = message.getText();
//generate response and send back received text
try {
SmppProvider provider = (SmppProvider) new InitialContext().
lookup("java:/slee/resources/smpp/org.mobicents.smpp/1.0/SMPPRA/factoryprovider");
Message response = provider.createMessage(GEN++, message.getDestinationAddress(),
message.getOriginationAddress(), text, Message.ENCODING_UCS2);
provider.send(response);
} catch (Exception e) {
logger.error("Unexpected error, caused by", e);
} | > > | We will work in a "client" mode. It is not a matter for this example application but it just means that GoogleTalk? users will see mobile domain as virtual user, and this user should be registered in the contact list. Same is for the mobile subscriber, there is a predefined mobile number (short or full) wich will serves as gateway to the GoogleTalk? domain. And in both cases, the additional, native for other side, address should be specified in the message body to allow recognize the recipient of the message. So the follwing message format may be adopted for the gateway: | | | | |
< < | } | > > |
addressString
Message text
| | | | |
< < | public void onDeliveryReportEvent(Message event, ActivityContextInterface? ac) {
logger.info("Message delivery status:" + event.getText());
} | > > | Here addressString is native for the domain user address: The mobile number in E164 format for messages addressed to mobile user and gmail address for messages addressed to GoogleTalk? user. | | | | |
< < | }
| > > | The following code snipped explains how to use SMPP RA | | | Related resources |
| |
| META TOPICPARENT | name="MobicentsFAQ" |
| | | The SLEE administartor can override default settings of the resource adaptor entity at the deployment time. The one way is consisted in specifying the URL pointed to properties file as an argument to the CLI's method createResourceAdaptorEntity().
Example | |
< < | The real-time communication is signficant attribute of the modern life. Initially, instant messaging applications began to appear in the 1970s on multi-user operating systems such as UNIX, to facilitate communication with other users logged in to the same machine, then on the local network, and subsequently across the Internet. Currently, there are a lot of communication islands in the Internet such as Skype or Google Talk wich are already widely used for text messaging. But, from the other hand, the mobile phones is also very used by peoples and short message service in the mobile network can suggest text messaging also | > > | The real-time communication is signficant attribute of the modern life. Initially, instant messaging applications began to appear in the 1970s on multi-user operating systems such as UNIX, to facilitate communication with other users logged in to the same machine, then on the local network, and subsequently across the Internet. Currently, there are a lot of communication islands in the Internet such as Skype or Google Talk wich are already widely used for text messaging. From other hand, the mobile phones also very used by peoples and short message service may be adopted for the Google Talk to allow to reache user using mobile network. So we can extend GoogleTalk?-Bot example application in such a way as to forward messages received from GoogleTalk? user to mobile subsciber and, inversely, forward messages received from mobile subscriber to GoogleTalk? user. | | | The following code snipped explains how to use SMPP RA |
| |
| META TOPICPARENT | name="MobicentsFAQ" |
| | | The SLEE administartor can override default settings of the resource adaptor entity at the deployment time. The one way is consisted in specifying the URL pointed to properties file as an argument to the CLI's method createResourceAdaptorEntity().
Example | |
> > | The real-time communication is signficant attribute of the modern life. Initially, instant messaging applications began to appear in the 1970s on multi-user operating systems such as UNIX, to facilitate communication with other users logged in to the same machine, then on the local network, and subsequently across the Internet. Currently, there are a lot of communication islands in the Internet such as Skype or Google Talk wich are already widely used for text messaging. But, from the other hand, the mobile phones is also very used by peoples and short message service in the mobile network can suggest text messaging also | | | The following code snipped explains how to use SMPP RA
... |
| |
| META TOPICPARENT | name="MobicentsFAQ" |
| | |
- addressRange: For receivers this specifies the range of numbers for which messages are to be received. This is usually a regular expression but may be server implementation dependent. Default:0020.
- enquireLinkTimeout: SMPP link timeout in seconds, used to reconnect. Default: 30
| |
> > | The SLEE administartor can override default settings of the resource adaptor entity at the deployment time. The one way is consisted in specifying the URL pointed to properties file as an argument to the CLI's method createResourceAdaptorEntity(). | | | | |
< < | Example | > > | Example | | | The following code snipped explains how to use SMPP RA
... | | | }
| |
< < | Related resources | > > | Related resources | | |
- [[http://www.seleniumsoftware.com/downloads.html[SMPP Simulator]]
|
| |
| META TOPICPARENT | name="MobicentsFAQ" |
| | |
Event types | |
< < | net.java.slee.resource.smpp.RequestEvent
The event type is a message name with package prefix jain.protocol.ip.mgcp.message, the event type vendor is net.java and version is 1.1 | > > | The event type is a message name with package prefix net.java.slee.resource.smpp, the event type vendor is net.java and version is 1.1 | | | Event classes
The event class for these events are | |
< < | net.java.slee.resource.smpp.RequestEvent
net.java.slee.resource.smpp.ResponseEvent | > > |
-
net.java.slee.resource.smpp.RequestEvent
-
net.java.slee.resource.smpp.ResponseEvent
| | | | |
< < | Resource adaptor object
Resource adaptor object is org.mobicents.slee.resource.smpp.ratype.SmppProvider
Configuration
The SMPP configuration properties are as follows: | > > | Activity Context Interface Factory Interface
The Activity Context Interface Factory Interface looks : | | | | |
< < | smsc.host: Host name of the SMSC.
smsc.port: IP port number of the SMPP Server (number). | > > |
import javax.slee.ActivityContextInterface;
import javax.slee.FactoryException;
import javax.slee.UnrecognizedActivityException;
public interface RadiusActivityContextInterfaceFactory {
public ActivityContextInterface getActivityContextInterface(ClientTransaction tx)
throws NullPointerException, UnrecognizedActivityException, FactoryException; | | | | |
< < | smsc.system.id: SMPP system id authentication attribute. | > > | public ActivityContextInterface? getActivityContextInterface(ServerTransaction? tx)
throws NullPointerException?, UnrecognizedActivityException?, FactoryException?; | | | | |
< < | smsc.password: SMPP password authentication attribyte (string). | > > | public ActivityContextInterface? getActivityContextInterface(Dialog dialog)
throws NullPointerException?, UnrecognizedActivityException?, FactoryException?; | | | | |
< < | smsc.address.ton: The default type of number (TON) that should be on received messages. This is specified by the SMSC administrator. | > > | }
| | | | |
< < | smsc.address.npi: The default number plan indicator (NPI) that should be on received messages. This is specified by the SMSC administrator. | > > | Resource adaptor object
Resource adaptor object is net.java.slee.resource.smpp.Provider | | | | |
< < | smsc.address.range: For receivers this specifies the range of numbers for which messages are to be received. This is usually a regular expression but may be server implementation dependent (string). This is specified by the SMSC administrator. | > > | Configuration
The SMPP RA is compliant with JSLEE 1.1 specifcation style provisioning. The RA's configuration properties are as follows:
- host: The name of the host (or IP-address string) of the SMPP server. Used to establish connection with SMSC in TCP/IP network. Default: localhost
- port: The port number used by SMPP server to establish connection. Default: 2775
- systemId: Used as login name to authenticate connection with SMPP server. Default: 1
- systemType: Identifies the type of system. Default:ESME.
- password: Used as password to authenticate connection with SMPP server. Default:1
- addressTon: The default type of number (TON) that should be on received messages.Default:1
- addressNpi: The default number plan indicator (NPI) that should be on received messages.Default:0
- addressRange: For receivers this specifies the range of numbers for which messages are to be received. This is usually a regular expression but may be server implementation dependent. Default:0020.
- enquireLinkTimeout: SMPP link timeout in seconds, used to reconnect. Default: 30
| | | | |
< < | smsc.enquare.link.timeout: SMPP link timeout, use to reconnect. | | | Example
The following code snipped explains how to use SMPP RA |
| |
| META TOPICPARENT | name="MobicentsFAQ" |
| |
< < | SMPP Resource Adaptor | > > | | | | | |
< < | Initial version was contributed by Pavel Mitrenko. It is currently in review stage - https://mobicents.dev.java.net/issues/show_bug.cgi?id=90 | > > | Introduction
The Short Message Peer to Peer (SMPP) protocol is an open, industry standard protocol designed to provide a flexible data communications interface for transfer of short message data between a Message Center, such as a Short Message Service Centre (SMSC), GSM Unstructured Supplementary Services Data (USSD) Server or other type of Message Centerand a SMS application system, such as a WAP Proxy Server, EMail Gateway or other Messaging Gateway.
Using the SMPP protocol, an SMS application system called the ‘External Short Message Entity’ (ESME) may initiate an application layer connection with an SMSC over a TCP/IP network connection and may then send short messages and receive short messages to and from the SMSC respectively. The ESME may also query, cancel or replace short messages using SMPP. SMPP supports a full featured set of two-way messaging functions such as:
- Transmit messages from an ESME to single or multiple destinations via the SMSC
- An ESME may receive messages via the SMSC from other SME’s (e.g. mobile stations).
- Query the status of a short message stored on the SMSC
- Cancel or replace a short message stored on the SMSC
- Send a registered short message (for which a ‘delivery receipt’ will be returned by the SMSC to the message originator)
- Schedule the message delivery date and time
- Select the message mode, i.e. datagram or store and forward
- Set the delivery priority of the short message
- Define the data coding type of the short message
- Set the short message validity period
- Associate a service type with each message e.g. voice mail notification
SMPP Resource Adaptor
The SMPP Resource adaptor adopts SMSC to the requirements of the SLEE and built on top of the implementation of the SMPP. The source code for the core SMPP stack implementation can be found at https://smppapi.sourceforge.net. The source code of the RA implementation located https://mobicents.dev.java.net/source/browse/mobicents/ra/smpp-ra/. The SMPP RA defines the follwing resource adaptor concepts. | | | | |
< < | SMPP stands for Short Message Peer to Peer. It is a communication protocol designed for transfer of short messages between short message centre and SMS application.
The SMPP Resource Adaptor allows transmission of SMS messages using SMPP protocol v3.4. | | | SMPP Resource Adaptor Type
Resource adaptor type identifier | |
< < | The resource adaptor type name is "smpp_ratype". The resource adaptor type vendor is "org.mobicents.smpp". The resource adaptor type version is "1.0". | > > | The resource adaptor type name is "SMPPResourceAdaptor". The resource adaptor type vendor is "net.java". The resource adaptor type version is "1.1". | | | Activity objects | |
< < | The activity object for SMPP resource is org.mobicents.slee.resource.smpp.message.Message object. | > > | The activity objects for SMPP resource adaptor are net.java.slee.resource.smpp.ClientTransaction, net.java.slee.resource.smpp.ServerTransaction and net.java.slee.resource.smpp.Dialog The transaction objects belong to transaction which handles the requests and responses, Dialog object belongs to session established between mobile station and ESME. | | | Events | |
< < | The following lists the events emitted by a SMPP resource. | > > | The following table lists the events emitted by a SMPP resource.
| Events | Activity object |
| | Client Transaction | ServerTransaction? | Dialog |
| net.java.slee.resource.smpp.DELIVER_SM | | X | |
| net.java.slee.resource.smpp.DELIVER_SM_RESP | X | | |
| net.java.slee.resource.smpp.SUBMIT_SM | | X | |
| net.java.slee.resource.smpp.SUBMIT_SM_RESP | X | | |
| net.java.slee.resource.smpp.DATA_SM | | X | |
| net.java.slee.resource.smpp.DATA_SM_RESP | X | | |
| net.java.slee.resource.smpp.QUERY_SM | | X | |
| net.java.slee.resource.smpp.SQUERY_SM_RESP | X | | |
| net.java.slee.resource.smpp.CANCEL_SM | | X | |
| net.java.slee.resource.smpp.CANCEL_SM_RESP | X | | |
| net.java.slee.resource.smpp.REPLACE_SM | | X | |
| net.java.slee.resource.smpp.REPLACE_SM_RESP | X | | |
| net.java.slee.resource.smpp.MESSAGE | | | X |
| net.java.slee.resource.smpp.DELIVERY_REPORT | | | X |
| | | | |
< < | Event types
org.mobicents.slee.smpp.Message
org.mobicents.slee.smpp.DeliveryReport | | | | |
< < | The event type vendor is "org.mobicents.smpp".
The event type version is "1.0" | > > | Event types
net.java.slee.resource.smpp.RequestEvent
The event type is a message name with package prefix jain.protocol.ip.mgcp.message, the event type vendor is net.java and version is 1.1 | | | Event classes | |
< < | The event class for these events is org.mobicents.slee.resource.smpp.message.Message | > > | The event class for these events are
net.java.slee.resource.smpp.RequestEvent
net.java.slee.resource.smpp.ResponseEvent | | |
Resource adaptor object |
| |
| META TOPICPARENT | name="MobicentsFAQ" |
| |
< < | The SMPP Resource Adaptor allows transmission of SMS messages. | > > | SMPP Resource Adaptor | | | Initial version was contributed by Pavel Mitrenko. It is currently in review stage - https://mobicents.dev.java.net/issues/show_bug.cgi?id=90 | |
> > | SMPP stands for Short Message Peer to Peer. It is a communication protocol designed for transfer of short messages between short message centre and SMS application.
The SMPP Resource Adaptor allows transmission of SMS messages using SMPP protocol v3.4.
SMPP Resource Adaptor Type
Resource adaptor type identifier
The resource adaptor type name is "smpp_ratype". The resource adaptor type vendor is "org.mobicents.smpp". The resource adaptor type version is "1.0".
Activity objects
The activity object for SMPP resource is org.mobicents.slee.resource.smpp.message.Message object.
Events
The following lists the events emitted by a SMPP resource.
Event types
org.mobicents.slee.smpp.Message
org.mobicents.slee.smpp.DeliveryReport
The event type vendor is "org.mobicents.smpp".
The event type version is "1.0"
Event classes
The event class for these events is org.mobicents.slee.resource.smpp.message.Message
Resource adaptor object
Resource adaptor object is org.mobicents.slee.resource.smpp.ratype.SmppProvider
Configuration
The SMPP configuration properties are as follows:
smsc.host: Host name of the SMSC.
smsc.port: IP port number of the SMPP Server (number).
smsc.system.id: SMPP system id authentication attribute.
smsc.password: SMPP password authentication attribyte (string).
smsc.address.ton: The default type of number (TON) that should be on received messages. This is specified by the SMSC administrator.
smsc.address.npi: The default number plan indicator (NPI) that should be on received messages. This is specified by the SMSC administrator.
smsc.address.range: For receivers this specifies the range of numbers for which messages are to be received. This is usually a regular expression but may be server implementation dependent (string). This is specified by the SMSC administrator.
smsc.enquare.link.timeout: SMPP link timeout, use to reconnect.
Example
The following code snipped explains how to use SMPP RA
...
public abstract class SmsSimpleSbb implements Sbb {
public void onMessageEvent(Message event, ActivityContextInterface ac) {
logger.info("Recieved message: " + event.getId());
String text = message.getText();
//generate response and send back received text
try {
SmppProvider provider = (SmppProvider) new InitialContext().
lookup("java:/slee/resources/smpp/org.mobicents.smpp/1.0/SMPPRA/factoryprovider");
Message response = provider.createMessage(GEN++, message.getDestinationAddress(),
message.getOriginationAddress(), text, Message.ENCODING_UCS2);
provider.send(response);
} catch (Exception e) {
logger.error("Unexpected error, caused by", e);
}
}
public void onDeliveryReportEvent(Message event, ActivityContextInterface ac) {
logger.info("Message delivery status:" + event.getText());
}
}
Related resources
- [[http://www.seleniumsoftware.com/downloads.html[SMPP Simulator]]
| | | -- Main.ivelin - 06 Jul 2006 |
|