Hi all!
I'm using sqlbox to send messages via SMPP, but I'm getting a very strange
problem.
I've decided to use smsbox to handle the DLR via the dlr_url.
So let me see if I can explain all the situations occurring.
*1st insertion on the database:*
INSERT INTO send_sms( momt, sender, receiver, msgdata, sms_type, dlr_mask,
dlr_url) VALUES ('MT', 'MV', '+3519******67', 'Hello world', 2, 31, '
http://my_domain/services/teste.php?type=%d%destination=91******7');
As you can see, the URL has an error (it should have
type=%d&destination instead
of type=%d%destination). This ended up in having a DLR with the status of 8
(!?) not properly registered by the php script since the url is malformed.
*2nd insertion on the database:*
INSERT INTO send_sms( momt, sender, receiver, msgdata, sms_type, dlr_mask,
dlr_url) VALUES ('MT', 'MV', '+3519******67', 'Hello world', 2, 31, '
http://my_domain/services/teste.php?type=%d&destination=91******7');
This ended up in having a DLR with the status of 16 properly registered by
my php script (yes, it works with the dlr_url not encoded).
At this point I contacted the support of my provider to know why they where
rejecting my messages. They told me that the messages where being sent with
DCS=216. They told me to set DCS to 1 if I'm sending 7-bit messages or DCS
to 3 or 0 if I'm submitting ISO (8-bit message).
In fact on the smsc log I have this: data_coding: 216 = 0x000000d8
*3rd insertion on the database:*
Wondering why the change on the dlr_url gave different DLR status, I made
the following
INSERT INTO send_sms( momt, sender, receiver, msgdata, sms_type, dlr_mask,
dlr_url) VALUES ('MT', 'MV', '+3519******67', 'Hello world', 2, 31, '7');
This ended up in having a DLR with the status of 0. Yes, I received the
message, but... the text was this: 䡥汬漠睯牬搀
The smsc log still gives: data_coding: 216 = 0x000000d8
*4th insertion on the database:*
Testing what would happen if I passed a URL encoded dlr_url
INSERT INTO send_sms( momt, sender, receiver, msgdata, sms_type, dlr_mask,
dlr_url) VALUES ('MT', 'MV', '+3519******67', 'Hello world', 2, 31,
'http%3A%2F%2Fmy_domain%2Fservices%2Fteste.php%3Ftype%3D%25d%26destination%3D91******7');
This ended up in having a DLR with the status of 0. I received the same
text: 䡥汬漠睯牬搀
The smsc log still gives: data_coding: 216 = 0x000000d8
The smsbox complains that:
ERROR: URL
<http%3A%2F%2Fmy_domain%2Fservices%2Fteste.php%3Ftype%3D%25d%26destination%3D91******7>
doesn't start with `http://' nor `https://'
ERROR: Couldn't send request to
<http%3A%2F%2Fmy_domain%2Fservices%2Fteste.php%3Ftype%3D%25d%26destination%3D91******7>
*Summarizing:*
I don't know what's happening here.
Different values of the dlr_url cause different SMSC reactions to the
request.
The DCS value is strange and I'm getting Chinese characters when I should
receive a "Hello world".
Anyone could, please, point out what I am missing here?
--
[image: Multivision] *Jorge Raimundo
* RAN Consultant | [email protected] . Rua António Albino
Machado, Nº33, 2ºB. S. Domingos de Benfica, 1600 - 870 Lisboa Fixed PT: +351
21 155 20 53 | Mobile PT: +351 91 933 13 67 www.multivision.pt