/var/log/kannel/smsbox.log: 2008-12-16 12:14:49 [4507] [2] DEBUG: HTTP: Creating HTTPClient for `127.0.0.1'. 2008-12-16 12:14:49 [4507] [2] DEBUG: HTTP: Created HTTPClient area 0x97aefd0. 2008-12-16 12:14:49 [4507] [3] INFO: smsbox: Got HTTP request </cgi-bin/sendsms> from <127.0.0.1> 2008-12-16 12:14:49 [4507] [3] INFO: sendsms used by <user> 2008-12-16 12:14:49 [4507] [3] INFO: sendsms sender:<user:+xxxxxxxxxxxx> (127.0.0.1) to:<+xxxxxxxxxxxx> msg:<Hello world> 2008-12-16 12:14:49 [4507] [3] DEBUG: Stored UUID e6669b3d-6b61-4956-a9ae-24d302a395cc 2008-12-16 12:14:49 [4507] [3] DEBUG: message length 11, sending 1 messages 2008-12-16 12:14:49 [4507] [3] DEBUG: Status: 202 Answer: <Sent.> 2008-12-16 12:14:49 [4507] [3] DEBUG: Delayed reply - wait for bearerbox 2008-12-16 12:14:49 [4507] [0] DEBUG: Got ACK (0) of e6669b3d-6b61-4956-a9ae-24d302a395cc 2008-12-16 12:14:49 [4507] [0] DEBUG: HTTP: Resetting HTTPClient for `127.0.0.1'. 2008-12-16 12:14:49 [4507] [1] DEBUG: HTTP: Destroying HTTPClient area 0x97aefd0. 2008-12-16 12:14:49 [4507] [1] DEBUG: HTTP: Destroying HTTPClient for `127.0.0.1'.
CURL output (verbose): curl -v "http://localhost:8081/cgi-bin/sendsms?user=user&pass=user&to=09213116180&text=Hello+world" * About to connect() to localhost port 8081 (#0) * Trying 127.0.0.1... connected * Connected to localhost (127.0.0.1) port 8081 (#0) > GET /cgi-bin/sendsms?user=user&pass=user&to=09213116180&text=Hello+world > HTTP/1.1 > User-Agent: curl/7.18.2 (i486-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.8g > zlib/1.2.3.3 libidn/1.8 > Host: localhost:8081 > Accept: */* > < HTTP/1.1 202 Accepted < Server: Kannel/1.4.1 < Content-Length: 24 < Content-type: text/html < Pragma: no-cache < Cache-Control: no-cache < * Connection #0 to host localhost left intact * Closing connection #0 0: Accepted for delivery On Mon, Dec 15, 2008 at 6:37 PM, Nikos Balkanas <[email protected]> wrote: > This is more informative than the bearerbox logs. I imagine nothing > interesting on smsbox logs, right? > > Could you post your configuration, and the CURL output from your (succesful) > GET operation? Seems like your URL is not what kannel expects. > > BR, > Nikos > ----- Original Message ----- From: "Francis Vidal" <[email protected]> > To: "seikath" <[email protected]> > Cc: <[email protected]> > Sent: Monday, December 15, 2008 11:21 AM > Subject: Re: Authorization failed for XML post > > >> Okay, tried adding "?username=user&password=pass" to the URL: >> >> curl -v -H "Content-type: text/xm >> localhost:8081/cgi-bin/sendsms?username=user&password=user" >> >> Here's the output of CURL: >> >> * About to connect() to localhost port 8081 (#0) >> * Trying 127.0.0.1... connected >> * Connected to localhost (127.0.0.1) port 8081 (#0) >>> >>> POST /cgi-bin/sendsms?username=user&password=user HTTP/1.1 >>> User-Agent: curl/7.18.2 (i486-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.8g >>> zlib/1.2.3.3 libidn/1.8 >>> Host: localhost:8081 >>> Accept: */* >>> Content-type: text/xml >>> Content-Length: 17 >>> >> < HTTP/1.1 403 Forbidden >> < Server: Kannel/1.4.1 >> < Content-Length: 32 >> < Content-type: text/html >> < Pragma: no-cache >> < Cache-Control: no-cache >> < >> * Connection #0 to host localhost left intact >> * Closing connection #0 >> Authorization failed for sendsms >> >> On Mon, Dec 15, 2008 at 4:20 PM, seikath <[email protected]> wrote: >>> >>> for the curl XML POST request try use the same URL with the >>> user&password added >>> >>> Francis Vidal wrote: >>>> >>>> Hi all, >>>> >>>> I'm trying to send a test SMS message using CURL: >>>> >>>> curl -v -H "Content-type: text/xml" -d test.xml >>>> http://localhost:8081/cgi-bin/sendsms >>>> >>>> Here's the content of test.xml: >>>> >>>> <?xml version="1.0" encoding="ISO-8859-1"?> >>>> <message> >>>> <submit> >>>> <da><number>the_number</number></da> >>>> <ud>Another+test+sms</ud> >>>> >>>> <!-- request from Kannel to application --> >>>> <from> >>>> <user>user</user> >>>> <pass>user</pass> >>>> </from> >>>> </submit> >>>> </message> >>>> >>>> I can send SMS using the normal HTTP method (i.e. >>>> http://localhost:8081/cgi-bin/sendsms?user=user&pass=user&...) but >>>> when I use the CURL method above, I get "Authorization failed". What >>>> am I doing wrong? >>>> >>>> >>> >> > >
