SMS not being delivered

SMS not being delivered SearchSearch
Author Message
janis klimowicz
New member
Username: Janisk

Post Number: 7
Registered: 03-2012
Posted on Tuesday, April 10, 2012 - 09:30 pm:   

SMS messages are not being delivered. I am able to send/receive via the SMS server, but when submitting SMS messages via URL, the recipients don't receive them. The messages show up in the SMSOUT & SMSWEb logs. What am I doing wrong?
--thanks!

A snippet from my debug log (phone num changed for privacy):

<<---snip--->>
11:55:55:421 [16] ModemTest: Multi-Tech Systems MTCBA-C1
11:55:55:734 [16] ModemTest: OK
11:57:38:203 [1] ThreadListenForConnections: Before accept
11:57:38:203 [1] ThreadListenForConnections: After accept
11:57:38:203 [1] ThreadListenForConnections: Before accept
11:57:38:203 [1] ThreadListenForConnections: After accept
11:57:38:203 [17] ThreadProcessConnection: Processing connection from 127.0.0.1:13507...
11:57:38:203 [17] ThreadProcessConnection: Processing request /?phonenumber=9999999999&text=test%20message&receiptrequested=yes
11:57:38:203 [17] Debug: 1 recipient entries
11:57:38:218 [18] ThreadProcessConnection: Processing connection from 127.0.0.1:13763...
11:57:39:015 [16] ThreadProcessModem: Processing 4F726295.req...
11:57:39:078 [16] ThreadProcessModem: OUT: AT+CMGS="9999999999"

11:57:39:140 [16] ThreadProcessModem: IN:
>
11:57:39:140 [16] ThreadProcessModem: OUT: test message
11:57:39:250 [16] ThreadProcessModem: +CMGS: 142

OK

11:57:41:453 [16] ReceiveModemCommand: Processing +CMT: Message
11:57:41:453 [16] ReceiveModemCommand: +CDS: 0,2,142,"9999999999",129,"03/04/10,11:58:23","03/04
11:57:41:453 [16] FilterCMT: Incomplete +CMT: or +CDS: Message
11:57:41:453 [16] ReceiveModemCommand: Adjusting timeout to wait for +CMT to complete
11:57:41:500 [16] ReceiveModemCommand: Processing +CMT: Message
11:57:41:500 [16] ReceiveModemCommand: +CDS: 0,2,142,"9999999999",129,"03/04/10,11:58:23","03/04/10,11:58:25",32768

11:58:38:218 [18] ProcessRead: End of socket
11:58:38:218 [18] WaitForSocketClose: WinSock reported ioctlsocket complete
11:58:38:218 [18] ThreadProcessConnection: Request processing complete
11:58:43:218 [17] ProcessRead: End of socket
11:58:43:218 [17] WaitForSocketClose: WinSock reported ioctlsocket complete
11:58:43:218 [17] ThreadProcessConnection: Request processing complete
11:58:56:453 [16] ModemTest: Multi-Tech Systems MTCBA-C1
11:58:56:765 [16] ModemTest: OK
11:59:06:203 [0] UseRouteCache: No
12:00:06:265 [0] UseRouteCache: No
12:01:58:343 [16] ModemTest: Multi-Tech Systems MTCBA-C1
12:01:58:640 [16] ModemTest: OK
<<---end of snippet--->>

My SMSGW.INI file:

[SMSGW]
Debug=Yes
Modem1=Multi-Tech Systems MTCBA-C1
WebPort=8800
WebAuth=No
ReceiveSMS=Yes
ReceiveMMS=No
PHPEnable=Yes
PHPAllowRemote=Yes
ReceiveSMSCharset=utf-8
ReceiveSMSCommand1=* http://127.0.0.1:8800/php/sms.php?id=@@MESSAGEID@@&sender=@@SENDER@@&msg_date=@@MSGDATE@@&msg_time=@@MSGTIME@@&msg=@@ FULLSMS@@ No
[Modem - Multi-Tech Systems MTCBA-C1]
UseDial=Yes
UseModem=Multi-Tech Systems MTCBA-C1
DialUpProfile=Modem: Multi-Tech Systems MTCBA-C1
ReceiveSMS=Yes
ReceiveMMS=No
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 3900
Registered: 08-2008
Posted on Wednesday, April 11, 2012 - 12:20 am:   

Hi Janis,

I do not understand what you mean by this:


quote:

I am able to send/receive via
the SMS server, but when submitting SMS messages via URL, the recipients don't receive them




Are you saying that it works if you submit the message from the web interface, but not via direct URL submission?

(The web interface generates a URL request that you would see in the SMSDEBUG.LOG. How is it different?)

Or does it never work?

The delivery report has an extra parameter that does not belong, but it seems to be indicating an unknown error from the network.

Have you ever been able to send a message over the modem? If so, how?

Normally at this point I'd suggest moving the SIM from the modem into a phone and confirming that the SIM is provisioned for sending SMS. However, that is not an option with CDMA devices.

--
Des
NowSMS Support
janis klimowicz
New member
Username: Janisk

Post Number: 8
Registered: 03-2012
Posted on Wednesday, April 11, 2012 - 12:48 am:   

Via the SMS Lite interface, if I click on the "Test Message" tab, and enter the phone number of the modem as the number to send to, I receive 2 SMS message. So, I guess I don't really know if a message is being sent over the modem, or the SMS software is just redirecting the message.
janis klimowicz
New member
Username: Janisk

Post Number: 9
Registered: 03-2012
Posted on Wednesday, April 11, 2012 - 01:04 am:   

I sent a test message from my phone to the SMS Lite Gateway modem and it shows up in the SMSIN-xxx.LOG twice, so the modem must be working if it's able to receive messages
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 3901
Registered: 08-2008
Posted on Wednesday, April 11, 2012 - 01:59 am:   

The test message is definitely going out and back in. I believe that test interface just builds an HTTP GET and it should be visible in SMSDEBUG.LOG.

Try sending to that same modem number via direct HTTP URL. Try sending to other numbers from test interface. Try to determine if problem is interface specific or destination number specific.
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 3903
Registered: 08-2008
Posted on Wednesday, April 11, 2012 - 01:27 pm:   

Hi Janis,

I've done a little more investigation.

This particular CDMA modem that you are using is emulating the GSM modem command set, and it appears to have a lot of quirks.

As I mentioned, in your log, it is returning a non-delivery receipt that is not properly formatted (has an extra parameter at the start). I've even referred to the technical docs for that Multitech modem, and the format of that receipt also does not match its own technical docs either.

That said, what I think might be happening is that after restarting the modem, you can send or receive one message, but that's it.

The reason for this is because when a message or delivery report is received, the modem is expecting NowSMS to acknowledge it. However, NowSMS is not acknowledging it. I believe the modem may be blocking further sends until it is reset, times out, or receives this acknowledgment.

The reason NowSMS is not acknowledging it is because NowSMS has queried the modem commands, and it believes the modem is operating in a mode that does not expect acknowledgments. (Most modems do not expect these acknowledgments, and this particular modem does not support the command that is used for the query! Yet, one of the other commands that NowSMS sends has the unexpected effect of putting the modem into a mode that expects acknowledgments.)

I think you can get around this problem by editing SMSGW.INI, and under the [Modem - modem driver name] header, adding:

CommandPostInit1=AT+CNMI=2,2,0,0,0

According to Multitech docs, this will configure the modem to not expect the acknowledgments to which I am referring.

However, it will have the side effect of disabling delivery receipts. That is not a great loss, because at present, the fact that they are not formatted properly is preventing NowSMS from understanding them.

--
Des
NowSMS Support
janis klimowicz
New member
Username: Janisk

Post Number: 10
Registered: 03-2012
Posted on Wednesday, April 11, 2012 - 06:06 pm:   

Hi Des,

Adding the CommandPostInit1 didn't have any effect. I've attached the smsdebug.log and the smsgw.ini files. Any other ideas to try?

Do you have any recommended modems? I'm thinking it would just be better to purchase one that works.

thanks!
application/octet-streamsmsdebug
SMSDEBUG.LOG (12.7 k)
application/octet-streamsmsgw.ini
SMSGW.INI (0.5 k)
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 3906
Registered: 08-2008
Posted on Thursday, April 12, 2012 - 02:25 pm:   

Hi Janis,

Ok ... let's see ...

It looks like you sent 3 messages with the text "test message after reboot". The third of these messages was to the modem itself, and it was received properly by the modem.

I assume the first two messages were never received?

And I assume if you send another message to the modem's own number that it will be received by the modem.

(Please correct me if these assumptions are wrong.)

I don't know what to make of this. What mobile operator is the modem connected to? Are the recipients also on the same operator? (If not, can you try sending to a recipient connected to the same operator. Perhaps the operator has restricted destinations that this account is allowed to send to.)

I'm leaning toward there being some sort of operator restriction on who the account is allowed to send to.

As for recommended modems, if you have to use a CDMA based carrier (Verizon, Sprint), I don't think there are any other options. The Multitech is the only one I've seen working on those networks.

If you can use a GSM based carrier, there are far more options. Option, Huawei, Sierra Wireless and others. (Avoid the Option ICON 225, but 3xx and 4xx series are good.)

--
Des
NowSMS Support
janis klimowicz
New member
Username: Janisk

Post Number: 11
Registered: 03-2012
Posted on Friday, April 13, 2012 - 01:13 am:   

Thanks Des,

After some testing, I did indeed discover that sms' may only be received by Verizon customers. Thanks for pointing that out... I have engaged a customer service rep, so hopefully they'll be able to sort it out. Otherwise, we'll look at GSM modems.

Many thanks for your assistance,
janis
janis klimowicz
New member
Username: Janisk

Post Number: 12
Registered: 03-2012
Posted on Tuesday, April 17, 2012 - 10:47 pm:   

A question please, concerning how an SMS message is sent via URL...

Is there something in the packet that indicates whether it is an MMS or an SMS? AT&T is not accepting the SMS from Verizon, saying that it looks like it's a picture or vcard, or something other than a plain text SMS. Is there a setting somewhere to ensure the SMS is sent as text-only?

I'm trying to figure out if the SMS is picking something up from the MultiTech Modem or from the NowSMS program when it's being sent.

thanks!
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 3910
Registered: 08-2008
Posted on Wednesday, April 18, 2012 - 06:21 pm:   

Hi Janis,

That is odd.

With that modem, we can only send SMS messages in text mode. There are no binary attributes that we can specify.

In this text mode, we don't have any control over message attributes.

I've been reading through the technical manual for the Multitech CDMA modem ... and it does have a proprietary command for setting the language for messages that are sent.

Try replacing the previous CommandPostInit1 setting with this:

CommandPostInit1=AT+WSCL=1,3

Restart the NowSMS service after adding this setting so that it forces the modem to be re-initialised.

If this also fails, try this alternative:

CommandPostInit1=AT+WSCL=1,2

--
Des
NowSMS Support
janis klimowicz
New member
Username: Janisk

Post Number: 13
Registered: 03-2012
Posted on Wednesday, April 18, 2012 - 06:35 pm:   

Hi Des,

Success!!

CommandPostInit1=AT+WSCL=1,3 did the trick.

But...I received two identical text messages. NowSMS indicates that it only sent one, but my phone received two. Any ideas on why that would be?

thanks much. I really appreciate your help.
janis
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 3911
Registered: 08-2008
Posted on Wednesday, April 18, 2012 - 07:02 pm:   

It seems very odd that the default settings would have such a problem ... I never would have expected this, but it made sense when you mentioned that they thought the message was binary ...

I'm not sure why the message would be received twice. Is it all messages?

I can take a look at a fresh SMSDEBUG.LOG, but you might be able to also make sense of it yourself.

The typical sequence you will see in the SMSDEBUG.LOG is this:

08:09:08:343 [16] ThreadProcessModem: Processing 4F727A0F.req...
08:09:08:421 [16] ThreadProcessModem: OUT: AT+CMGS="9044444444"

08:09:08:484 [16] ThreadProcessModem: IN:
>
08:09:08:484 [16] ThreadProcessModem: OUT: test message after reboot
08:09:08:578 [16] ThreadProcessModem: +CMGS: 155

OK

The "xxxxxxxx.REQ" should be unique for each message submitted. You should only see it repeated if an error is reported when attempting to send the message.

The +CMGS: xxx value also typically increases by one for each message submission.

Are you seeing any messages being processed more than once? Or any +CMGS: values that seem to be skipping a number in sequence?

Feel free to post another SMSDEBUG.LOG and I can take another look.

--
Des
NowSMS Support
janis klimowicz
New member
Username: Janisk

Post Number: 14
Registered: 03-2012
Posted on Wednesday, April 18, 2012 - 07:30 pm:   

Hi Des,

After modifying -- AT+WSCL=1,2 -- my AT&T phone only received one message. There must be something in the IA5 GSM encoding that AT&T thinks it didn't deliver the message, so it sends it again.

thanks much,
janis
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 3912
Registered: 08-2008
Posted on Wednesday, April 18, 2012 - 07:44 pm:   

Hi Janis,

That's interesting. You'll have problems with a few special characters, most notably @ where the message will probably be truncated at the @.

Others that will likely be problems are $ ~ ^ [ ] \ { } |

We're going to look into a setting to deal with those characters, since we assume that text mode with a modem means using the GSM character set. Just be aware of this issue right now.

--
Des
NowSMS Support
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 3914
Registered: 08-2008
Posted on Wednesday, April 18, 2012 - 08:57 pm:   

Hi Janis,

One follow-up ... I was incorrect about the problem with those special characters in my most recent message. When using the text mode modem interface, we are using ASCII not the GSM character set.

So those characters should be OK.

However, that said ... the gateways between CDMA and GSM carriers do frequently get confused with some of these characters. So you may experience unexpected issues with them.

--
Des
NowSMS Support