Hi
Good to know you are on the right way.

1) It is the host/port of the webserver that hosts your script
2) You set have any path you want. However it MUST be accesible by
your webserver
3) You don't need to specify the values; just the variables, Kannel,
when calling your url, will replace the variables with the actual
values got from the incomming message. Check userguide for a complete
list of variables available. I'll suggest you to add a timestamp to
your DB either with time available by kannel or directly added by your
DB.

Regards

Alvaro

|-----------------------------------------------------------------------------------------------------------------|
Envíe y Reciba Datos y mensajes de Texto (SMS) hacia y desde cualquier
celular y Nextel
en el Perú, México y en mas de 180 paises. Use aplicaciones 2 vias via
SMS y GPRS online
              Visitenos en www.perusms.NET www.smsglobal.com.mx y
www.pravcom.com



On Wed, Sep 29, 2010 at 6:05 AM,  <[email protected]> wrote:
> Hey long at last am able to have a connection to the mysql database but my
> goal is to have the message and the phone number of the sender be stored in
> the database tables.Of course i have a database named dlr already as you can
> see from my configuration file below where i intend to also create another
> table that will be dedicated to the received messages.And of course kannel
> automatically calls the script wherever it is.With respect to the user guide
> it is clearly stated that if i want to achieve my goal then i must define
> the get-url directive and at that stage am kind of stack and would want
> clarification to my following questions:
>
>    1. Since the get-url indicates localhost and port what localhost and port
> do i have to put?Is it for the kannel gateway or webserver?
>    2. then there is a path does it mean suppose i put my php scripts in my
> home directory where i create a directory called project and name the script
> receive.php should i specify the absolute path.
>    3. Since the table for receiving messages will have two fields phone
> number and message how can i specify that on the get-url directive?
>
> In short am seeking the values that i shoud replace in the get-url below:
> (get-url =
> http://my.applet.machine/Servlet/weather?sender=%p&operator=SOL&text=%r)
>
>
> KANNEL CONFIGURATION FILE
>
> group = core
> admin-port = 13000
> smsbox-port = 13001
> admin-password = camcom
> status-password = camcom
> #admin-deny-ip = ""
> #admin-allow-ip = ""
> #log-file = "/tmp/kannel.log"
> #log-level = 0
> box-deny-ip = "*.*.*.*"
> box-allow-ip = "127.0.0.1"
> #unified-prefix = "+358,00358,0;+,00"
> #access-log = "/tmp/access.log"
> #store-file = "kannel.store"
> #ssl-server-cert-file = "cert.pem"
> #ssl-server-key-file = "key.pem"
> #ssl-certkey-file = "mycertandprivkeyfile.pem"
> dlr-storage = mysql
> #group = smsc
> #smsc = fake
> #smsc-id = FAKE
> #port = 20000
> #connect-allow-ip = 127.0.0.1
> group = smsc
> smsc = at
> modemtype = auto
> device = /dev/ttyUSB0
> my-number = 0888959802
> log-level = 0
> sim-buffering = true
> group = smsbox
> bearerbox-host = localhost
> sendsms-port = 13013
> sendsms-chars = "0123456789"
> global-sender = "0888959802"
> access-log = "/home/camcom/kannel.access"
> log-file = "/home/camcom/smsbox.log"
> log-level = 0
> #sendsms-chars = "0123456789 +-"
> #log-file = "/tmp/smsbox.log"
> #access-log = "/tmp/access.log"
>
> group = sendsms-user
> username = camcom
> password = camcom
> max-messages = 1
> concatenation = true
> group = sms-service
> keyword = nop
> text = "You asked nothing and I did it!"
> # There should be always a 'default' service. This service is used when no
> # other 'sms-service' is applied.
> #group = sms-service
> #keyword = default
> #text = "No service specified"
> group = mysql-connection
> id = mydlr
> host = localhost
> username = root
> password = camcom
> database = dlr
> # max count of connections that will be opened for dbpool
> # default is 1
> max-connections = 1
> group = dlr-db
> id = mydlr
> table = dlr
> field-smsc = smsc
> field-timestamp = ts
> field-destination = destination
> field-source = source
> field-service = service
> field-url = url
> field-mask = mask
> field-status = status
> field-boxc-id = boxc
> group = modems
> id = huawei_e160
> name = "huawei_e160"
> detect-string = "huawei"
> init-string = "ATZ"
> init-string = "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
> init-string = "AT+CNMI=1,2,0,1,0 "
> message-storage = sm
> speed = 9600
>
> SQLBOX CONFIGURATION
> group = sqlbox
> id = sqlbox-db
> smsbox-id = sqlbox
> #global-sender = ""
> bearerbox-host = localhost
> bearerbox-port = 13001
> smsbox-port = 13005
> smsbox-port-ssl = false
> sql-log-table = sent_sms
> sql-insert-table = send_sms
> #log-file = "/var/log/kannel/kannel-sqlbox.log"
> log-level = 0
> #ssl-client-certkey-file = ""
> #ssl-server-cert-file = ""
> #ssl-server-key-file = ""
> #ssl-trusted-ca-file = ""
> # Database connection examples. Please uncomment as needed
> group = mysql-connection
> id = sqlbox-db
> host = localhost
> username = root
> password = camcom
> database = dlr
> max-connections = 1
>
> BEARERBOX LOG FILE
>
> r...@localhost kannel]# 2010-09-28 23:30:03 [3382] [0] INFO: Debug_lvl = 1,
> log_file = <none>, log_lvl = 0
> 2010-09-28 23:30:03 [3382] [0] INFO: MYSQL: Connected to server at
> localhost.
> 2010-09-28 23:30:03 [3382] [0] INFO: MYSQL: server version 5.1.45-log,
> client version 5.1.45.
> 2010-09-28 23:30:03 [3382] [0] INFO: DLR using storage type: mysql
> 2010-09-28 23:30:03 [3382] [0] INFO: HTTP: Opening server at port 13000.
> 2010-09-28 23:30:03 [3382] [0] INFO: BOXC: 'smsbox-max-pending' not set,
> using default (100).
> 2010-09-28 23:30:03 [3382] [0] INFO: Set SMS resend frequency to 60 seconds.
> 2010-09-28 23:30:03 [3382] [0] INFO: SMS resend retry set to unlimited.
> 2010-09-28 23:30:03 [3382] [0] INFO: DLR rerouting for smsc id <(null)>
> disabled.
> 2010-09-28 23:30:03 [3382] [0] INFO: AT2[/dev/ttyUSB0]: configuration
> doesn't show modemtype. will autodetect
> 2010-09-28 23:30:03 [3382] [6] INFO: AT2[/dev/ttyUSB0]: opening device
> 2010-09-28 23:30:03 [3382] [0] INFO:
> ----------------------------------------
> 2010-09-28 23:30:03 [3382] [0] INFO: Kannel bearerbox II version svn-r4838
> starting
> 2010-09-28 23:30:03 [3382] [0] INFO: MAIN: Start-up done, entering mainloop
> 2010-09-28 23:30:04 [3382] [6] INFO: AT2[/dev/ttyUSB0]: speed set to 115200
> 2010-09-28 23:30:06 [3382] [6] INFO: AT2[/dev/ttyUSB0]: Closing device
> 2010-09-28 23:30:06 [3382] [6] INFO: AT2[/dev/ttyUSB0]: detect speed is
> 115200
> 2010-09-28 23:30:06 [3382] [6] INFO: AT2[/dev/ttyUSB0]: opening device
> 2010-09-28 23:30:07 [3382] [6] INFO: AT2[/dev/ttyUSB0]: speed set to 115200
> 2010-09-28 23:30:10 [3382] [6] INFO: AT2[/dev/ttyUSB0]: Closing device
> 2010-09-28 23:30:10 [3382] [6] INFO: AT2[/dev/ttyUSB0]: opening device
> 2010-09-28 23:30:10 [3382] [6] INFO: AT2[/dev/ttyUSB0]: Logging in
> 2010-09-28 23:30:11 [3382] [6] INFO: AT2[/dev/ttyUSB0]: init device
> 2010-09-28 23:30:11 [3382] [6] INFO: AT2[/dev/ttyUSB0]: speed set to 115200
> 2010-09-28 23:30:12 [3382] [6] INFO: AT2[/dev/ttyUSB0]: AT SMSC successfully
> opened.
>
> SQLBOX LOG
> 2010-09-28 23:32:16 [3440] [0] INFO: MYSQL: Connected to server at
> localhost.
> 2010-09-28 23:32:16 [3440] [0] INFO: MYSQL: server version 5.1.45-log,
> client version 5.1.45.
> 2010-09-28 23:32:16 [3440] [1] INFO: Connected to bearerbox at localhost
> port 13001.
> 2010-09-28 23:32:16 [3412] [5] INFO: Client connected from <127.0.0.1>
>
> SMSBOX LOG
> [r...@localhost kannel]# 2010-09-28 23:30:27 [3401] [0] INFO: Debug_lvl = 1,
> log_file = <none>, log_lvl = 0
> 2010-09-28 23:30:27 [3401] [0] INFO: Starting to log to file
> /home/camcom/smsbox.log level 0
> 2010-09-28 23:30:27 [3401] [0] INFO: Added logfile `/home/camcom/smsbox.log'
> with level `0'.
> 2010-09-28 23:30:27 [3401] [0] INFO: Service global sender set as
> '0888959802'
> 2010-09-28 23:30:27 [3401] [0] INFO: Logging accesses to
> '/home/camcom/kannel.access'.
> 2010-09-28 23:30:27 [3401] [0] INFO: Started access logfile
> `/home/camcom/kannel.access'.
> 2010-09-28 23:30:27 [3401] [0] INFO: HTTP: Opening server at port 13013.
> 2010-09-28 23:30:27 [3401] [0] INFO: Set up send sms service at port 13013
> 2010-09-28 23:30:27 [3401] [0] INFO: Connected to bearerbox at localhost
> port 13001.
> 2010-09-28 23:30:27 [3382] [5] INFO: Client connected from <127.0.0.1>
> 2010-09-28 23:30:44 [3382] [0] WARNING: Killing signal or HTTP admin command
> received, shutting down...
> 2010-09-28 23:30:45 [3382] [6] INFO: AT2[/dev/ttyUSB0]: Closing device
> 2010-09-28 23:30:45 [3401] [0] INFO: Bearerbox told us to die
> 2010-09-28 23:30:45 [3401] [0] INFO: Received (and handled?) 0 requests in
> 18 seconds (0.00 per second)
> 2010-09-28 23:30:45 [3401] [0] INFO: Kannel smsbox terminating.
> 2010-09-28 23:30:45 [3382] [8] INFO: Connection closed by the box
> <127.0.0.1>
> 2010-09-28 23:30:46 [3382] [0] INFO: All flow threads have died, killing
> core
> 2010-09-28 23:30:46 [3382] [0] INFO: Total WDP messages: received 0, sent 0
> 2010-09-28 23:30:46 [3382] [0] INFO: Total SMS messages: received 0, dlr 0,
> sent 0, dlr 0
>
>
>

Reply via email to