Skip to main content

SMPP Resource Adaptor design?

15 replies [Last post]
alqurri
Offline
Joined: 2006-01-19
Points: 0

Hi,

I'm working on implementing an SMPP Resource Adaptor. I wonder if anyone out there who are interested in helping. I have no experience in designing Resource Adaptor, so any help would be appreciated. I have a few question to start with, I'm a newbie, so some of these questions might be trivial. notice this my first time to design adapter :

- first, I used the SMPP diver found at http://smppapi.sourceforge.net/developers.php
I tested them and it seems good enough. However, if someone have a better recommendation, please, let me know.

- I found it difficult to decide on event types. In order to make things simple as a start. I decide on having two events "receiveSMS" when SMS message is recived and "sendSMS" when application needs to send a message. In the "entityActivated()" method in the "RAFrameResourceAdaptor" class, based on Michael Maretzke RAFrame, I’m starting the SMSC listener. In the "entityDeactivating()" method I shutdown the listener. Do you think this a good design? consider the following:

- What if I want to listen to more than 1 SMSC or 1 SMSC but different ports? can I have a different instance of the RA with different properties file?

- If the message receiver/sender needs to have a fine control over the message. Is it allowed in JSLEE Resource Adaptor specs to have
a custom class. for example, in the "onEvent"
"RAFrameResourceAdaptor" class. I do this

public void onEvent(String incomingData) {
.
.
.
// parse the incoming data
try {
Message message = messageParser.parse(incomingData);
// Is this allowed ... to define an
// SMSMessage class
SMSMessage sMSmessage=message.getDataLoad();
event = messageFactory.createMessageEvent(this, message);
}

Notice, this means that anyone who needs to use the resource adapter need to have the SMSMessage. What if the developer want to ports his application to another JSLEE engine, it will not work?

Thanks

Ahmed

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
eduardomartins
Offline
Joined: 2005-10-10
Points: 0

Nice! So what else (currently we have SMS, XMPP and SIP messages) do we want for messaging in and or out of SLEE?

Eduardo Martins

ivelin
Offline
Joined: 2003-07-13
Points: 0

> Nice! So what else (currently we have SMS, XMPP and
> SIP messages) do we want for messaging in and or out
> of SLEE?

INAP RA Type would be good to have. INAP RA Implementation will be hard due to the legacy nature of the INAP connectors. Oleg and Pavel already built an initial INAP RA Type. It's their call whether they feel ready to share it.

Jingle would be also a good addition IMHO. I looked at the spec and it seems to be a relatively straightforward extension to XMPP adding 10 or so new messages. Given that GTalk uses RTP, it should be a great added value if we had Jingle support so we can write applications that can serve GTalk users.
http://www.jabber.org/jeps/jep-0166.html

kulikoff
Offline
Joined: 2005-11-30
Points: 0

> INAP RA Type would be good to have. INAP RA
> Implementation will be hard due to the legacy nature
> of the INAP connectors. Oleg and Pavel already built
> an initial INAP RA Type. It's their call whether they
> feel ready to share it.
>
I think we should cut it on TCAP layer which is well standardized and will work always and implement INAP specifics as SBB.

Oleg.

ivelin
Offline
Joined: 2003-07-13
Points: 0

> I think we should cut it on TCAP layer which is well
> standardized and will work always and implement INAP
> specifics as SBB.
>
> Oleg.

This is fine with me.

alqurri
Offline
Joined: 2006-01-19
Points: 0

> I think we should cut it on TCAP layer which is well
> standardized and will work always and implement INAP
> specifics as SBB.
>
> Oleg

What about CAP2. Most mobile intelligent networks uses CAP2/CAP3.

Ahmed

alqurri
Offline
Joined: 2006-01-19
Points: 0

Many Thanks Paul & Eduardo for your help.

Pavel: This is great!
I will try to test the RA once I get some time.

Best Regards,

Ahmed

uudashr
Offline
Joined: 2004-08-25
Points: 0

Hi,

I've been develop SMPP API too "jsmpp". It's should be very easy to use. you can get it here http://code.google.com/p/jsmpp
You can download it and see some examples there.

Regards,
uudashr

Message was edited by: uudashr

eduardomartins
Offline
Joined: 2005-10-10
Points: 0

"- I found it difficult to decide on event types. In order to make things simple as a start. I decide on having two events "receiveSMS" when SMS message is recived and "sendSMS" when application needs to send a message."

Well, you have two options:

1) You send the object from stack as event, this will bind your RA with the stack you use. This is done in most RAs because it's faster or provides a way to reply to the event without using the RA.

2) You create an event from the data provided by the stack, this way you can go for standard events in a possible standard RA Type for the protocol, not bound to a specific stack as in 1). This means it's only SLEE dependent and I would choose this one, but then option 1) can provide something more as I said.

"- What if I want to listen to more than 1 SMSC or 1 SMSC but different ports? can I have a different instance of the RA with different properties file?"

I would stayn on one RA instance only, because then you need a specific sbb interface for each one. Why not a map with stacks for each port. The XMPP RA supports multiple connections, that's not a problem.

Regards,
Eduardo Martins
PT Inovação

pavelmitrenko
Offline
Joined: 2005-12-12
Points: 0

Hi, guys

Initial implememntation of the SMMP RA is submitted to evolution. The initial source is available as an attachment to this issue:
https://mobicents.dev.java.net/issues/show_bug.cgi?id=90

ivelin
Offline
Joined: 2003-07-13
Points: 0

Great stuff, Pavel. Thanks!
Here is a wiki page for the RA. Please populate with initial design and usage info when you can:
http://wiki.java.net/bin/view/Communications/MobicentsSMPPRA

kulikoff
Offline
Joined: 2005-11-30
Points: 0

Wiki page is updated

Oleg

ivelin
Offline
Joined: 2003-07-13
Points: 0

This is great. Several points

1) Can you please add notes how to configure the RA to connect to a SMPP gateway?

2) Another examples snippet showing how to initiate an SMPP message rather then respond to one will be useful.

3) It would be helpful to have several tests for the RA. Maybe Ahmed can look at this.

4) Source repository. Any preferences? If not, I would suggest ra/smpp under the mobicents repository. We can also create a separate project as we did for the new SIP RA, provided that there is someone willing to take ownership of it and maintain it actively.

kulikoff
Offline
Joined: 2005-11-30
Points: 0

Hi,

The configuration explanation added to the wiki page.
Also WAP Push functionality added to the RA.
Example shows both cases: how to receive and originate outgoing message (reply or new).

Think there is no need to create a separate project for this RA. The SMS hasn't so features as SIP has.

Oleg.

ivelin
Offline
Joined: 2003-07-13
Points: 0

> Hi,
>
> The configuration explanation added to the wiki
> page.
> Also WAP Push functionality added to the RA.

I'm speechless. Thank you.

Can you please add an example snippet of code showing how the WAP feature works?

> Example shows both cases: how to receive and
> originate outgoing message (reply or new).

saw it. thanks.

>
> Think there is no need to create a separate project
> for this RA. The SMS hasn't so features as SIP has.

OK, then please commit under ra/ in the Mobicents repo.

Ivelin

paulkeogh
Offline
Joined: 2006-06-08
Points: 0

Hi,

An interesting post. I was considering the same requirements.

I have worked with and used the Kannel project for many years. Briefly, Kannel gives you an abstraction interface for MO/MT SMS and supports many SMSC drivers under this interface including SMPP, CIMD, EMI/UCP, GSM 03.40, HTTP and some others. Kannel is at http://www.kannel.org

Kannel has 2 client interfaces - a HTTP CGI/POST form/POST XML web based interface or a binary TCP/IP socket based interface. The former is easier to use, the latter is more efficient.

Maybe this is worth considering ? Probably the same work for a lot more SMSC access...