In your kannel.conf, you are declaring

group = sendsms-user
username = user
password = pass1

but you are invoking the sendsms service with another user and password:

username=user&password=foobar

please, use the same username and password in your URL.

On Wed, Jan 14, 2009 at 6:18 AM, Mike Nwaogu <[email protected]> wrote:
>
> $baseUrl = "http://192.168.0.1:13013/cgi-bin/sendsms?";;
> $params =
> "username=user&password=foobar&to=$to&from=$frm&default_smsc=sms3&dlr-mask=31&text=".urlencode($msg);
>
> Regards,
> Mike Nwaogu
> Tel: 234_802_325_6437
> Eml: [email protected]
>
> ________________________________
> From: Otandeka Simon Peter <[email protected]>
> To: Mike Nwaogu <[email protected]>
> Cc: "[email protected] User" <[email protected]>
> Sent: Wednesday, January 14, 2009 6:18:30 AM
> Subject: Re: Invalid content type error
>
>
> Can you paste your cgi-bin sendsms url?  You could be missing something.
> Are you able to bind successfully?
> On Jan 13, 2009, at 10:32 PM, Mike Nwaogu wrote:
>
> Yes I am.
>
> Regards,
> Mike Nwaogu
> Tel: 234_802_325_6437
> Eml: [email protected]
>
> ________________________________
> From: Rodrigo Cremaschi <[email protected]>
> To: Mike Nwaogu <[email protected]>
> Cc: [email protected]
> Sent: Tuesday, January 13, 2009 8:31:23 PM
> Subject: Re: Invalid content type error
>
> Hi,
>
>     Are you including the "username" and "password" variables you
> defined in the "sendsms-user" group into your URL?
>
>     Regards,
>
> Rodrigo.
>
> On Tue, Jan 13, 2009 at 4:59 PM, Mike Nwaogu <[email protected]>
> wrote:
>> smsbox.log log-level=0
>>
>> 2009-01-13 19:46:10 [3707] [2] DEBUG: HTTP: Creating HTTPClient for
>> `41.222.67.127'.
>> 2009-01-13 19:46:10 [3707] [2] DEBUG: HTTP: Created HTTPClient area
>> 0x8755330.
>> 2009-01-13 19:46:10 [3707] [3] INFO: smsbox: Got HTTP request
>> </cgi-bin/sendsms> from <41.222.67.127>
>> 2009-01-13 19:46:10 [3707] [3] DEBUG: Status: 403 Answer: <Authorization
>> failed for sendsms>
>> 2009-01-13 19:46:10 [3707] [3] DEBUG: HTTP: Resetting HTTPClient for
>> `41.222.67.127'.
>> 2009-01-13 19:46:11 [3707] [3] INFO: smsbox: Got HTTP request
>> </cgi-bin/sendsms> from <41.222.67.127>
>> 2009-01-13 19:46:11 [3707] [3] DEBUG: Status: 403 Answer: <Authorization
>> failed for sendsms>
>> 2009-01-13 19:46:11 [3707] [3] DEBUG: HTTP: Resetting HTTPClient for
>> `41.222.67.127'.
>> 2009-01-13 19:46:11 [3707] [1] DEBUG: HTTP: Destroying HTTPClient area
>> 0x8755330.
>> 2009-01-13 19:46:11 [3707] [1] DEBUG: HTTP: Destroying HTTPClient for
>> `41.222.67.127'.
>>
>>
>> Regards,
>> Mike Nwaogu
>> Tel: 234_802_325_6437
>>
>>
>> ________________________________
>> From: Nikos Balkanas <[email protected]>
>> To: Mike Nwaogu <[email protected]>; Alejandro Guerrieri
>> <[email protected]>
>> Cc: [email protected]
>> Sent: Tuesday, January 13, 2009 7:38:49 PM
>> Subject: Re: Invalid content type error
>>
>> Hi,
>>
>> By error message I mean the error message from bearerbox logs and/or
>> smsbox
>> log. Please do not send me php code or HTTP server response (end result).
>> It
>> is not my intention to debug your application.
>>
>> BR,
>> Nikos
>> ----- Original Message -----
>>
>> From: Nikos Balkanas
>> To: Mike Nwaogu ; Alejandro Guerrieri
>> Cc: [email protected]
>> Sent: Tuesday, January 13, 2009 8:25 PM
>> Subject: Re: Invalid content type error
>> I am confused. Could you please post the packet from tcpdump -or- smsbox
>> (verbosity 0)? (just the packet) and the exact error message that you are
>> getting?
>>
>> BR,
>> Nikos
>>
>> ----- Original Message -----
>> From: Mike Nwaogu
>> To: Nikos Balkanas ; Alejandro Guerrieri
>> Cc: [email protected]
>> Sent: Tuesday, January 13, 2009 7:32 PM
>> Subject: Re: Invalid content type error
>> No I meant that the error changes to
>> "Authorization failed for sendsms" when I know I've inputed the right
>> details.
>>
>> Regards,
>> Mike Nwaogu
>> Tel: 234_802_325_6437
>>
>>
>> ________________________________
>> From: Mike Nwaogu <[email protected]>
>> To: Nikos Balkanas <[email protected]>; Alejandro Guerrieri
>> <[email protected]>
>> Cc: [email protected]
>> Sent: Tuesday, January 13, 2009 5:42:41 PM
>> Subject: Re: Invalid content type error
>>
>> Ok thanks, what's the best header to send in.
>> "Content-Type: text/html; charset=utf-8" or
>> "Content-Type: text/html; charset=iso-8859-1"
>>
>> Do I need to config kannel to expect a particular type, I noticed that
>> every
>> time I send a request with the either header above I have a PANIC in the
>> logs and the process dies.
>>
>>
>> Regards,
>> Mike Nwaogu
>> Tel: 234_802_325_6437
>>
>>
>>
>> ________________________________
>> From: Nikos Balkanas <[email protected]>
>> To: Mike Nwaogu <[email protected]>; Alejandro Guerrieri
>> <[email protected]>
>> Cc: [email protected]
>> Sent: Friday, January 2, 2009 6:18:52 PM
>> Subject: Re: Invalid content type error
>>
>> Hi Mike,
>>
>> Kannel is very explicit about its problem. The HTML header "Content-type"
>> you are submitting with your javascript (or more likely don't send at all)
>> is invalid. The header of course is not part of the URL which seems to be
>> OK.
>>
>> You can see the headers you are sending to kannel either by a packet
>> analyzer like tcpdump, or by starting bearerbox and smsbox at the shell at
>> maximum verbosity:
>>
>> bearerbox <conffile>&
>> smsbox <conffile> &
>>
>> BR,
>> Nikos
>>
>> ----- Original Message -----
>> From: Mike Nwaogu
>> To: Alejandro Guerrieri
>> Cc: [email protected]
>> Sent: Friday, January 02, 2009 7:01 PM
>> Subject: Re: Invalid content type error
>> Hello All,
>> I'm not sure you recall this request from last year, but i'm having the
>> same
>> issue, and I have checked to be sure, I'm encoding properly using PHP
>> curl,
>> have searched thru the list.
>>
>> Please help with a pointer, really lost now.
>>
>> TIA
>> Mike Nwaogu.
>>
>> Alejandro Guerrieri alejandro.guerrieri at gmail.com
>> Mon Mar 5 22:14:56 CET 2007
>>
>> Previous message: Invalid content type error
>> Next message: Problematic Kannel behaviour with large message stores
>> Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>>
>> ________________________________
>>
>> This looks more as a question for the "users" mailing list. From
>> Kannel's standpoint this is a "kannel user" question, not a "kannel
>> developer" one.
>>
>> Hint: Check if you are urlencoding your text fields.
>>
>> Regards,
>>
>> Alejandro.
>>
>> On 3/5/07, sudhir <ssharma at signdomains.com> wrote:
>>>
>>>
>>> Hi,
>>>            i  am using Kannel 1.4.1 for my sms application.The
>>> configuration
>>> settings have been made.When i use that url directly into the browser it
>>> runs fine, but i have to use it into my sms appplication which has been
>>> made
>>> in ASP.
>>>
>>> To send the sms i have made a html form, and using javascript i am
>>> submitting all the values to the kannel.after submitting it gives
>>> 'invalid
>>> content
>>
>>  type'
>>  error.
>>> but when i
>>  print this URl on to the sreen and copy an paste it into the
>>> browser ,then it runs fine.
>>>
>>> can anyone of you please tel me that where i am making the mistake or
>>> anyother solution.I am using 'get' method in my form.
>>> Thanks in advanvce.
>>>
>>>
>>> Thanks & Regards,
>>> Sudhir Sharma
>>
>>
>> --
>> Alejandro Guerrieri
>> Magicom
>> http://www.magicom-bcn.net/
>> LinkedIn: http://www.linkedin.com/in/aguerrieri
>>
>>
>>
>>
>>
>>
>
>
>
> "Our attitude towards ourselves should be ''to be satiable in learning'' and
> towards others ''to be tireless in teaching." Mao Tse-Tung
>
>

Reply via email to