Discussion:
Could not fetch content
Jane P. Ifurung
2004-08-27 07:46:35 UTC
Permalink
Hello!

I sent an SMS message through Kannel but I got a reply "Could not fetch
content" in my phone. What's the problem here?

Thanks,

Jane
Rogelio M.Serrano Jr.
2004-08-27 07:44:02 UTC
Permalink
Post by Jane P. Ifurung
Hello!
I sent an SMS message through Kannel but I got a reply "Could not fetch
content" in my phone. What's the problem here?
Thanks,
Jane
The charset and coding of the message cant be handled by your phone
perhaps?
--
Blood is thicker than water... and much tastier too.
John Davidorff Pell
Rodrigo A. Cremaschi
2004-08-27 15:53:59 UTC
Permalink
Hi Jane,

check first your script is working as expected, using:

lynx -dump
http://your-content-server/cgi-bin/your-script.cgi?your-parameter-list

You should get at least a (unquoted):

"Content-type: text/plain

Your-reply-message"

on your screen. This reply may differ depending on your script.

Rodrigo.

----- Original Message -----
From: "Jane P. Ifurung" <***@mtech.com.ph>
To: <***@kannel.org>
Sent: Friday, August 27, 2004 4:46 AM
Subject: Could not fetch content


Hello!

I sent an SMS message through Kannel but I got a reply "Could not fetch
content" in my phone. What's the problem here?

Thanks,

Jane


Este mensaje se dirige exclusivamente a su destinatario y puede contener
información CONFIDENCIAL sometida a secreto profesional o cuya divulgación
esté prohibida en virtud de la legislación vigente. Si ha recibido este
mensaje por error, le rogamos que nos lo comunique inmediatamente por esta
misma vía o por teléfono (54.11 5776-5000) y proceda a su destrucción.
Nótese que el correo electrónico vía Internet no permite asegurar ni la
confidencialidad de los mensajes que se transmiten ni la correcta recepción
de los mismos. En caso de que el destinatario de este mensaje no
consintiera la utilización de correo electrónico vía Internet rogamos lo
ponga en nuestro conocimiento de manera inmediata.
Rafael 'Dido' Sevilla
2004-08-28 02:06:44 UTC
Permalink
Post by Jane P. Ifurung
Hello!
I sent an SMS message through Kannel but I got a reply "Could not fetch
content" in my phone. What's the problem here?
The machine where you are hosting the content to be served by Kannel is
either not responding, refusing connections, or issuing 404 or other
HTTP errors in response to Kannel's requests. Turn up the verbosity in
your log files to full throttle, and see what Kannel has to say when
such a thing happens. Try connecting to the URL you specified for
the sms-service get-url manually as well, and be sure you expand any
escape sequences.
--
dido
Sans les mathematiques on ne penetre point au fond de la philosophie. Sans la
philosophie on ne penetre point au fond des mathematiques. Sans les deux on
ne penetre au fond de rien.
Jane P. Ifurung
2004-08-31 03:35:33 UTC
Permalink
Thank you for the replies.... From my Kannel's smsbox output log (shown
below), it seems that the problems were:
1. My application in my content server did not receive correctly the
message I passed or that the message I passed to it is not correct
(because the content server issued Kannel a warning that says the
message passed to it is not in the correct format)
2. The dlr-url CGI parameter in the sendsms is not urlencoded when the
content server replied to Kannel (I assume this is an error because I
got a response of HTTP 400 Bad Request (was that from the smsbox?) and a
response of DLR-URL field misformed, rejected from Kannel).

Therefore, from the above problems,
1. my application in the content server should urlencode the
dlr-url field before making a sendsms to my Kannel? So, if my dlr-url
is: http://202.147.31.2/test/smsresponse.asp?type=%d
<http://202.147.31.2/test/smsresponse.asp?type=%25d> , I should make it
as
http%3a%2f%2f202%2e147%2e31%2e2%2ftest%2fsmsresponse%2easp%3ftype%3d%25d
, right?
2. I should check if my application processes correctly my
get-url and check also if my get-url is correct. My configuration for
sms-service is
group = sms-service
keyword = test
accepted-smsc = the id for my smsc
get-url = "http://my-content-server/test/receivemsg.asp?from=%p
<http://my-content-server/test/receivemsg.asp?from=%25p&to=%25P&text=%25
k%25s%25r> &to=%P&text=%k%s%r"
max-messages = 3
concatenation = true

One word about the escape codes:
The format of all messages to be sent to my application should be TEST
CODE MESSAGE, where MESSAGE could be up to 400 characters including
spaces...

May I know if I set text in my get-url to be text=%k%s%r, would Kannel
put spaces between the words trapped by %k and %s or merge them as one
word? For example, if the mobile sends to Kannel the following message:
test garbage there are so many litter in our community, would text be
testgarbagethere+there+are+so+many+litter+in+our+community? I assume
this is so because from the HTTP log below, that is what Kannel sent to
my content server. How do I put spaces between the "test" word and the
next words?

Is it also safe to assume that since I could send and receive text
messages to Kannel (via the SMSC), our connection with SMSC has no
problem?

Thank you in advance!

2004-08-27 16:55:56 [4440] [0] DEBUG: Kannel smsbox version 1.3.2
starting
<other lines, snipped>

2004-08-27 16:57:15 [4440] [5] DEBUG: message length 31, sending 1
messages
2004-08-27 16:58:51 [4440] [4] INFO: Starting to service <test garbage
dami po bsura d2. anu po gawin ko?> from <09228051616>
to <136>
Parsing URL `http:// XXX.XXX.XX.X
/test/receivemsg.asp?from=09228051616&to=136&text=
testgarbagedami+po+bsura+d2.+anu+po+gawin+ko%3F':
Scheme: http://
Host: XXX.XXX.XX.X 2004-08-27 16:58:51 [4440] [9] DEBUG: Port: 80
<snipped>
Path: /test/receivemsg.asp
Query:
from=09228051616&to=136&text=testgarbagedami+po+bsura+d2.+anu+po+gawin+k
o%3F
Fragment: (null)
HTTP: Reusing connection to ` XXX.XXX.XX.X:80' (fd=28).
Socket connected at once
HTTP: Sending request:
<other lines snipped>
GET / test/receiv
emsg.asp?from=09
228051616&to=136
&text= testgarbag
edami+po+bsura+d
2.+anu+po+gawin+
ko%3F HTTP/1.1..
Host: 202.147.31
.2..User-Agent:
Kannel/1.3.2....
<other lines snipped>
Octet string dump ends.
HTTP: Status line: <HTTP/1.1 302 Object moved>
HTTP: Received response:
<other lines were snipped>
Octet string dump ends.
Parsing URL `http://XXX.XXX.XX.X:13013/
cgibin/sendsms?username=janelang&password=janelang&from=136&to=092280516
16&Text=The+correct+format+is%3A+TEST%3Cspace%3ECODE%3Cspace%3EMESSAGE&d
lr-mask=31&dlr-url=htp:// XXX.XXX.XX.X
/test/smsresponse.asp?type=%d&msclass=1':
Scheme: http://
Host: XXX.XXX.XX.X
Port: 13013
Username: (null)
Password: (null)
Path: /cgi-bin/sendsms
Query:
username=janelang&password=janelang&from=136&to=09228051616&Text=The+cor
rect+format+is%3A+MMDA%3Cspace%3ECODE%3Cspace%3EMESSAGE&dlr-mask=31&dlr-
url=htp:// XXX.XXX.XX.X
/test/smsresponse.asp?type=%d&msclass=12004-08-27 16:58:51 [4440] [9]
DEBUG: Fragment: (null)


HTTP: Opening connection to ` XXX.XXX.XX.X:13013' (fd=29).
Socket connecting
HTTP: Creating HTTPClient for ` XXX.XXX.XX.X '.
Get info about connecting socket
HTTP: Sending request:
<other lines snipped>>>
GET /cgi-bin/sen
dsms?username=ja
nelang&password=
janelang&from=13
6&to=09228051616
&Text=The+correc
t+format+is%3A+T
EST%3Cspace%3ECO
DE%3Cspace%3EMES
SAGE&dlr-mask=31
&dlr-url=htp://2
02.147.31.2/test
/smsresponse.asp
?type=%d&msclass
=1 HTTP/1.1..Hos
t: XXX.XXX.XX.X:
13013..User-Agen
t: Kannel/1.3.2.
...


Octet string dump ends.
octstr_url_decode: corrupted end-of-string <%d>
smsbox: Got HTTP request </cgi-bin/sendsms> from < XXX.XXX.XX.X >
sendsms used by <janelang>
sendsms sender:<janelang:136> (XXX.XXX.XX.X) to:<09228051616> msg:<>
Status: 400 Answer: <DLR-URL field misformed, rejected>
HTTP: Resetting HTTPClient for ` XXX.XXX.XX.X '.
HTTP: Status line: <HTTP/1.1 400 Bad Request>
HTTP: Received response:
Octet string at 0x813ce58:
len: 145
size: 1024
immutable: 0


Server: Kannel/1
.3.2..Content-Length: 33..Content-type: text/html..Pragma:
no-cache..Cache-Control: no-cache....
DLR-URL field misformed, rejected
Jane P. Ifurung
2004-08-31 09:10:48 UTC
Permalink
Thanks again, Dido. Well, my content server is giving out
Content-Type:text/html path=/..Cache-control: private..

Also, you're right with my text parameter query...it should have been
%a. Was just confused with the documentation which says that %a traps
all the words of the message, "with spaces squeezed to one".

Although you assured me of my "smooth" connection with our SMSC, I still
have problems on sending the right response to my phone. Instead, I
always get the "Could not fetch content, sorry".

Is the misformed dlr-url cgi parameter in my sendsms and misspelled
mclass (I typed msclass and accidentally urlencoded it along with my
dlr-url variable) is enough to cause a no response to my cell phone but
the default "Could not fetch content, sorry"? My smsbox.log below shows
that an Kannel issued a HTTP 400 <DLR-URL field misformed, rejected>
response.

40 [5114] [3] INFO: smsbox: Got HTTP request </cgi-bin/sendsms> from
<202.147.31.7>
2004-08-31 15:02:40 [5114] [3] INFO: sendsms used by <janelang>
2004-08-31 15:02:40 [5114] [3] INFO: sendsms sender:<janelang:136> (XXX.
XXX.XX.X) to:<09228051616> msg:<>
2004-08-31 15:02:40 [5114] [3] DEBUG: Status: 400 Answer: <DLR-URL field
misformed, rejected>
2004-08-31 15:02:40 [5114] [3] DEBUG: HTTP: Resetting HTTPClient for `
XXX. XXX.XX.X'.
2004-08-31 15:02:40 [5114] [8] DEBUG: HTTP: Status line: <HTTP/1.1 400
Bad Request>

Would setting the dlr-url in the correct format guarantee me that I will
now be able to receive the supposed response to my phone instead of the
default "Could not fetch content, sorry"?

Thanks....




__________________________________________________
Mtech.com, Inc.

The information contained in this e-mail message is company-privileged and confidential, and intended for the use of the individual or entity named above. If the reader of this message is not the intended recipient, or the employee responsible for delivery, you are hereby notified that any dissemination, distribution or copying of this communication/message is strictly prohibited. If you have mistakenly received this e-mail message, please immediately notify Mtech.com, Inc. (ACSSEG Group of Companies) by returning the original message to Jane P. Ifurung at ***@mtech.com.ph.

This mail was content checked for malicious code and viruses by ACSSEG Group of Companies MailSecurity. ACSSEG Group of Companies MailSecurity provides email content checking, exploit detection and anti-virus for Exchange. Spam, viruses, dangerous attachments & offensive content are removed automatically.
__________________________________________________

Continue reading on narkive:
Loading...