Ok, I got it. Actually I changed the path in the kannel.conf file and it was wrong.
I changed the path and everything seems ok now. Now I got this in smsbox-access.log 2011-04-30 21:28:34 SMS HTTP-request sender:+91******** request: 'Hello Hello Sender' url: 'http://localhost/~harbhag/test.php?phone=%2B9463030713&text=' reply: 200 '<< successful >> 2011/4/30 Milan P. Stanić <m...@arvanta.net>: > On Sat, 2011-04-30 at 20:49, Harbhag Singh Sohal wrote: >> Below is the snippet from the smsbox-access.log file >> >> 2011-04-30 20:23:07 SMS HTTP-request sender:+91********* request: >> 'Could not fetch content, sorry.' url: >> 'http://localhost/~harbhag/public_html/test.php?phone=%2B91*************&text=not+fetch+content%2C+sorry.' >> reply: 404 '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> >> <html><head> >> <title>404 Not Found</title> >> </head><body> >> <h1>Not Found</h1> >> <p>The requested URL /~harbhag/public_html/test.php was not found on >> this server.</p> >> <hr> >> <address>Apache/2.2.14 (Ubuntu) Server at localhost Port 80</address> >> </body></html> >> >> >> Its say that the url is not found, although the files is there in the >> path specified in the url ? >> What is wrong ? > > Can you access to URL using some command line HTTP clients (curl, lynx, > elinks ...) from the server? > > Example: > curl > 'http://localhost/~harbhag/public_html/test.php?phone=12345&text=my+sample+text' > > What the HTTP server log says? I hope that you setup your HTTP server > to serve CGI scripts and you tested it before trying to use it with > Kannel. > >> On Sat, Apr 30, 2011 at 6:40 PM, Harbhag Singh Sohal >> <harbhag.so...@gmail.com> wrote: >> > Ok, I am going to read UG one more time(very carefully). I will revert >> > back if I stuck somewhere. >> > Thanks >> > >> > 2011/4/30 Milan P. Stanić <m...@arvanta.net>: >> >> On Sat, 2011-04-30 at 18:05, Harbhag Singh Sohal wrote: >> >>> The GET variables in the URL (i.e phone and text), is this the phone >> >>> and text from the sender ? >> >> >> >> All 'variables' are described in userguide in table 6-9 as Parameters >> >> (Escape Codes). >> >> >> >> Did you read userguide carefully? >> >> >> >>> If yes, then I can use them to retrieve some information from the >> >>> database based on these variables. Then how can I reply back to kannel >> >>> with the information that I retrieved? >> >> >> >> You can reply to Kannel whatever you want but simple 'text/plain' in >> >> header is enough. But read userguide carefully and all that will become >> >> clear to you. >> >> >> >>> Please help me with this, I am new to the receiving SMS, just give me >> >>> some hint on that, I have experience with PHP and I know my way around >> >>> it. >> >>> >> >>> 2011/4/30 Milan P. Stanić <m...@arvanta.net>: >> >>> > On Sat, 2011-04-30 at 14:14, Harbhag Singh Sohal wrote: >> >>> >> When ever I try to send SMS to kannel, I get this reply back to me >> >>> >> "Could not fetch content, sorry." >> >>> >> Which content it is trying fetch? >> >>> >> I think its the issue with the get-url parameter in the sms-service. >> >>> >> The phone and text parameters in the url are used for what ? >> >>> > >> >>> > Yes. Your test.php script must reply to kannel. >> >>> > Simple "print text/html" should do that (I'm not sure if that is right >> >>> > syntax for php.). >> >>> > But, if you want to do something with received SMS your script should >> >>> > process data and reply to Kannel. >> >>> > >> >>> >> Below are my current config files >> >>> >> >> >>> >> #Sample configuration file for Kannel bearerbox on Debian. >> >>> >> # See the documentation for explanations of fields. >> >>> >> # >> >>> >> >> >>> >> # HTTP administration is disabled by default. Make sure you set the >> >>> >> # password if you enable it. >> >>> >> >> >>> >> group = core >> >>> >> admin-port = 13015 >> >>> >> admin-password = hard2guess >> >>> >> #admin-deny-ip = "*.*.*.*" >> >>> >> admin-allow-ip = "127.0.0.1" >> >>> >> dlr-storage = internal >> >>> >> smsbox-port = 13016 >> >>> >> #wdp-interface-name = "*" >> >>> >> log-file = "/var/log/kannel/bearerbox.log" >> >>> >> access-log = "/var/log/kannel/access.log" >> >>> >> #box-deny-ip = "*.*.*.*" >> >>> >> box-allow-ip = "127.0.0.1" >> >>> >> log-level = 0 >> >>> >> >> >>> >> #group = wapbox >> >>> >> #bearerbox-host = localhost >> >>> >> #log-file = "/var/log/kannel/wapbox.log" >> >>> >> group = smsc >> >>> >> smsc-id = huawei_e220 >> >>> >> smsc = at >> >>> >> modemtype = huawei >> >>> >> device= /dev/ttyUSB0 >> >>> >> my-number = +91 >> >>> >> connect-allow-ip = 127.0.0.1 >> >>> >> sim-buffering = true >> >>> >> log-level = 0 >> >>> >> >> >>> >> # DLR with MySQL support configuration >> >>> >> group = mysql-connection >> >>> >> id = mydlr >> >>> >> host = localhost >> >>> >> username = >> >>> >> password = >> >>> >> database = a >> >>> >> >> >>> >> group = dlr-db >> >>> >> id = mydlr >> >>> >> table = dlr >> >>> >> field-smsc = smsc >> >>> >> field-timestamp = ts >> >>> >> field-source=source >> >>> >> field-destination = destination >> >>> >> field-service = service >> >>> >> field-url = url >> >>> >> field-mask = mask >> >>> >> field-status = status >> >>> >> field-boxc-id = boxc >> >>> >> >> >>> >> group = modems >> >>> >> id = nokia >> >>> >> name = "Huawei" >> >>> >> detect-string = "huawei" >> >>> >> init-string = "ATZ" >> >>> >> init-string = "AT+CMEE=1" >> >>> >> init-string = "AT Q0 V1 E1 S0=0 &C1 &D2 +FCLASS=0" >> >>> >> init-string = "AT+CNMI=0,1" >> >>> >> message-storage = SM >> >>> >> message-start = 0 >> >>> >> #speed = 460800 >> >>> >> #message-start = 0 >> >>> >> >> >>> >> group = smsbox >> >>> >> smsbox-id = mysmsc >> >>> >> bearerbox-host = 2 >> >>> >> #bearerbox-port = 13018 >> >>> >> sendsms-port = 13018 >> >>> >> global-sender = +91 >> >>> >> access-log = "/var/log/kannel/smsbox-access.log" >> >>> >> log-file = "/var/log/kannel/smsbox.log" >> >>> >> log-level = 0 >> >>> >> mo-recode = true >> >>> >> >> >>> >> group = smsbox-route >> >>> >> smsbox-id = mysmsc >> >>> >> smsc-id = huawei_e220 >> >>> >> >> >>> >> group = sendsms-user >> >>> >> username = >> >>> >> password = hard2guess >> >>> >> concatenation= true >> >>> >> max-messages = 10000 >> >>> >> >> >>> >> group = sms-service >> >>> >> keyword-regex = .* >> >>> >> catch-all = yes >> >>> >> accepted-smsc = huawei_e220 >> >>> >> max-messages = 3 >> >>> >> get-url = "http://localhost/~harbhag/test.php?phone=%p&text=%a" >> >>> >> (test.php file empty and it is stored in my public_html directory) >> >>> >> >> >>> >> >> >>> >> >> >>> >> group = sqlbox >> >>> >> id = sqlbox-db >> >>> >> smsbox-id = mysmsc >> >>> >> global-sender = "+91" >> >>> >> bearerbox-host = 202 >> >>> >> bearerbox-port = 13016 >> >>> >> smsbox-port = 13017 >> >>> >> 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 >> >>> >> >> >>> >> # Example MYSQL Connection >> >>> >> group = mysql-connection >> >>> >> id = sqlbox-db >> >>> >> host = localhost >> >>> >> username = >> >>> >> password = >> >>> >> database = >> >>> >> >> >>> >> >> >>> >> I am using Ubuntu 10.04 Server 32 bit and Kannel version 1.50. >> >>> >> Thanks >> >>> >> >> >>> >> -- >> >>> >> Harbhag Singh Sohal >> >>> >> www.harbhag.wordpress.com >> >>> >> >> >>> > >> >>> > -- >> >>> > Kind regards, Milan >> >>> > -------------------------------------------------- >> >>> > Arvanta, IT Security http://www.arvanta.net >> >>> > Please do not send me e-mail containing HTML code. >> >>> > >> >>> > >> >>> >> >>> >> >>> >> >>> -- >> >>> Harbhag Singh Sohal >> >>> www.harbhag.wordpress.com >> >>> >> >> >> >> -- >> >> Kind regards, Milan >> >> -------------------------------------------------- >> >> Arvanta, IT Security http://www.arvanta.net >> >> Please do not send me e-mail containing HTML code. >> >> >> >> >> > >> > >> > >> > -- >> > Harbhag Singh Sohal >> > www.harbhag.wordpress.com >> > >> >> >> >> -- >> Harbhag Singh Sohal >> www.harbhag.wordpress.com >> > > -- > Kind regards, Milan > -------------------------------------------------- > Arvanta, IT Security http://www.arvanta.net > Please do not send me e-mail containing HTML code. > > -- Harbhag Singh Sohal www.harbhag.wordpress.com