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
kannel split messages #170
Comments
can you paste some real example ? like what text message you're trying to send, how long the text message etc. anton |
Sure Example Message: Info: Preparing Star::Root... 3 entries in sqlbox 0049006E0066006F003A00200050007200650070006100720069006E006700200053007400610072003A003A0052006F006F0074002E002E002E000D000A0049006E0066006F003A0020004C006F006100640069006E006700200053007400610072003A003A0043006F006E00660069006700750072006100740069006F006E002000660072006F006D0020 0027002E002E002F002E002E002F002E002E002F00730074006100720062006F0075006E0064002E0063006F006E0066006900670027000D000A0049006E0066006F003A00200044006F006E006500200070007200650070006100720069006E006700200053007400610072003A003A0052006F006F0074002E000D000A0049006E0066006F003A00200043 006C00690065006E0074002000760065007200730069006F006E002000270042006500740061 3 actual messages delivered to target phone: 1st ending with "Configuration from" Perhaps it's forcing the messages to be sent as unicode? I've not got the box checked.. |
Yes, its a unicode 00 49 00 6E. Set logstate to 3 (default is 2) on config.php, and then watch the log: Send again, watch the log, ctrl c when done. gather the test.txt, read it and edit it for private informations, and then send to my email antonrd@gmail.com (or if you're sure not private info, then paste it in pastebin.com and paste the pastebin url here for us to read) |
Travis, can u post here ur smsbox & sqlbox & kannel configuration, pw stripped, pls |
@antonraharja in an effort to not post the full log with private info (and not go clear it all out manually) I did see this: 2014-01-01 10:12:53 PID52c44c959ab94 - L3 kannel outgoing # unicode autodetected Does that help? |
@dvoryanchikov I can but I've tested out kannel manually with longer messages and all works as configured. If you'd still like the configs I'll get them cleaned up and send over what you need. |
So I just launched the url from playsms config manually and experienced the same behavior. I then removed the "&coding=2" parameter getting sent to kannel and it gets delivered as a single message. Is that parameter the result of unicode being auto detected? |
I meant url from the playsms logs..not config :) |
need a longer logs. just tail it, do a single test and stop tailing, paste the log content here. anton |
Travis, I know that when dealing with kannel through sqlbox u need max-messages set to more than one and concatenate set to true else u can get such behaviour when messages gets splitted. I guess u use one sendsms-user for test kannel and another one configured in playsms. Try to set max-messages=7 and concatenate=true for playsms user in kannel conf, restart boxes and test it. |
playsms log would show whether or not the message originally submitted to Kannel as unicode, if it was then more entries on that log possibly could show why. single SMS not unicode 160 chars, unicode 70. |
I'm certain it's not a kannel issue, I've run numerous tests through kannel using the same credentials/etc that playsms uses and everything works as desired. The culprit is the &coding=2 parameter getting sent to kannel via the http sendsms service. If I remove that option all works as it should. I've cleansed sensitive data: 2014-01-01 10:12:52 PID52c44c9403c8a wm1 L2 sendsms # start uid:5 sender:000 |
I suspect something. Edit your lib/fn_core.php, remove core_detect_unicode() in there and add this:
And also check your plugin/gateway/kannel/fn.php, around line 56. It should be updated to:
In master repo the code to check unicode are updated. I hope that will fix this issue. |
Or if its a new install, perhaps you want to consider upgrade with 1.0-beta2 |
I beleive splitting messages is not unicode issue. Sure, if send this test message in 7bit (coding=0) it should not be splitted. But what about messages longer than 160 chars. I bet it is smsbox issue, known in my installation, I solved it with max-messages & concatenate parameters. |
I tried updating to 1.0-beta2 and after some nasty debugging due to silent failure (@code is bad) I'm getting this: Fatal error: Cannot redeclare _PEAR_call_destructors() (previously declared in /var/www/domain.com/web/lib/external/pear-db/PEAR.php:735) in /usr/share/php/PEAR.php on line 777 This is after removing the @ sign in DB::connect for include_once "DB/${type}.php"; in the else block. @dvoryanchikov yes splitting messages up that are longer than 160 is expected and has worked for me for years. I have max-messages up very high for the playsms account in kannel. The issue here is splitting up messages at < 160 chars. |
Here is the fix for the PEAR issue: diff --git a/web/init.php b/web/init.php +set_include_path($apps_path['libs'] . '/external/pear-db' . PATH_SEPARATOR . get_include_path()); |
OK, after getting PEAR issue worked out unicode detection appears to be fixed and a single message is getting sent. A couple notes:
Unfortunately, via the web interface my phonebook is no longer working..fortunately the entries are still in the database. Any ideas on how to get that working with beta2? |
Travis, smsbox can send long messages in one SMS, use concatenate = 1 for this. |
Travis, since 1.0 phonebook contact can be in several groups, u should fill new table playsms_toolsPhonebook_group_contacts with ur phonebook ids and ids of any group u have |
Also not seeing my "Incoming Messages" for this account. |
Is there an upgrade script/path for filling that table? I do have some contacts that are duplicates to be in multiple groups so that would be nice to get those cleaned up. |
There is no any migrate script until u write one and share with us :-) |
@dvoryanchikov my kannel setup is very simple connected to a usb phone. The phone will not send out > 160 at a time. So yes, kannel is sending to the phone in 1 transaction but the phone is splitting them appropriately. |
Travis, any gsm phone/modem CAN send long (multipart) messages , at least all of my phones and modems can. |
Messages aren't visible in "All incoming" and I don't see "Unhandled messages" Where can I find it? WRT to the messages thanks for the clarification but in my case it doesn't really matter. The point is that somewhere further down the line (out of my control) is splitting the messages (carrier to carrier, etc). I expect messages > 160 ultimately reaching my target phone to be split into multiple messages. |
Unhandled should be in Administration->Sandbox |
Yeah, the messages I used to see for this account are not visible in Sandbox either :( I just noticed the DROP gpid in the upgrade SQL. I could help with upgrade SQL but DROP'ing that is absolutely a no-no until the upgrade has occurred. The phonebook listing IMO should show contacts even if they aren't associated to a group. |
Scratch the incoming messages problem. I was looking in the wrong spot :( Sorry for the mixup. |
I tried to implement that feature (make contacts free of groups). This is possible, but conflicts next accepted features "shared groups and shared contacts". I'm currently working on it.. |
@dvoryanchikov excellent! |
so, has the original issue fixed in 1.0-beta2 ? anton |
@antonraharja yes, no longer sending coding=2 and messages go out in segments of 160 real chars as before. Original issue can be closed. |
I recently updated to 0.9.9.2 and noticed the messages are getting sent to kannel in some sort of encoding. While the messages are getting sent with the proper text they are being split into multiple messages apparently based on 160 encoded characters.
Can you shed some light on how I can resolve this?
Note that I have sqlbox in the mix if that helps at all.
I also recently updated kannel to 1.5.0 but I've tested sending content to it directly and the # of messages are correct based on message length.
The text was updated successfully, but these errors were encountered: