SMPP Routing

SMPP Routing SearchSearch
Author Message
Oren Gozlan
New member
Username: Orengozlan

Post Number: 5
Registered: 07-2009
Posted on Tuesday, February 09, 2010 - 10:58 am:   

Hi,

I have set up a NowSMS with SonyE phone as a modem.
outgoing traffic is OK and I can send SMS from my SMPP application to the NowSMS and the SMS will be sent to my device.

now I'm trying to route back the SMS Response to the SMPP application.

I've checked the Receive SMS Messages & checked the Route SMS to local user and selected the user that my application is using.

now ... when I'm sending SMS to the Modem number, I can see that the SMS is arriving (on service tab) but the NowSMS is not sending the SMS to my SMPP app...

help please?
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 1773
Registered: 08-2008
Posted on Tuesday, February 09, 2010 - 05:08 pm:   

Hi Oren,

Do you see a reference to the message in the SMSOUT-yyyymmdd.LOG file? It should show the message being routed to "localuser:accountame".

If everything is operating correctly, you would see the message get queued in the USERS\username\Q directory before it is pushed to your SMPP client.

Assuming that the message is getting routed correctly ... the only reason it wouldn't get pushed to your client is if your client was bound as a sender only. If you look at the "Service" page of the NowSMS configuration dialog, there is a field that shows "SMPP Client Connections" and a "View" button. If you click on "View", it shows a list of connect SMPP clients. If you move the highlight bar to one of the connections, it will show you how the client is connected (e.g., sender, receiver or transceiver).

Let's start by looking at those things. If the resolution is not obvious after checking this, then please enable the SMSDEBUG.LOG. Restart the NowSMS service and send in another message. Post the SMSDEBUG.LOG so that we can take a look at what is happening.

--
Des
NowSMS Support
Oren Gozlan
New member
Username: Orengozlan

Post Number: 7
Registered: 07-2009
Posted on Wednesday, February 10, 2010 - 09:00 am:   

Ok ...

in the debug log i can see:
10:52:32:609 [3] ModemReceiveMessages: Decoding received message index 1 from message storage ME
10:52:32:609 [3] ModemReceiveMessages: 07917952140230F2040C9179525416051300000120010145438002CE37
10:52:32:609 [3] ModemReceiveMessages: SMSC address len = 7
10:52:32:609 [3] ModemReceiveMessages: SMSC Address = +97254120032
10:52:32:609 [3] ModemReceiveMessages: SMS Message Type = SMS-DELIVER
10:52:32:609 [3] ModemReceiveMessages: Sender address len = 12
10:52:32:609 [3] ModemReceiveMessages: Sender Address = +972545615031
10:52:32:609 [3] ModemReceiveMessages: PID = 00
10:52:32:609 [3] ModemReceiveMessages: DCS = 00
10:52:32:609 [3] ModemReceiveMessages: Anticipated user data length = 2
10:52:32:609 [3] ModemReceiveMessages: Message = No
10:52:32:609 [3] ModemReceiveMessages: AT+CMGD=1

10:52:32:687 [3] ModemReceiveMessages:
OK

in the USERS folder I can see the log:
2010-02-10 10:52:32,Mobixell,SMSReceive,,+972545615031,4B727379.req,Text,Text=No

in the Q folder I can see the request file:
[SMS]
ModemName=Sony Ericsson Device 0016 USB WMC Data Modem
Sender=+972545615031
Data=No
RouteToLocalUser=Mobixell
ReceivedSMSC=+97254120032


My next question will be ... how does the NowSMS knows on which port my smpp server is listening?
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 1782
Registered: 08-2008
Posted on Wednesday, February 10, 2010 - 05:51 pm:   

Ok Oren ...

I think I see where the confusion is.

In this scenario, NowSMS is an SMPP server. It is not going to attempt to initiate a connection to some other SMPP server.

When you define the "SMS Users" account "Mobixell", this means that an SMPP client can connect to NowSMS using SMPP and send/receive messages.

The way that things are currently configured, NowSMS is going to route that received message for "Mobixell" to pick up via SMPP. But, "Mobixell" is going to need to initiate the connection.

That said, there is a problem here. The recipient address is blank, and that is stopping NowSMS from delivering the message to the connected SMPP client.

To fix this problem, go to the "SMSC" list, select "Properties", and define a value for the "Phone Number" field. NowSMS will set this number as the recipient address, and the message will be delivered properly ... assuming that you are connecting to NowSMS with an SMPP client.


quote:

My next question will be ... how does the NowSMS knows on which port my smpp server is listening?




If ... instead ... you want NowSMS to initiate the SMPP connection to an SMPP server, and redirect the received messages to that SMPP server, it is possible, but much more complicated.

It would also require setting the "Phone Number" property above, as a recipient address is a required SMPP message attribute.

You would need to define the SMPP server connection as an additional "SMSC" connection.

The manually edit SMSGW.INI. Under the [SMPP - server:port] section for your SMPP server connection, add RouteName=xxxxxx where xxxxxx is a name for the connection that is meaningful to you.

Under the [Modem - driver name of your modem] section, add ReRouteReceived=xxxxxx

--
Des
NowSMS Support
Oren Gozlan
New member
Username: Orengozlan

Post Number: 8
Registered: 07-2009
Posted on Wednesday, February 10, 2010 - 09:40 pm:   

Cool .. now I can see the SMS being passed to my SMPP server :-) (added MSISDN to the modem properties)

now ... my smpp server is answering to this sms with a "thnx" sms - when ever i'm posting back the thnx sms - i'm getting the following:

SMSOUT LOG:
2010-02-10 23:28:25,4B727F3A.req,82.80.77.164,972545615031,Retry Pending - ERROR - Modem Response (2): +CMS ERROR: 500 -- Sony Ericsson Device 0016 USB WMC Data Modem,SubmitUser=Mobixell;Sender=0548047058

SMSDEBUG:
23:28:25:031 [3] ThreadProcessModem: Error: ERROR - Modem Response (2): +CMS ERROR: 500
23:28:26:031 [3] ModemTest: Sony Ericsson Device 0016 USB WMC Data Modem
23:28:26:156 [3] ModemTest: OK
23:28:27:656 [13] ThreadProcessSMPPConnection: Releasing SMPP connection from 82.80.77.164
23:28:27:656 [13] WaitForSocketClose: WinSock reported ioctlsocket complete
23:28:27:656 [13] ThreadProcessSMPPConnection: Processing SMPP connection from 82.80.77.164...
23:28:27:656 [14] ThreadProcessSMPPConnection: Processing SMPP connection from 82.80.77.164...
23:29:56:250 [3] ThreadProcessModem: Processing 4B727F3A.req...
23:29:56:265 [3] ThreadProcessModem: OUT: AT+CMGS=20

23:29:56:281 [3] ThreadProcessModem: IN:
>
23:29:56:281 [3] ThreadProcessModem: OUT: 0021090C81795254160513000007C3F79BED72B900
23:29:58:078 [3] ThreadProcessModem: ERROR - Modem Response (2): +CMS ERROR: 21
23:29:58:078 [3] ThreadProcessModem: OUT: 
23:29:58:171 [3] ThreadProcessModem: OUT: \r
23:29:58:171 [3] ThreadProcessModem: OUT: AT
23:29:58:187 [3] ThreadProcessModem: IN:
OK


This is the request file from the Q:
[SMS]
SubmittedBy=82.80.77.164
SubmitUser=Mobixell
Sender=0548047058
PhoneNumber=972545615031
Data=Cool...
pid=00
dcs=00
Binary=0
ReceiptRequested=Yes
[ErrorDetail]
RetryCount=7
LastRetryTime=20100210233436
LastErrorInfo=ERROR - Modem Response (2): +CMS ERROR: 21 -- Sony Ericsson Device 0016 USB WMC Data Modem

at the same time .. I can still send new SMS from the GUI and from the Server...

is there anything wrong with the "reply" sms?

10x,
Oren
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 1792
Registered: 08-2008
Posted on Thursday, February 11, 2010 - 06:33 pm:   

Hi Oren,

Can you send a message to 972545615031 from the web interface, or do you have to prefix it with "+" (or use "0" as a local number prefix without the country code).

When NowSMS routes the message to your SMPP application, it indicates that the source address is 972545615031, and sets the source_address_ton to "1", to indicate international format.

However, when you route back a reply, it appears that dest_address_ton is not set to "1".

Also, since the SMS messages are arriving with international format numbers, I would suggest changing the phone number property to a phone number in international format.

--
Des
NowSMS Support