Receive SMS form the SMSC

264 views
Skip to first unread message

Mostafa

unread,
Oct 22, 2009, 4:06:43 AM10/22/09
to jsmpp
Dears ;
i am working on application which i need to receive sms from the SMSC
and i need to keep the session between my app and the SMSC live to
receive SMS as soon as the SMSc send the SMS to my side
and i fell little confused to determine which class to use so help me
to decide

uud ashr

unread,
Nov 17, 2009, 1:24:47 AM11/17/09
to js...@googlegroups.com
You can the examples:

Check 

session.setMessageReceiverListener(new MessageReceiverListenerImpl());


So the point is you have to implement MessageReceiverListener and set it on session object.

Regards, 
uudashr

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jsmpp" group.
To post to this group, send email to js...@googlegroups.com
To unsubscribe from this group, send email to jsmpp+un...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jsmpp?hl=en
-~----------~----~----~----~------~----~------~--~---


Vikash Anand

unread,
Nov 17, 2009, 6:23:46 AM11/17/09
to js...@googlegroups.com
Hi,

I am using JSMPP to send SMS and to get delivery receipt also. For SMS sending i have different connection using TX and to receive delivery receipt we have another connection RX. We are not using TRX as it is failing after every 2-3 SMSs. 

What is happening is that when we start the whole service SMS sending is working fine and for initial SMSs we are getting delivery receipt but it stops after few minutes. We have set enquire timer with value as 30 seconds.

Am I missing something? If at all is any connection issue I do not get any exceptions.

How to test if connection is valid for RX so that we can rebind.

Thanks and Regards,
Vikash Anand.

--

You received this message because you are subscribed to the Google Groups "jsmpp" group.
To post to this group, send email to js...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jsmpp?hl=.



--
Thanks and Regards,
Vikash Anand.

Shantanu Kumar

unread,
Nov 17, 2009, 6:34:08 AM11/17/09
to js...@googlegroups.com

What is happening is that when we start the whole service SMS sending is working fine and for initial SMSs we are getting delivery receipt but it stops after few minutes. We have set enquire timer with value as 30 seconds.

Am I missing something? If at all is any connection issue I do not get any exceptions.

How to test if connection is valid for RX so that we can rebind.


session.isOpen() may be useful.

Sometimes isOpen() may not be helpful (when the communication freezes over and isOpen still returns true) so you should record the last successful communication time, and rebind after a certain duration of inactivity.

Regards,
Shantanu

Vikash Anand

unread,
Nov 17, 2009, 7:07:50 AM11/17/09
to js...@googlegroups.com
Hi,

with jsmpp2.0 there is no method as isOpen(). Please suggest some other method. In order to test last activity we need to go to database but we are not sure about the duration we need to check for last SMS delivery receipt since SMS sending goes down drastically in night.

Thanks,
Vikash

--

You received this message because you are subscribed to the Google Groups "jsmpp" group.
To post to this group, send email to js...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jsmpp?hl=.

Shantanu Kumar

unread,
Nov 17, 2009, 7:29:32 AM11/17/09
to js...@googlegroups.com
My fault, sorry I did not recall the method name correctly then.

org.jsmpp.session.SMPPSession inherits the method getSessionState() from org.jsmpp.session.Session. That method returns an instance of the enum org.jsmpp.extra.SessionState -- you can use the methods isBound(), isReceivable() or isTransmittable() in SessionState to carry out your job.

Regards,
Shantanu

Vikash Anand

unread,
Nov 17, 2009, 9:11:30 AM11/17/09
to js...@googlegroups.com
Hi Shantanu,

Thanks for this great help. It finally solved the issue. I checked for isBound() and isReceivable() methods.

Thanks,
Vikash Anand.

Vikash Anand

unread,
Nov 18, 2009, 4:29:04 AM11/18/09
to js...@googlegroups.com
Hi,

When we talked to the service provider they said that actually we are supposed to send them back deliversmresponse (something like this) with code "0x80000005". I have no idea how to do that and in which method. Is it on onAcceptDataSm method or in onAcceptAlertNotification. Please point me to any specs for the same or any help on this.

Thanks and Regards,
Vikash Anand.

uud ashr

unread,
Dec 7, 2009, 10:22:52 PM12/7/09
to js...@googlegroups.com
On Tue, Nov 17, 2009 at 6:23 PM, Vikash Anand <prem...@gmail.com> wrote:
Hi,

I am using JSMPP to send SMS and to get delivery receipt also. For SMS sending i have different connection using TX and to receive delivery receipt we have another connection RX. We are not using TRX as it is failing after every 2-3 SMSs. 

Strange behaviour....
 
What is happening is that when we start the whole service SMS sending is working fine and for initial SMSs we are getting delivery receipt but it stops after few minutes. We have set enquire timer with value as 30 seconds.

Am I missing something? If at all is any connection issue I do not get any exceptions.

Is hard to know. You have to monitor the traffic using Wireshark. SMSC or ESME might close the connection, or one of them sending unbind command.
 
How to test if connection is valid for RX so that we can rebind.

You can do something like session.getSessionState() to know the session state.
Reply all
Reply to author
Forward
0 new messages