Hello. My configuration is CentOS 6.5, Kannel 1.4.3, PlaySMS 1.2.1 and USB modem (all in localhost) and I have some problems.
PlaySMS show message “unable to access Kannel admin commands” (Kannel admin port and password are correct) but i do not see any errors in logs.
When i try “Send from file” and upload .CSV file with records like “+7XXXXXXXXXX,Chetvertoe сообщение!” i receive message with text “Chetvertoe” and in “Sent Messages” only word “Chetvertoe” (sending via “Compose message” workig fine)
If there are errors in the .CSV file PlaySMS shows Invalid entries like "Chetvertiy ������!"
Sorry for my grammar and please help!
Ok guys. Some of my problems was solved
During finding a solution have been updated: Kannel to 1.4.4, PlaySMS to 1.3.
The problem was in the charset of the *.CSV file content’s. PlaySMS works fine only with UTF-8.
The problem is that I’m using Cyrilic for sending message. But “function core_detect_unicode” in “fn_core.php” contain regexp cheking “(’/([\xC0-\xDF].)|([\xE0-\xEF]…)|([\xF0-\xFF]…)/m” which do not fecth Cyrilic. The solution for me was to add another regexp check to this function:
" function core_detect_unicode($text) {
$unicode = 0;
$textgsm = core_string_to_gsm($text);
$match = preg_match_all('/([\\xC0-\\xDF].)|([\\xE0-\\xEF]..)|([\\xF0-\\xFF]...)/m', $textgsm, $matches);
if ($match !== FALSE) {
if ($match == 0) {
$unicode = 0;
} else {
$unicode = 1;
}
} else {
$match = preg_match('[\x{0400}-\x{04FF}]/m', $textgsm, $matches);
if ($match !== FALSE) {
if ($match == 0) {
$unicode = 0;
} else {
$unicode = 1;
}
} else {
//TODO broken regexp in this case, warn user
}
return $unicode; "
For correct message transmit to Kannel I add parameters to URL. They are "&coding=2&charset=UTF-8"
And it works correct with Cyrilic @anton sorry for my corrections of function’s code, I’m not so good in coding and in php.
Issue under item 1 is still open. By the way in “View log” page i see “playSMS daemon is NOT runnig”.
Any help is appreciated
I’ve tested and it work great for Cyrilic if I use additional parameters “&coding=2&charset=UTF-8”.
Thank you very much Anton!
Can you give some advice how to solve “unable to access Kannel admin commands” and “playSMS daemon is NOT runnig” problems?
I changed SELINUX mode to “Permissive” and i see Kannel Status. It works even without restart. Thank you very much @jcampos
I still see “playSMS daemon is NOT runnig” in “View log” page…