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

Missing First Word in Message #490

Closed
astravoice opened this issue Sep 13, 2015 · 22 comments
Closed

Missing First Word in Message #490

astravoice opened this issue Sep 13, 2015 · 22 comments
Milestone

Comments

@astravoice
Copy link

Hello.

I was testing this and noticed that if you simulate a test message, the first word is missing.

Steps.

https://localhost/index.php?app=main&inc=gateway_dev&route=simulate&op=simulate

Enter Message

"This is a test message."

Step 2.

Go to Inbox
https://localhost/index.php?app=main&inc=feature_report&route=user_inbox&op=user_inbox

"is a test message."

@ippbx
Copy link

ippbx commented Sep 18, 2015

Yes I noticed same problem.

@antonraharja
Copy link
Member

I tested this and the message went to Sandbox as it suppose to, not Inbox, and I got full message on Sandbox. Can you screenshot how you test it and where do you see your message ?

@astravoice
Copy link
Author

Thanks. I am not sure I understand the response.
Where is "Sandbox"

I am using v1.3

Where is Sandbox menu?

@astravoice
Copy link
Author

screen shot 2015-09-18 at 11 31 09 am

@ippbx
Copy link

ippbx commented Sep 18, 2015

I have it routing to inbox and then it loses first word.

@antonraharja
Copy link
Member

unless you guys give me details on how you actually send the test message, what were configured in Route incoming, and other changes you made, I cannot help. I tested on 2 servers and I couldn't replicate this issue. I tried to route Sandbox to Inbox too. I'm using 1.3.

@astravoice
Copy link
Author

screen shot 2015-09-18 at 12 52 51 pm

@astravoice
Copy link
Author

screen shot 2015-09-18 at 12 55 48 pm

@astravoice
Copy link
Author

screen shot 2015-09-18 at 12 56 30 pm

@astravoice
Copy link
Author

screen shot 2015-09-18 at 12 57 03 pm

@astravoice
Copy link
Author

I have this in the Database.

select * from playsms_tblRecvSMS;

| 0 | 33 | 2 | 2015-09-12 16:44:32 | 629876543210 | This is a message | 17082920638 | dev |
| 0 | 34 | 2 | 2015-09-13 04:44:39 | 629876543210 | This is a message | 17082920638 | dev |

select * from playsms_tblSMSIncoming;

| 0 | 33 | 0 | 1 | | dev | 629876543210 | 17082920638 | | This is a message | 2015-09-12 16:44:32 | 1 |
| 0 | 34 | 0 | 1 | | dev | 629876543210 | 17082920638 | | This is a message | 2015-09-13 04:44:39 | 1 |

select * from playsms_tblSMSInbox;

| 1442116491 | 23 | 1 | 629876543210 | 17082920638 | 1 | is a message | 2015-09-12 09:40:40 | |
| 1442116491 | 24 | 1 | 629876543210 | 17082920638 | 1 | is a message | 2015-09

As you can see the data is correct in the First 2 tables but the Inbox Table has the first word missing.

@astravoice
Copy link
Author

I have a customized inbound routing script that calls.

Incoming.php

@antonraharja
Copy link
Member

ok, now lets examine the log file:

please set your loglevel to 3 from config.php, and then restart playsmsd. next to tail the log file and try 1 test to simulate incoming SMS:

tail -f /var/log/playsms/playsms -n0 | tee debug1.txt

once that single test is done you can ctrl+c and read debug1.txt, sanitize private information and paste here, or paste in pastebin and paste the link here

anton

@astravoice
Copy link
Author

sms.example.us 2015-09-19 21:45:19 PID55fe0fafad562 - L3 recvsms # isrecvsmsd:1 dt:1442713550 sender:+18005551212 m:Three word test receiver:17082920638 smsc:dev

  • - 2015-09-19 21:45:20 PID55f5adaee7689 - L3 recvsmsd # id:50 dt:1969-12-31 19:00:00 sender:+18005551212 m:Three word test receiver:17082920638 smsc:dev
  • - 2015-09-19 21:45:20 PID55f5adaee7689 - L3 inboxgroup # forwardcatchall id:3 s:+18005551212 r:17082920638 m:word test
  • - 2015-09-19 21:45:20 PID55f5adaee7689 - L2 recvsms_inbox_add # saving sender:+18005551212 receiver:17082920638 target:admin reference_id: message:word test
  • - 2015-09-19 21:45:20 PID55f5adaee7689 - L2 recvsms_inbox_add # saving sender:+18005551212 receiver:17082920638 target:admin reference_id:
  • - 2015-09-19 21:45:20 PID55f5adaee7689 - L2 recvsms_inbox_add # saved id:40 sender:+18005551212 receiver:17082920638 target:admin
  • - 2015-09-19 21:45:20 PID55f5adaee7689 - L3 recvsms_inbox_add # send email from:sms@example.us to:max@example-email.com message:[word test]
  • - 2015-09-19 21:45:20 PID55f5adaee7689 - L2 sendmail # start from:sms@example.us to:max@example-email.com subject:Message from max (+18005551212)
  • - 2015-09-19 21:45:21 PID55f5adaee7689 - L2 sendmail # end from:sms@example.us to:max@example-email.com subject:Message from max (+18005551212)
  • - 2015-09-19 21:45:21 PID55f5adaee7689 - L3 recvsms_inbox_add # sent email from:sms@example.us to:max@example-email.com
  • - 2015-09-19 21:45:21 PID55f5adaee7689 - L3 recvsms_process # dt:1969-12-31 19:00:00 sender:+18005551212 m:Three word test receiver:17082920638 smsc:dev
  • - 2015-09-19 21:45:21 PID55f5adaee7689 - L3 recvsms_process # intercepted datetime:1969-12-31 19:00:00 sender:+18005551212 receiver:17082920638 message:Three word test
    ~

@antonraharja
Copy link
Member

I see, do you use Inbox group ? can you remove your config/setup on Inbox group and then test again

@ippbx
Copy link

ippbx commented Sep 20, 2015

I disabled in GUI the group inbox and then first word came through.

@antonraharja
Copy link
Member

ok, please edit your plugin/feature/inboxgroup/fn.php and go to line 64.

change this line:

inboxgroup_forwardcatchall($data, $log_in_id, $sms_sender, $msg['content']);

into this line:

inboxgroup_forwardcatchall($data, $log_in_id, $sms_sender, $message);

save it, and then restart playsmsd, and then re-enable your inbox group and test

ref:
https://github.com/antonraharja/playSMS/blob/master/web/plugin/feature/inboxgroup/fn.php#L64

@ippbx
Copy link

ippbx commented Sep 20, 2015

Yes all words came through, thanks a million.

@antonraharja
Copy link
Member

but this isn't a bug, it was designed to remove the keyword. message processed by Inbox Group was just like any other message that came to any other feature, their format is: KEYWORD CONTENT

@astravoice
Copy link
Author

Maybe a quick if statement would be worthwhile in the case a KEYWORD is not found then you dont run into the problem.

@astravoice
Copy link
Author

I appreciate the fix. None the less.

@antonraharja
Copy link
Member

Ah yes, it was caught by catchall account. may be catchall will receive forward in full message rather then missing the keyword

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

No branches or pull requests

3 participants