It was a mistake with encodings in external program (from where I add records to send_sms table). I fix it and now everything works.

For now I have a working system.
No. You need to have kannel installed (make install) before sqlbox compilation. Otherwise sqlbox might use your old kannel installation.
I have written it wrong. I installed them not simultaneously but sequentially. kannel was installed without issues, but with installing sqlbox after kannel was a problems.
But for now I have a working system.
Later I will try to reinstall kannel and sqlbox with a checkinstall.
Or may be fresh kannel version will be add to Debian repository.

Thank you for your help!

On 01/24/2016 02:27 AM, spameden wrote:


2016-01-23 22:10 GMT+03:00 Deins <notabenaaba...@gmail.com <mailto:notabenaaba...@gmail.com>>:

    I use Debian Jessie 8
    I tried to install kannel and sqlbox with a checkinstall, but it
    didn't work out.


No. You need to have kannel installed (make install) before sqlbox compilation. Otherwise sqlbox might use your old kannel installation.

Also make sure you run proper kannel binary, by default make install installs (I think) into /usr/local/sbin not from /usr/sbin, so check with

ps aux|grep -E 'bearerbox|sqlbox'

if it's running correct binary or just edit /etc/init.d/kannel script to make sure it uses proper binaries from correct path.

    So I just repeated commands you wrote. Now it's works.

    Now I have a symbols on my handset(not "empty squares"), but they
    stil wrong.
    I'll try to find a pattern of these symbols.

    On 01/23/2016 05:21 PM, spameden wrote:
    1) Which kinda distro you're using?

    2) I've just checked on Debian Wheezy 7 (with latest updates),
    kannel compiles just fine, here is a list of required packages:

    Here is a number of commands to run (1st line is debian/ubuntu
    specific):
    apt-get install subversion bison flex build-essential libxml2-dev
    libtool libmysqlclient-dev libssl-dev
    svn co https://svn.kannel.org/gateway/trunk/ kannel
    cd kannel
    ./configure --with-mysql
    make
    make install
    cd addons/sqlbox
    ./configure --with-mysql
    make
    make install

    3)  Bison and Flex packages:
    ii  bison 1:2.5.dfsg-2.1
    ii  flex  2.5.35-10.1

    2016-01-23 13:05 GMT+03:00 Deins <notabenaaba...@gmail.com
    <mailto:notabenaaba...@gmail.com>>:

        I delete folder with extracted archive, purge and install
        bison and flex packages.
        make command:

        $ ./configure --with-mysql --with-mysql-dir='/usr/share/mysql'
        it works right, next I do

        $ make

        and got error:
        /In file included from wmlscript/wslexer.c:72:0://
        //y.tab.h:262:5: error: conflicting types for ‘ws_yy_parse’//
        //In file included from wmlscript/wslexer.c:70:0://
        //wmlscript/wsint.h:296:5: note: previous declaration of
        ‘ws_yy_parse’ was here//
        // int ws_yy_parse(void *context);/

        I looked at wmlscript/wslexer.c, there are two "include"
        directives on lines 70 and 72 and in both included files
        declared 'ws_yy_parse'.

        Is it a bug?



        On 01/23/2016 04:09 PM, spameden wrote:


        2016-01-23 11:22 GMT+03:00 Deins <notabenaaba...@gmail.com
        <mailto:notabenaaba...@gmail.com>>:

            Trying to install Kannel 1.4.4 from official site.
            1. ./configure - ok
            2. make - got error "unknown type name YYLTYPE"

            found in google, that it is something similar Yacc or
            Bison parser.
            Currently bison 2:3.0.3 is installed.
            I don't know much about this (better to say I don't know
            anything about yacc).
            Need help.


        Try installing flex and bison and run configure again.

        Also make sure you run ./configure --with-mysql



            On 01/23/2016 01:13 AM, spameden wrote:


            2016-01-22 19:54 GMT+03:00 Deins
            <notabenaaba...@gmail.com
            <mailto:notabenaaba...@gmail.com>>:

                1) I use Kannel 1.4.3 from Debian repo. I will try
                to install latest stable version if nothing helps.
                2) All tables in my database already was utf8, but
                to be sure I'm executed:
                    ALTER TABLE send_sms CONVERT TO CHARACTER SET utf8;
                    ...
                3) yes, it is
                4) coding=2, charset=utf8

                5) now I have "empty square" characters on my phone.

            As I said before you need to use latest version from
            SVN or version 1.4.4 (which is stable and released),
            althrough SVN version is considered to be production
            ready and have most of the bugs fixed. You need to use
            SVN version of sqlbox as well as kannel.

            In version 1.4.3 and 1.5.0 (previous DEV version) there
            was a bug related to UCS-2 characters conversion which
            was fixed 2 years ago or so, so just use SVN version
            it's best and it's not hard to compile.


                On 01/22/2016 06:30 PM, spameden wrote:
                To get proper cyrillic or any UCS-2 text on your
                handset:

                1) Make sure you use latest kannel version from
                SVN (compile it yourself)

                2) execute in MySQL:
                ALTER table send_sms charset=utf8
                ALTER table sent_sms charset=utf8
                ALTER table dlr charset=utf8
                So all your tables will be in utf8 encoding.

                3) When you insert text into send_sms table you
                need to make sure text is in UTF-8 encoding and
                urlencoded.

                4) set coding=2 and charset='utf8', NOTE: each MT
                will be limited to 70 symbols. If you use
                concatenated MT each part will be limited to 69
                symbols.

                5) This way you'll get proper text on your handset.

                About msgdata field in sent_sms table: text is
                double urlencoded, I think it's either a bug in
                kannel or feature (?). Text is urlencoded to avoid
                all hassle to deal with many encodings out there,
                because for every encoding you'd need proper
                escaping, this way kannel deals with escaping. If
                you really need to preserve original text (AS IS)
                you need to modify kannel's source code as well as
                sqlbox, which can be tricky OR as a workaround you
                can have another table where you INSERT your text
                as well and save it for billing purposes (e.g.
                billing table)

                Generally speaking: both send_sms and sent_sms
                tables are kinda temporary tables (at least I keep
                only 24 hours records there so kannel operates
                quickly, because it still depends on MySQL answer).

                You can set a TRIGGER on sent_sms table and get
                updated your other billing table.

                2016-01-22 14:08 GMT+03:00 Deins
                <notabenaaba...@gmail.com
                <mailto:notabenaaba...@gmail.com>>:

                    I need to send sms with a cyrillic symbols. I
                    write sql query with a field coding=2.
                    In the send_sms table I see right value of the
                    msgdata field. But in sent_sms table all
                    characters transforms into 3F3F3F.... string.
                    How to deal with it?











Reply via email to