It's ok, i got the sqlbox working
But still have one problem :
I have PGSQL going on the server, created a user owning a database and configured my db group to fit that, the db connexion is ok, but sqlbox throw an error in sqlbox.log :
-------------------------------------------------------------------------
2006-07-14 16:19:16 [7744] [0] INFO: Added logfile `/var/log/smgs/sqlbox.log' with level `0'.
2006-07-14 16:19:16 [7744] [0] ERROR: PGSQL: connection to database 'smgstest' failed!
2006-07-14 16:19:16 [7744] [0] PANIC: PGSQL: could not connect to server: Connection refused
        Is the server running on host "localhost" and accepting
        TCP/IP connections on port 1735355439?

2006-07-14 16:19:16 [7744] [0] PANIC: /usr/local/sbin/sqlbox(gw_panic+0xe1) [0x806c030]
2006-07-14 16:19:16 [7744] [0] PANIC: /usr/local/sbin/sqlbox [0x8060731]
2006-07-14 16:19:16 [7744] [0] PANIC: /usr/local/sbin/sqlbox(dbpool_increase+0xe1) [0x8060cf0]
2006-07-14 16:19:16 [7744] [0] PANIC: /usr/local/sbin/sqlbox(dbpool_create+0x79) [0x8060dba]
2006-07-14 16:19:16 [7744] [0] PANIC: /usr/local/sbin/sqlbox(sqlbox_init_pgsql+0x2f4) [0x80538b5]
2006-07-14 16:19:16 [7744] [0] PANIC: /usr/local/sbin/sqlbox(main+0x379) [0x805087f]
2006-07-14 16:19:16 [7744] [0] PANIC: /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xd2) [0xb7b39ea2]
2006-07-14 16:19:16 [7744] [0] PANIC: /usr/local/sbin/sqlbox [0x804f911]
-------------------------------------------------------------------------

Verifying with netstat, postgresql is listening, and i can log into db and create any table i want.
here's my conf :

--SQLBOX----------------------------------------------------------------------
group = sqlbox
# id corresponds to id in group = mysql-connection.
# this is analogous to id in group = dlr-db
id = dlr-01-db
# smsbox-id indicates the box where SQL-injected messages appear to be coming from
smsbox-id = smsbox-01
# bearerbox host to connect to
bearerbox-host = "127.0.0.1"
# smsbox port to be listening on
smsbox-port = 13002
smsbox-port-ssl = false
# sql-log-table is the table used to log all sent messages
sql-log-table = sent_sms
# sql-insert-table is the table that is monitored for new messages to send
sql-insert-table = send_sms
# global sender: If no sender is specified in sql-insert-table then this
# value is used.
global-sender = 06121
log-file = "/var/log/smgs/sqlbox.log"
log-level = 0
# ssl-client-certkey-file = ""
# ssl-server-cert-file = ""
# ssl-server-key-file = ""
# ssl-trusted-ca-file = ""
--SQLBOX----------------------------------------------------------------------

--SMSBOX----------------------------------------------------------------------
smsbox.conf     smsc.conf       smsc-fake.conf
[EMAIL PROTECTED]:/etc/smgs# cat smsbox.conf
group = smsbox
bearerbox-host = "localhost"
log-file = "/var/log/kannel/smsbox.log"
log-level = 0
mo-recode = true
http-request-retry = 10
http-queue-delay = 60
smsbox-id = smsbox-01
sendsms-port = 13002
bearerbox-is-sqlbox=true
--SMSBOX----------------------------------------------------------------------

--BEARERBOX----------------------------------------------------------------------
group = core
admin-port = 13000
admin-password = fxxbar
status-password = sTtx
admin-deny-ip = "*.*.*.*"
admin-allow-ip = 127.0.0.1
box-deny-ip = "*.*.*.*"
box-allow-ip = 127.0.0.1
wdp-interface-name = "*"
log-file = "/var/log/kannel/bearerbox.log"
log-level = 0
access-log = "/var/log/kannel/access.log"
smsbox-port = 13001
store-file = "/var/log/kannel/store"
dlr-storage = pgsql
--BEARERBOX----------------------------------------------------------------------

--SMSC----------------------------------------------------------------------
group = smsc
smsc = fake
smsc-id = SMPP-01-FAKE
port = 10000
connect-allow-ip = 127.0.0.1
--SMSC----------------------------------------------------------------------

--PGSQLCONNEXION----------------------------------------------------------------------
group = pgsql-connection
id = dlr-01-db
host = localhost
username = test
password = test
database = test
max-connections = 6
--PGSQLCONNEXION----------------------------------------------------------------------

--DLR-DB----------------------------------------------------------------------
group = dlr-db
id = dlr-01-db
table = dlr
field-smsc = smsc
field-timestamp = date
field-destination = da
field-source = soa
field-service = service
field-url = "">field-mask = mask
field-status = status
field-boxc-id = boxcid
--DLR-DB----------------------------------------------------------------------

On 7/1/06, Mi Reflejo <[EMAIL PROTECTED]> wrote:
Maybe this snapshot isn't CVS HEAD version. Follow these steps:

# cvs -d:pserver:[EMAIL PROTECTED]:/home/cvs co gateway
# cvs -d:pserver:[EMAIL PROTECTED]:/home/cvs co sqlbox
# cd sqlbox
# make patch
# cd ../gateway
# ./configure [PARAMS]
# make
# make install

Martin
On 6/30/06, Fourat Zouari <[EMAIL PROTECTED]> wrote:
> Thanks for your help,
> I got it, but not working ...
> I downloaded the latest snapshot of kannel
> untared the kannel-snapshot, renamed the folder to gateway/
> downloaded sqlbox from cvs, moved it to the same folder where gateway/
> exists.
> Did this :
>
> --------------------------------------------------------BEGIN
> tux:~/kannel/sqlbox# make patch
> patch -p0 -d ../gateway < sqlbox.patch
> patching file Makefile.in
> patching file configure
> Hunk #1 FAILED at 10880.
> Hunk #2 FAILED at 10957.
> Hunk #3 succeeded at 6250 with fuzz 1 (offset -6630 lines).
> 2 out of 3 hunks FAILED -- saving rejects to file configure.rej
>  patching file configure.in
> Hunk #1 succeeded at 913 (offset -23 lines).
> Hunk #2 succeeded at 980 (offset -23 lines).
> patching file gw/smsbox.c
> Hunk #2 succeeded at 3365 with fuzz 2.
> patching file gwlib/cfg.def
> make: *** [patch] Erreur 1
> --------------------------------------------------------END
>
> for informations, here's a snapshot from kannel/ folder listing :
>
> --------------------------------------------------------BEGIN
>  tux:~/kannel# ll
> total 4,9M
> drwxr-xr-x 16 1013 1013 4,0K 2006-06-30 21:55 gateway
> -rw-r--r--  1 root root 2,4M 2006-06-28 15:25 gateway-1.4.0.tar.gz
> -rw-r--r--  1 root root 2,5M 2006-05-25 14:38 kannel-snapshot.tar.gz
> drwxr-xr-x  5 root root 4,0K 2006-06-30 17:41 sqlbox
> -rw-r--r--  1 root root  19K 2006-06-30 21:45 sqlbox.tgz
> --------------------------------------------------------END
>
> Thanks for your help
>
>
>
> On 6/30/06, Rene Kluwen <[EMAIL PROTECTED] > wrote:
> >
> >
> >
> > After you check out sqlbox from CVS, there is a readme.
> > It has some (rudimentary, admitted) documentation.
> >
> >
> > Rene Kluwen
> > Chimit
> >
> >
> >
> > -----Original Message-----
> > From: Fourat Zouari [mailto:[EMAIL PROTECTED]]
> > Sent: vrijdag 30 juni 2006 17:10
> > To: Mi Reflejo
> > Cc: Rene Kluwen; Nikola Goran Cutura; users@kannel.org
> > Subject: Re: SQLBOX question
> >
> > ok thanks for helping,
> > is there any document, tutorial that can help in implementing this box in
> kannel ?
> >
> >
> > On 6/30/06, Mi Reflejo < [EMAIL PROTECTED] > wrote:
> > > sqlbox is a external module. It is in kannel cvs but in different
> project.
> > >
> > > You can get it doing:
> > >
> > > # cvs -d:pserver:[EMAIL PROTECTED] :/home/cvs co
> sqlbox
> > >
> > > M.
> > >
> > > On 6/30/06, Fourat Zouari <[EMAIL PROTECTED]> wrote:
> > > > hello all,
> > > > I have kannel installed from CVS snapshot and i did not see any
> mention of
> > > > sqlbox there (in docs and in application)
> > > > How can i implement this module in ?
> > > > thanks
> > > >
> > > >
> > > > On 5/10/06, Rene Kluwen < [EMAIL PROTECTED]> wrote:
> > > > > The sent_sms and send_sms tables are NOT used by any other module
> but
> > > > sqlbox
> > > > > itself.
> > > > > If you want to send messages by sqlbox, you will have to manually
> insert
> > > > > them in the send_sms table.
> > > > >
> > > > > The sent_sms table is used (indeed) to store outgoing & incoming
> messages
> > > > as
> > > > > well as DLR's.
> > > > > This is just a "log".
> > > > >
> > > > > The smsbox_list empty! error message can possibly be fixed by an
> > > > > smsbox-route section in your kannel.conf.
> > > > >
> > > > > Rene Kluwen
> > > > > Chimit
> > > > >
> > > > >
> > > > > -----Original Message-----
> > > > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> > > > > Behalf Of Nikola Goran Cutura
> > > > > Sent: woensdag 10 mei 2006 0:46
> > > > > To: Mi Reflejo
> > > > > Cc: users@kannel.org
> > > > > Subject: Re: SQLBOX question
> > > > >
> > > > >
> > > > > Thanks for the prompt answer!
> > > > >
> > > > > I read the sqlbox FAQ but my understanding was that sqlbox sits in
> the
> > > > > middle so that bearerbox and smsbox don't see each other. What
> confuses me
> > > > > is sqlbox insert table. It is supposed to contain messages (MO/MT)
> not yet
> > > > > processed by their destination handlers (bearerbox for MT, smsbox
> for MO).
> > > > > So I realized that having beaerbox running with sqlbox connected to
> it
> > > > would
> > > > > accumulate MO messages until smsbox is started.
> > > > >
> > > > > Is sqlbox insert table used only for manual inserts? E.g. if I want
> to
> > > > > bypass http sendsms and insert sms directly into insert table? Does
> smsbox
> > > > > use insert table? Does bearerbox?
> > > > >
> > > > > Regards,
> > > > > NGC
> > > > >
> > > > > ----- Original Message -----
> > > > > From: "Mi Reflejo" < [EMAIL PROTECTED]>
> > > > > To: "Nikola Goran Cutura" < [EMAIL PROTECTED]>
> > > > > Sent: Wednesday, May 10, 2006 12:26 AM
> > > > > Subject: Re: SQLBOX question
> > > > >
> > > > >
> > > > > yes, there is an understanding problem.
> > > > >
> > > > > from sqlbox FAQ:
> > > > >
> > > > > Q.
> > > > > Does sqlbox replace sms box or is It an additional module that must
> be
> > > > run?
> > > > >
> > > > > A.
> > > > > sqlbox is an additional module. You now have to start kannel in the
> > > > > following manner:
> > > > >
> > > > > 1st: bearerbox <conf-file>
> > > > > 2nd: sqlbox <conf-file>
> > > > > 3rd: smsbox <conf-file> and wapbox <conf-file>
> > > > >
> > > > > A picture of the new situation (with sqlbox included is as follows):
> > > > >
> > > > > http request <--> [ smsbox ] <--> [ sqlbox ] <--> [ bearerbox ] <-->
> sms
> > > > > gateway
> > > > >
> > > > > I hope this picture make things clear. In text: sqlbox is sitting in
> > > > > between smsbox and bearerbox, passing all messages back and forth
> > > > > between the two. As a side-effect, also the messages that are passed
> > > > > back and forth are logged in the sent_sms table.
> > > > >
> > > > > SMS routing can't be done without SMSBOX.
> > > > >
> > > > > Regards,
> > > > > Anselmo
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> >
> >
> >
>
>

Reply via email to