Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smsd with mysql does not set delivery report #63

Closed
m4ucoder opened this issue Oct 21, 2014 · 4 comments
Closed

Smsd with mysql does not set delivery report #63

m4ucoder opened this issue Oct 21, 2014 · 4 comments

Comments

@m4ucoder
Copy link

Hello I had a problem with the "delivery report".

In fact I thought it was due to my setup. I configured the "gammu-smsdrc" file to run the "smsc" with mySQL, everything worked except the "delivery report".

Yet when I set it up to make it work with files (service = files), I could see that the "delivery report" worked on seeing the sms spending folder 'sent' folder 'inbox'. So the "delivery report" of SMSC (the supplier) came correctly.

So it was a problem specific to the configuration for mysql.

Looking at the logs, I saw the query:
"SELECTID, status , SendingDateTime, DeliveryDateTime , SMSCNumberFROM WHEREsentitems DeliveryDateTimeIS NULL AND SenderID= 'thesenderId' AND= 190 ANDTPMR DestinationNumber = '+ 32485xxxxxx ".

To send the test, I used the following command:
"gammu-smsd-inject TEXT 0485xxxxxx -text" test with delivery report "-report."

It is clear that the two telephone numbers are not the same:
"32485xxxxxx +" and "0485xxxxxx".

By changing the Nos 0485xxxxxx 'by its international version (' + 32485xxxxxx '), the' delivery report 'works!

We must therefore ALWAYS use international numbering.

Sorry for my english

I hope this will help someone ...

@pavl00
Copy link
Contributor

pavl00 commented Nov 20, 2015

It's probably because operator returns in delivery report full international number +32XXXXX and in smsd there is some comparison of the number you sent message and that from delivery report.
For myself I've modified query so that you can send number XXX and delivery report will be checked as XXX or +48XXX
sqlc:
if (SMSDSQL_option(Config, SQL_QUERY_SAVE_INBOX_SMS_SELECT, "save_inbox_sms_select",
"SELECT ",
ESCAPE_FIELD("ID"),
", ", ESCAPE_FIELD("Status"),
", ", ESCAPE_FIELD("SendingDateTime"),
", ", ESCAPE_FIELD("DeliveryDateTime"),
", ", ESCAPE_FIELD("SMSCNumber"), " "
"FROM sentitems WHERE ",
ESCAPE_FIELD("DeliveryDateTime"), " IS NULL AND ",
ESCAPE_FIELD("SenderID"), " = %P AND ",
ESCAPE_FIELD("TPMR"), " = %t AND (",
ESCAPE_FIELD("DestinationNumber"), " = %R OR ",
ESCAPE_FIELD("DestinationNumber"), " = replace(%R,'+48',''))", NULL) != ERR_NONE) {
return ERR_UNKNOWN;
}

@nijel
Copy link
Member

nijel commented Nov 20, 2015

There is SkipSMSCNumber config for this as well..

@pavl00
Copy link
Contributor

pavl00 commented Nov 20, 2015

SkipSMSCNumber works when smsc differs,
In that problem different is DestinationNumber so that query above returns nothing

@nijel
Copy link
Member

nijel commented Nov 20, 2015

Ah okay, I didn't get that this is about different number...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants