SMS back and forth

SMS back and forth SearchSearch
Author Message
Anonymous
Posted on Monday, February 24, 2003 - 01:01 pm:   

I have a ESME client talking SMPP to NowSMS.
I have a wavecom modem hooked up to NowSMS

my ESMS client can send SMS messages to a mobile phone out there. Works as a dream.

BUT

what do I need to do to route the reply from the mobile phone back to my ESME client?

If I leave the 2-way parameter "Process Received SMS Messages" blank NowSMS does not seem to fetch the incoming messages from the GSM-modem at all.

If I checkmark that box I apparently need to make some kind of rule to route the incoming message back to my ESME client behind SMPP

Is there an example of what to put here or do I have to build the logic via some cgi-bin script somewhere or am I overlooking something ?

best regards,
TMK
Bryce Norwood - NowSMS Support (Bryce)
Posted on Wednesday, February 26, 2003 - 08:18 pm:   

Hi TMK,

Sorry for the delay getting back to you out here.

You'll receive the messages over SMPP, as long as you complete the following configuration steps:

On the "SMSC" page of the dialog, select the entry for your modem, and click "Properities". Define the phone number associated with your modem.

On the "2-way" page of the dialog, check "Process Received Messages", but go ahead and leave the command table empty.

On the "SMS Users" page of the dialog, "Edit" the user account that you're using to connect in via SMPP. Check "Route received messages to this user via SMPP". Under "Recipient address(es) to route to this user", either enter a "*" to indicate all messages, or enter the phone number that you set in the Properties associated with your modem. If you were running multiple modems, you could route different modems to different SMPP accounts.

-bn
TMK
Posted on Monday, March 03, 2003 - 09:43 am:   

Allright. I've done the setup as described using a "*" to indicate all messages in the "sms users" setup.

I still have no luck.

SMPPDEBUG.LOG tells me my SMPP client is logging on (DumpPacket stuff) and then apparently polls the server every 30 seconds (the "WaitForResponseSMPP: SMPP Debug: received enquire_link, acknowledging" line in the logfile).

... but there are never any messages to fetch.

And on the other hand in SMSDEBUG.LOG I can see messages arriving and apparently getting processed (ThreadProcessInboundSMS: Processing 3E631A56.in...) I can also look at the stored SMS messages in the SMS-IN directory and they basically contain the following (Sender=xxxx,PhoneNumber=yyy,Data=FOO,Binary=0). Both xxxx and yyyy seem to be correct. (sending phone and my gsm-modem number)

So it looks like we're polling the modem as well as my client is polling via SMPP, but the messages dont get routed.

Hints on where to look next.

And as I previously noted, my client behind SMPP can send messages. I guess this should confirm that the username+password at least is correct.

I am probably very close but just overlooking something obvious. Any ideas on where I should look to to debug this further ?


Also, what exactly is the phone number associated with my SMS modem used for (in terms of routing)

best regards,
Tero
Bryce Norwood - NowSMS Support (Bryce)
Posted on Monday, March 03, 2003 - 04:15 pm:   

Tero,

If the messages are sitting in the SMS-IN directory, then for some reason they are not getting properly routed to the SMS user account.

The message flow for an inbound message should go something like this ... first it gets routed as a ".in" file in the SMS-IN directory.

Those files get checked to see if they need to get routed to an SMS user account for pickup via SMPP, or if they should be passed to an executable command (2-way page) for processing.

If there's no match on either of those two fronts, then the message simply gets renamed with a ".sms" file extension.

Let me setup a test system here, and refresh my memory on what goes on in the configuration process. I should get back to you shortly.

-bn
Bryce Norwood - NowSMS Support (Bryce)
Posted on Monday, March 03, 2003 - 06:44 pm:   

Tero,

I just setup a configuration here to re-familiarize myself with the process.

I created a user account under "SMS Users", and I checked:

"Enable SMPP Login for this user"

and

"Route received messages to this user via SMPP"

Recipient address(es) to route to this user is set to "*" (without the quotes).

When an inbound message comes in to the gateway, I see an entry in the log about processing xxxxxxx.in ... but then the message is quickly moved to users\username\q.

That's the queue for delivery to an SMPP client.

On your system, it doesn't look like things are getting that far.

If you look at SMSGW.INI, there should be a section titled [Inbound SMS Routing], with a single entry: "username=*", where "username" is the name of the SMPP client as defined in the "SMS Users" dialog.

If you're not getting anywhere with this, I'd suggest that you e-mail me the SMSDEBUG.LOG file and the SMSGW.INI file, so that I can take a closer look to figure out what's not working right in your configuration. Please e-mail those files to nowsms@now.co.uk.

To answer your other question, the phone number associated with your GSM modem is used as follows:

1.) When a message comes in via that connection, we note the defined phone number as the recipient of that message. This is primarily useful for situations where you have multiple modems, so that you can distinguish which modem a message came in on.

2.) When a message is being routed out, we check to see if the sender address associated with the message, matches the phone number of a GSM modem (or the sender address of an SMSC connection). If it does, then we route the outbound message via that particular connection.

-bn
Anonymous
Posted on Monday, March 24, 2003 - 08:16 am:   

Took a pause here in between, but now I have my ESME talking to NowSMS SMSC. When I initially connect using SMPP I bind_receiver and bind_transmitter and I get the equivalent _RESP packets. Then NowSMS empties its queued SMS messages to me. So far OK.

I then stay connected and NowSMS periodically sends me enquire_link packets and everything looks fine.

But when a new SMS message destined for me arrives I can see in the SMSDEBUG.LOG that it is getting processed (ThreadProcessInboundSMS: Processing 3E7992BA.in...) but I dont see _ANY_ action in the SMPPDEBUG.LOG. And I dont receive messages.

If I disconnect and reconnect again the messages in queue are dumped to me.

Am I missing something here ? Shouldnt NowSMS dump new messages as the come in ? Any Idea where I go wrong ?

best regards,
Tero
Bryce Norwood - NowSMS Support (Bryce)
Posted on Monday, March 24, 2003 - 08:54 pm:   

Hi Tero,

I'd suggest that it'd probably be best if you sent me some log files at nowsms@now.co.uk, so that I can see the same things that you're seeing.

Generally speaking, the SMS messages should be transmitted to the client as they are received.

Basically, while the client is connected, the server is scanning USERS\accountname\Q for files with a ".REQ" extension. And those messages are sent over the connection whenever we're not busy receiving any messages over the connection.

I can't imagine why they would only be sent down after a reconnect unless the server was stuck waiting for a response, for example to an enquire link, which does get sent every 90 seconds in that configuration.

-bn
Anonymous
Posted on Tuesday, March 25, 2003 - 09:07 pm:   

_very_ good guess there!

NowSMS was waiting for a enquire_link response from me.

It was me not responding correctly to enquire_link. I lost track in my counter.

thank_you.

,Tero