I used smsbox to check how would be a query inserted by smsbox on
sqlbox. The result is:
INSERT INTO send_sms ( sql_id, momt, sender, receiver, udhdata,
msgdata, time, smsc_id, service, account, sms_type, mclass, mwi,
coding, compress, validity, deferred, dlr_mask, dlr_url, pid, alt_dcs,
rpi, charset, boxc_id, binfo, meta_data )
VALUES
( NULL, 'MT', 'MV', '35191******7', NULL, 'Hello+world', 1325675923,
NULL, 'tester', NULL, 2, NULL, NULL, 0, NULL, NULL, NULL, 31, '
http://my_domain/services/teste.php?type=%d&destination=91******7',
NULL, NULL, NULL, NULL, 'SMSBOX', NULL, NULL);

With this query the message is sent and received properly. So the
problem was that MySQL had 0 as a default value for the unspecified
columns, since this query specifies them all including those that are
meant to be NULL, this worked fine.

I changed my table to have NULL as a default value and I reinserted
the query I was using yesterday:
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');

and it worked fine.

Best regards,
Jorge



On Tue, Jan 3, 2012 at 4:33 PM, Jorge Raimundo <
[email protected]> wrote:

> 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
>
>


-- 

  [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
  • DCS problem Jorge Raimundo
    • Re: DCS problem Jorge Raimundo

Reply via email to