Here is my configuration file. I'm using two GSM as SMSC "AT", so it was the
explanation why it tooks 2 sec ?! The backslash preprended the quote is in
bearer box but not in the smsbox, it is very curious.

group = core
admin-port = 13000
smsbox-port = 13001
admin-password = bar
#status-password = foo
admin-deny-ip = "*.*.*.*"
admin-allow-ip = "127.0.0.1;192.168.1.*;xxx.xxx.Xxx.61;"
log-file = "/tmp/kannel.log"
log-level = 0
box-deny-ip = "*.*.*.*"
box-allow-ip = "127.0.0.1;192.168.1.*"
unified-prefix = "+33,0033,0;+,00"
access-log = "/tmp/access.log"
store-file = "/tmp/kannel.store"
#ssl-server-cert-file = "cert.pem"
#ssl-server-key-file = "key.pem"
#ssl-certkey-file = "mycertandprivkeyfile.pem"
dlr-storage = mysql
#dlr-storage = internal


# SMSC CONNECTIONS

#group = smsc
#smsc = fake
#smsc-id = FAKE
#port = 10000
#connect-allow-ip = 127.0.0.1

include = "/etc/kannel/modems.conf"

# SMSC GSM



group = smsc
smsc = at
smsc-id = Nokia
modemtype = nokia12
device = /dev/ttyS1
pin = 0000
validityperiod = 167
keepalive = 60
my-number = 00336xxxxxx
#throughput = 0.01
sim-buffering = true

group = smsc
smsc = at
smsc-id = Wave2
modemtype = wave2
device = /dev/ttyS0
pin = 0000
validityperiod = 167
keepalive = 60
my-number = 00336yyyyyyy
sim-buffering = true


# SMSBOX SETUP

group = smsbox
bearerbox-host = localhost
sendsms-port = 13013
global-sender = 13013
#sendsms-chars = "0123456789 +-"
log-file = "/tmp/smsbox.log"
log-level = 0
#access-log = "/tmp/access.log"
# a ajouter qd SQLBOX est ON
bearerbox-is-sqlbox = true
reply-couldnotfetch=""

# SEND-SMS USERS

group = sendsms-user
username = tester
password = foobar
#user-deny-ip = ""
#user-allow-ip = ""
max-messages = 3
concatenation = true
forced-smsc = Nokia
default-smsc = Nokia
allowed-prefix = "00336;06"
header = "Cpte tester   "
footer = "  Fin SMS"


group = sendsms-user
username = playsms
password = xxxxxxxx
#user-deny-ip = ""
#user-allow-ip = ""
max-messages = 5
concatenation = true
forced-smsc = Nokia
default-smsc = Nokia
allowed-prefix = "00336;06"


group = sendsms-user
username = xxxx
password = yyyyyy
#user-deny-ip = ""
#user-allow-ip = ""
max-messages = 3
concatenation = true
forced-smsc = Nokia
default-smsc = Nokia
allowed-prefix = "00336;06"
header = "Msg xxxx:   "


group = sendsms-user
username = toto
password = xxxxxx
user-deny-ip = "*.*.*.*"
user-allow-ip = "127.0.0.1;192.168.1.*"
max-messages = 5
concatenation = true
forced-smsc = Nokia
default-smsc = Nokia
allowed-prefix = "00336;06"


# SERVICES

group = sms-service
keyword = nop
text = "You asked nothing and I did it!"



group = sms-service
keyword = tutu
text = "Service tutu en maintenance."

# there should be default always

group = sms-service
keyword = default
text = "No service specified"
catch-all = true
send-sender = true
omit-empty = true
get-url =
"http://127.0.0.1/~playsms/plugin/gateway/kannel/geturl.php?t=%t&p=%p&a=%a";



#SQL configuration
group = mysql-connection
id = mydlr
host = localhost
mysql-username = yyyyyy
mysql-password = xxxx
database = dlr


group = dlr-db
id = mydlr
table = dlr
field-smsc = smsc
field-timestamp = ts
field-destination = destination
field-service = service
field-source = source
field-url = url
field-mask = mask
field-status = status
field-boxc-id = boxc



# SQLBOX SETUP

group = sqlbox
# id corresponds to id in group = mysql-connection.
# this is analogous to id in group = dlr-db
id = mydlr
# smsbox-id indicates the box where SQL-injected messages appear to be coming
from
smsbox-id = sqlbox2
# bearerbox host to connect to
bearerbox-host = "127.0.0.1"
# smsbox port to be listening on
smsbox-port = 13005
smsbox-port-ssl = false
# sql-log-table is the table used to log all sentmessages
sql-log-table = sent_sms
# sql-insert-table is the table that is monitored fornew messages to send
sql-insert-table = send_sms
# global sender: If no sender is specified insql-insert-table then this
# value is used.
global-sender = 06xxxxxxx
 log-file = "/tmp/sqlbox.log"
 log-level = 0
# ssl-client-certkey-file = ""
# ssl-server-cert-file = ""
# ssl-server-key-file = ""
# ssl-trusted-ca-file = ""


Quoting Davy Chan <[EMAIL PROTECTED]>:

> Please provide your configuration files.  Are you sure you don't have
> any HTTP SMSC defined in your configuration files?  I'm really
> curious why it took 2 seconds for the smsbox to submit the SMS
> to the bearbox's receiver queue.
>
> The alt-dcs is not for changing the character set.  It's used to
> indicate how to set/unset bits 7 through 3 of Data Coding Scheme
> (used to distinguish between MWI or just data coding/mclass).
>
> According to your logs, the SMS Msg structure that is extracted
> out of the bearerbox receive queue already has the single quote
> with an backslash prepended.
>
> It's getting late for me...please post your config files.
>
> See ya...
>
> d.c.
>
> **>Date: Sat,  5 Mar 2005 18:07:33 +0100
> **>From: [EMAIL PROTECTED]
> **>To: Davy Chan <[EMAIL PROTECTED]>
> **>Cc: Guillaume Cottenceau <[EMAIL PROTECTED]>, [email protected]
> **>Subject: Re: Please help : Pbs with quote and backslash
> **>In-Reply-To: <[EMAIL PROTECTED]>
> **>User-Agent: Internet Messaging Program (IMP) 3.2.5
> **>
> **>Thanks for your answer, I will give you more informations :
> **>
> **>First, I 'm using Playsms but I have make some additionnals tests that not
> put
> **>Playsms in the problem resolution.
> **>
> **>I made additionnal test with the following URL (only Kannel cgi-sendsms so
> no
> **>Playsms at all) :
>
**>http://127.0.0.1:13013/cgi-bin/sendsms?username=xxxx&password=xxxx&to=06xxxxxx&text=salut+%22+et+%27+et+%5C
> **>
> **>The return code is "sent" and the sms arrives on the phone but still with
> the
> **>same issue (\ in front of ' and \).
> **>
> **>For my point of view, there is something between bearbox and smsbox that
> add
> **>additionnal backslash but I still do not know where. The logs below shows
> that
> **>the backslash is not in smsbox but is in bearbox.
> **>
> **>I do not use alt-dcs variable neither coding in http request, so it must
> be
> **>default value.
> **>
> **>I modified the Kannel source in order to add additionnal DEBUG trace, here
> is
> **>what I retrieve :
> **>
> **>>From the smsbox.log :
> **>2005-03-05 15:57:46 [27066] [2] DEBUG: HTTP: Creating HTTPClient for
> **>`127.0.0.1'.
> **>2005-03-05 15:57:46 [27067] [3] INFO: smsbox: Got HTTP request
> **></cgi-bin/sendsms> from <127.0.0.1>
> **>2005-03-05 15:57:46 [27067] [3] INFO: sendsms used by <xxxx>
> **>2005-03-05 15:57:46 [27067] [3] INFO: sendsms sender:<xxxx:13013>
> (127.0.0.1)
> **>to:<06xxxxxx> msg:<salut " et ' et \>
> **>2005-03-05 15:57:46 [27067] [3] INFO: sendsms sender:<xxxxt:13013>
> (127.0.0.1)
> **>to:<0xxxxxxx>  msg:<salut " et ' et \>
> **>2005-03-05 15:57:46 [27067] [3] INFO: sendsms sender:after
> charset-processing
> **>msg:<salut " et ' et \>
> **>2005-03-05 15:57:46 [27067] [3] DEBUG: AT2[]: sms_split
> **>2005-03-05 15:57:46 [27067] [3] DEBUG: AT2[salut " et ' et \]: latin12gsm
> **>2005-03-05 15:57:46 [27067] [3] DEBUG: AT2[salut " et ' et /]: apres
> latin12gsm
> **>2005-03-05 15:57:46 [27067] [3] DEBUG: AT2[salut " et ' et \]: sms_split
> **>2005-03-05 15:57:46 [27067] [3] DEBUG: AT2[(null)]: split char CYRIL
> **>2005-03-05 15:57:46 [27067] [3] DEBUG: AT2[salut " et ' et \]: latin12gsm
> **>2005-03-05 15:57:46 [27067] [3] DEBUG: AT2[salut " et ' et /]: apres
> latin12gsm
> **>CYRIL
> **>2005-03-05 15:57:46 [27067] [3] DEBUG: AT2[salut " et ' et \]: sms_split
> apres
> **>footer et header CYRIL
> **>2005-03-05 15:57:46 [27067] [3] DEBUG: message length 17, sending 1
> messages
> **>2005-03-05 15:57:46 [27067] [3] DEBUG: smsbox : msg [salut " et ' et \]
> **>2005-03-05 15:57:46 [27067] [3] DEBUG: smsbox : new_msg [salut " et ' et
> \]
> **>2005-03-05 15:57:46 [27067] [3] DEBUG: Status: 202 Answer: <Sent.>
> **>2005-03-05 15:57:46 [27067] [3] DEBUG: HTTP: Resetting HTTPClient for
> **>`127.0.0.1'.
> **>
> **>
> **>
> **>
> **>
> **>>From the Kannel.log (some function name appears in the log, latin12gsm in
> **>charset.c for example):
> **>
> **>
> **>2005-03-05 15:57:48 [27073] [12] DEBUG: boxc_receiver: sms received
> **>2005-03-05 15:57:48 [27073] [12] DEBUG: AT2[]: sms_split
> **>2005-03-05 15:57:48 [27073] [12] DEBUG: AT2[salut " et \' et \\]:
> latin12gsm
> **>2005-03-05 15:57:48 [27073] [12] DEBUG: AT2[salut " et /' et //]: apres
> **>latin12gsm
> **>2005-03-05 15:57:48 [27073] [12] DEBUG: AT2[salut " et \' et \\]:
> sms_split
> **>2005-03-05 15:57:48 [27073] [12] DEBUG: AT2[(null)]: split char
> **>2005-03-05 15:57:48 [27073] [12] DEBUG: AT2[salut " et \' et \\]:
> latin12gsm
> **>2005-03-05 15:57:48 [27073] [12] DEBUG: AT2[salut " et /' et //]: apres
> **>latin12gsm CYRIL
> **>2005-03-05 15:57:48 [27073] [12] DEBUG: AT2[salut " et \' et \\]:
> sms_split
> **>apres footer et header
> **>2005-03-05 15:57:48 [27073] [12] DEBUG: send_msg: sending msg to box:
> **><127.0.0.1>
> **>2005-03-05 15:57:50 [27054] [8] DEBUG: AT2[salut " et \' et \\]:
> **>at2_send_one_message CYRIL
> **>2005-03-05 15:57:50 [27054] [8] DEBUG: AT2[salut " et \' et \\]:
> at2_pdu_encode
> **>CYRIL2005-03-05 15:57:50 [27054] [8] DEBUG: AT2[Wave2]:
> TP-Validity-Period:
> **>24.0 hours
> **>2005-03-05 15:57:50 [27054] [8] DEBUG: AT2[salut " et \' et \\]:
> latin12gsm
> **>CYRIL
> **>2005-03-05 15:57:50 [27054] [8] DEBUG: AT2[salut " et /' et //]: apres
> **>latin12gsm
> **>2005-03-05 15:57:50 [27054] [8] DEBUG: AT2[salut " et \' et \\]: sms_at
> **>2005-03-05 15:57:50 [27054] [8] DEBUG: AT2[salut " et \' et \\]:
> latin12gsm
> **>2005-03-05 15:57:50 [27054] [8] DEBUG: AT2[salut " et /' et //]: apres
> **>latin12gsm
> **>2005-03-05 15:57:50 [27054] [8] DEBUG: AT2[Wave2]: --> AT+CMGS=34^M
> **>2005-03-05 15:57:50 [27054] [8] DEBUG: AT2[Wave2]: <-- >
> **>2005-03-05 15:57:50 [27054] [8] DEBUG: AT2[Wave2]: send command status: 1
> **>2005-03-05 15:57:50 [27054] [8] DEBUG: AT2[Wave2]: -->
> **>0011000B913316770342F70000A716F330BB4E078940653A68F33A81CA74D0E6B57901
> **>2005-03-05 15:57:50 [27054] [8] DEBUG: AT2[Wave2]: --> ^Z
> **>2005-03-05 15:57:53 [27054] [8] DEBUG: AT2[Wave2]: <-- >
> **>2005-03-05 15:57:53 [27054] [8] DEBUG: AT2[Wave2]: <-- +CMGS: 54
> **>2005-03-05 15:57:53 [27054] [8] DEBUG: AT2[Wave2]: <-- OK
> **>2005-03-05 15:57:53 [27054] [8] DEBUG: AT2[Wave2]: send command status: 0
> **>2005-03-05 15:57:53 [27047] [1] DEBUG: Dumping 0 messages and 0 acks to
> store
> **>
> **>
> **>
> **>Quoting Davy Chan <[EMAIL PROTECTED]>:
> **>
> **>>
> **>> We are not ignoring your posting.  We are having a hard time trying
> **>> to read your mind since you are providing us with very little
> information
> **>> to try and deduce your current setup.
> **>>
> **>> From the looks of the log, I would say you are not using Kannel
> **>> directly but playsms.  Playsms uses Kannel as an SMS gateway.
> **>>
> **>> Playsms (from my brief glance of it) is a set of PHP scripts that
> **>> handle the communication between you and the SMS gateway.
> **>>
> **>> The "sendsms sender ..." line comes from the smsbox.  The
> **>> "Parsing URL ..." line occurs either from a get-url/post-url inside
> **>> a sms-service or a send-url inside the HTTP SMSC declaration.
> **>> Since it is coming after the sendsms, I would deduce that your
> **>> have setup an HTTP SMSC configuration. When you submit an
> **>> sendsms to Kannel, the HTTP SMSC handles the MT SMS and
> **>> sends it to the Playsms proxy for handling.
> **>>
> **>> Now, guessing at this possible configuration (since you did not
> **>> provide it for us), I would assume that the Playsms proxy PHP
> **>> script is the program that is escaping the single (') and double (")
> **>> quotes a backslash (\). I believe that the Playsms PHP scripts
> **>> are the culprit and not Kannel.
> **>>
> **>> I can tell you that the Kannel source code obtained from www.kannel.org
> **>> for the bearerbox and smsbox do not add backslashes to the code.
> **>> The bearerbox will convert latin1 to GSM7
> **>> (gateway/gwlib/charset.c:charset_latin1_to_gsm()).  But, the single
> **>> and double quotes are the same in both character sets.
> **>>
> **>> If my assumptions are wrong then please post your configurations
> **>> so we can better help you with your problem.
> **>>
> **>> See ya...
> **>>
> **>> d.c.
> **>>
> **>> **>Date: Fri,  4 Mar 2005 17:28:21 +0100
> **>> **>From: [EMAIL PROTECTED]
> **>> **>To: Guillaume Cottenceau <[EMAIL PROTECTED]>
> **>> **>Subject: Re: Please help : Pbs with quote and backslash
> **>> **>In-Reply-To: <[EMAIL PROTECTED]>
> **>> **>
> **>> **>I'm using this version :
> **>> **>2005-03-04 11:51:25 [8231] [0] INFO: Kannel bearerbox II version
> 1.4.0
> **>> starting
> **>> **>
> **>> **>And yes, I don't understand where is the bug, here is my log :
> **>> **>
> **>> **>smsbox.log
> **>> **>2005-03-04 14:06:24 [8254] [3] INFO: sendsms sender:<titext:Cyrille>
> **>> **>(213.41.137.61) to:<0033617730247> msg:<salut " et ' et \>
> **>> **>2005-03-04 14:06:29 [8264] [9] DEBUG: Parsing URL
> **>>
>
**>**>`http://127.0.0.1/~playsms/proxy.php?dlr-type=8&myid=2384&username=xxxx&password=xxxx&dlr-mask=31&from=Cyrille&to=00336xxxxx&text=salut+%22+et+%27+et+%5C':
> **>> **>2005-03-04 14:06:29 [8264] [9] DEBUG:   Query:
> **>>
>
**>**>dlr-type=8&myid=2384&username=xxxx&password=xxxx&dlr-mask=31&from=Cyrille&to=0033xxxxxx&text=salut+%22+et+%27+et+%5C
> **>> **>2005-03-04 14:07:39 [8264] [9] DEBUG: Parsing URL
> **>>
>
**>**>`http://127.0.0.1/~playsms/proxy.php?dlr-type=1&myid=2384&username=xxxx&password=xxxx&dlr-mask=31&from=Cyrille&to=0033xxxxx&text=salut+%22+et+%27+et+%5C':
> **>> **>
> **>> **>2005-03-04 14:06:24 [8254] [3] INFO: sendsms sender:<xxxx:Cyrille>
> **>> **>(xxx.xxx.137.61) to:<00336xxx> msg:<salut " et ' et \>
> **>> **>
> **>> **>And kannel-Access.log :
> **>> **>2005-03-04 14:06:29 Sent SMS [SMSC:Nokia] [SVC:toto] [ACT:] [BINF:]
> **>> **>[from:0033xxxxxx] [to:+336xxxxx] [flags:-1:0:-1:-1:31] [msg:22:salut
> " et
> **>> /'
> **>> **>et //] [udh:0:]
> **>> **>
> **>> **>What it surprised me (see the additionnal char), that appears in log
> only
> **>> in the
> **>> **>access log, not before. Do you have idea ?
> **>> **>
> **>> **>Thanks
> **>> **>
> **>> **>
> **>> **>
> **>> **>Quoting Guillaume Cottenceau <[EMAIL PROTECTED]>:
> **>> **>
> **>> **>> info.ubichip 'at' free.fr writes:
> **>> **>>
> **>> **>> > Here is an example of the text I send :
> **>> **>> >
> **>> **>> > salut " et ' et \
> **>> **>> >
> **>> **>> > so urlencode(text)=salut+%22+et+%27+et+%5C
> **>> **>> >
> **>> **>> > and what I receive :
> **>> **>> >
> **>> **>> > salut " et \' et \\
> **>> **>>
> **>> **>> Strange, I receive it correctly (except \ which is removed by my
> **>> **>> application). Are you using an old version? I'm using CVS of a
> **>> **>> little while ago.
> **>> **>>
> **>> **>> smsbox.log:2005-03-04 15:34:17 [32042] [3] INFO: sendsms
> sender:<xxx>
> **>> **>> (127.0.0.1) to:<+41yyy> msg:<salut " et ' et   bye>
> **>> **>> smsbox-access.log:2005-03-04 15:34:17 send-SMS request added -
> **>> sender:xxx
> **>> **>> 127.0.0.1 target:+41yyy request: 'salut " et ' et   bye'
> **>> **>> kannel-access.log:2005-03-04 15:34:18 Sent SMS [SMSC:xxx] [SVC:xxx]
> **>> [ACT:]
> **>> **>> [BINF:] [from:xxx] [to:+41yyy] [flags:-1:0:-1:-1:2] [msg:21:salut "
> et '
> **>> et
> **>> **>> bye] [udh:0:]
> **>> **>>
> **>>
> **>
> **>
>



Reply via email to