You need to urlencode the text first...

On Mon, Apr 26, 2010 at 7:37 PM, gianluca moretti <
[email protected]> wrote:

>
>
> Hi All, We are tring to send an SMS using Kannel throug http with the
> following characters in the text message:
>
>
>
>                         …  %  ….
>
>
>
>
> http://IP:13013/cgi-bin/sendsms?username=tester&password=foobar&%c=1&from=SENDER&to=12345678910&text=
> *01/05/2010*<http://IP:13013/cgi-bin/sendsms?username=tester&password=foobar&%c=1&from=SENDER&to=12345678910&text=01/05/2010>
> * your credit is 10 % of the total credit*&validity=1440&
>
>
>
>
>
> In the message received by the mobile phone there is a “+” char that
> follows the % (…. %+ ….)
>
>
>
> I don’t understand why Kannel adds this character when it receives the HTTP
> request.
>
>
>
> Thank you in advance
>
>
>
> Follows the kannel.conf used:
>
>
>
> *#*
>
> *# THIS IS A SAMPLE CONFIGURATION FOR SMS KANNEL*
>
> *#*
>
> *# This basic version is used for system testing. It expects 'fakesmsc' to
> *
>
> *# send messages which are replied with simple fixed text message.*
>
> *# It is run like this:*
>
> *#*
>
> *#  1% gw/bearerbox gw/smskannel.conf*
>
> *#  2% gw/smsbox gw/smskannel.conf*
>
> *#  3% test/fakesmsc -i 0.1 -m 100 "123 345 text nop"*
>
> *#*
>
> *# ..all 3 commands in separate shells (or screen sessions)*
>
> *# Note that you can run them in different machines but have to*
>
> *# add certain command line argument and configuration variables then*
>
> *#*
>
> *#*
>
> *# For any modifications to this file, see Kannel User Guide*
>
> *# If that does not help, see Kannel web page (http://www.kannel.org) and*
>
> *# various online help and mailing list archives*
>
> *#*
>
> *# Notes on those who base their configuration on this:*
>
> *#  1) check security issues! (allowed IPs, passwords and ports)*
>
> *#  2) groups cannot have empty rows inside them!*
>
> *#  3) read the user guide*
>
> *#*
>
> *# Kalle Marjola for Kannel project 2001, 2004*
>
> * *
>
> *#---------------------------------------------*
>
> *# CORE*
>
> *#*
>
> *# There is only one core group and it sets all basic settings*
>
> *# of the bearerbox (and system). You should take extra notes on*
>
> *# configuration variables like 'store-file' (or 'store-dir'),*
>
> *# 'admin-allow-ip' and 'access.log'*
>
> * *
>
> * *
>
> *group = core*
>
> *admin-port = 13000*
>
> *smsbox-port = 13001*
>
> *admin-password = bar*
>
> *status-password = foo*
>
> *#admin-deny-ip = ""*
>
> *#admin-allow-ip = ""*
>
> *log-file = /smsadp/kannel/KannelRestartabilityAgent/log/kannel.log*
>
> *log-level = 0*
>
> *#box-deny-ip = "*.*.*.*"*
>
> *box-allow-ip = "*.*.*.*"*
>
> *#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"*
>
> *store-type = file*
>
> *store-location = /smsadp/kannel/kannel_queue.dat*
>
> *#store-type = file*
>
> *#store-location = /product/kannelspool/kannel.dat*
>
> *dlr-storage = oracle*
>
> *dlr-retry-count = 10*
>
> *dlr-retry-delay = 200*
>
> * *
>
> *#---------------------------------------------*
>
> *# SMSC CONNECTIONS*
>
> *#*
>
> *# SMSC connections are created in bearerbox and they handle SMSC specific
> *
>
> *# protocol and message relying. You need these to actually receive and
> send*
>
> *# messages to handset, but can use GSM modems as virtual SMSCs*
>
> * *
>
> * *
>
> *# This is a fake smsc connection, _only_ used to test the system and
> services.*
>
> *# It really cannot relay messages to actual handsets!*
>
> * *
>
> *group = smsc*
>
> *smsc = smpp*
>
> *smsc-id = SMPPSim*
>
> *host = 172.31.70.117*
>
> *port = 3777*
>
> *receive-port = 3777*
>
> *smsc-username = smppclient*
>
> *smsc-password = password*
>
> *system-type = "VMA"*
>
> *reconnect-delay = 1*
>
> *interface-version=34*
>
> *address-range = ""*
>
> *#msg-id-type=0*
>
> *#allowed-prefix-regex=^0[34]*
>
> *#denied-prefix-regex=^0[1256789]*
>
> * *
>
> *##*
>
> *# Smsbox(es) do higher-level SMS handling after they have been received
> from*
>
> *# SMS centers by bearerbox, or before they are given to bearerbox for
> delivery*
>
> * *
>
> *group = smsbox*
>
> *smsbox-id=smsbox_1*
>
> *bearerbox-host = localhost*
>
> *bearerbox-port=13001*
>
> *sendsms-port = 13013*
>
> *log-file = /smsadp/kannel/KannelRestartabilityAgent/log/smsbox.log*
>
> *log-level = 0*
>
> *#access-log = "/tmp/access.log"*
>
> * *
>
> *#---------------------------------------------*
>
> *# SEND-SMS USERS*
>
> *#*
>
> *# These users are used when Kannel smsbox sendsms interface is used to*
>
> *# send PUSH sms messages, i.e. calling URL like*
>
> *#
> http://kannel.machine:13013/cgi-bin/sendsms?username=tester&password=foobar.
> ..*
>
> * *
>
> *group = sendsms-user*
>
> *username = tester*
>
> *password = foobar*
>
> *#assume-plain-text = true*
>
> *#user-deny-ip = ""*
>
> *#user-allow-ip = "*.*.*.*"*
>
> * *
>
> * *
>
> *#---------------------------------------------*
>
> *# SERVICES*
>
> *#*
>
> *# These are 'responses' to sms PULL messages, i.e. messages arriving from
> *
>
> *# handsets. The response is based on message content. Only one
> sms-service is*
>
> *# applied, using the first one to match.*
>
> * *
>
> *#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-regex = ^[a-z]|[A-Z]|[0-9]*
>
> *catch-all=true*
>
> *text = "smppsim"*
>
> *get-url="http://IP/USSDGateway/USSDGateway?to=%P&msg=%a"*
>
> *accepted-smsc=SMPPSim*
>
> *assume-plain-text = 0*
>
> *######################################################*
>
> *# ORACLE*
>
> * *
>
> *group = oracle-connection*
>
> *id = mydlr*
>
> *username = kannel*
>
> *password = kannel*
>
> *tnsname = SMSDEV*
>
> *# 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 = smsbox-route*
>
> *smsbox-id = smsbox_1*
>
> *smsc-id = SMPPSim*
>
> * *
>
> *group = smsbox-route*
>
> *smsbox-id = smsbox_1*
>
> *smsc-id = SMPPSim2*
>
> * *
>
> *group = smsbox-route*
>
> *smsbox-id = smsbox_1*
>
> *smsc-id = SMPPSim3*
>
> * *
>
> *group = smsbox-route*
>
> *smsbox-id = smsbox_1*
>
> *smsc-id = SMPPSim4*
>
> ------------------------------
> Condividi le tue emozioni e proteggi la tua privacy. Chiacchiera su
> Messenger <http://www.windowslive.it/importaAmici.aspx>
>

Reply via email to