Search code examples
macospostgresqlsegmentation-faultsms-gatewaykannel

kannel 1.5 addons sqlbox on mac connect to Postgresql 9.3.5 with "Segmentation fault: 11" error


I am trying to build my own sms gateway by compile Kannel 1.5.0 on my mac 10.10. I installed all depends that Kannel required. I configured Kannel to work with Postgresql 9.3.5. BearerBox and smsBox are in good work order. I can send/receive sms from my HUAWEI E3131 3G WCDMA modem.

After I got sms gateway worked, I go next step by trying compile Kannel addons sqlbox to support sms sql storage and insert sms to database to trigger sms services. Following steps used:

  1. use bootstrap to configure environments

    .bootstrap

  2. configure sqlbox with Kannel support

    ./configure --with-kannel-dir=/usr/local/kannel --disable-docs --enable-drafts

  3. make to compile

    make

  4. make install to install sqlbox to proper location

    make bindir=/usr/local/kannel install

  5. configure sqlbox by edit sqlbox.conf file like:

    group = pgsql-connection id = pgsqlbox-db host = "10.0.1.100" username = any password = any database = dlr max-connections = 1 port=5433

    group = sqlbox id = pgsqlbox-db smsbox-id = sqlbox global-sender = "" bearerbox-host = localhost bearerbox-port = 13001 smsbox-port = 13002 smsbox-port-ssl = false sql-log-table = sent_sms sql-insert-table = send_sms log-file = "/usr/local/var/log/kannel/kannel-sqlbox.log" log-level = 0

  6. configure postgresql to add table send_sms and sent_sms and test by using PSQL client to test, data base is working order

  7. start services from terminal

    ./bearerbox -v 1 /usr/local/kannel/conf/smskannel.conf ./smsbox -v 1 /usr/local/kannel/conf/smskannel.conf

bearerbox and smsbox is in working order.

  1. start sqlbox service

    ./sqlbox -v 1 /usr/local/kannel/conf/sqlbox.conf

error message was given:

 2015-05-01 10:06:01 [11407] [0] INFO: Debug_lvl = 1, log_file = <none>, log_lvl = 0
 2015-05-01 10:06:01 [11407] [0] INFO: Starting to log to file /usr/local/var/log/kannel/kannel-sqlbox.log level 0
 2015-05-01 10:06:01 [11407] [0] INFO: Added logfile `/usr/local/var/log/kannel/kannel-sqlbox.log' with level `0'.
 2015-05-01 10:06:01 [11407] [0] INFO: PGSQL: Connected to server at '10.0.1.100'.
 Segmentation fault: 11

in my understanding, Segmentation fault: 11 was thrown out by Postgresql server. So I configured Postgresql server to get more detail level debug information. Seems Postgresql is working fine.

Does anyone have a better idea about it? I totally lost my direction. Any advice are welcome.


Solution

  • Kannel is probably too old to care out the work in new system.

    I changed it to Gammu 1.36.0,

    1. make sure cmake installed.
    2. autoconf and other required depends installed.
    3. download Gammu 1.36.0
    4. compile and install

      .configure

      make

      sudo make install

    5. configure Gammu by using [gammu] and [smsd] sections

    6. enable log file in system
    7. use newest db schema to create tables in database
    8. start service by

      gammu-smsd

    9. check log make sure it works 10.send test message by

      gammu-smsd-inject

    11.receive sms 12.check database tables inbox and sentitems 13.done