hi,

With the assumption that the problem might be from the app and that
tcpdump is unconvinient/unavailable then i will suggest the follow.

Write a simple script, PHP or similar, to accept the call from your
app and write the entire uri to a file. To narrow down the problem,
you may want to put this script on another box.

Hope this helps.

On 1/15/09, Nikos Balkanas <nbalka...@gmail.com> wrote:
> I find tcpdump (or snoop in my case with Solaris) indispensible. I think you
> should at least give it a try. Otherwise you might want to try: smsbox -D
> <conffile>. It may show packets, too. The point is to see the packets, from
> your app.
>
> BR,
> Nikos
>   ----- Original Message -----
>   From: Mike Nwaogu
>   To: Nikos Balkanas ; Otandeka Simon Peter
>   Cc: users@kannel.org
>   Sent: Thursday, January 15, 2009 6:13 PM
>   Subject: Re: Invalid content type error
>
>
>   I'm inclined to agree with Niko, it's a discrepancy between my app and
> kannel.
>   But the thing is using a tcpdump program, is new to me.
>   a typical command would do.
>
>
>   Regards,
>   Mike Nwaogu
>   Tel: 234_802_325_6437
>
>
>
>
>
>
> ------------------------------------------------------------------------------
>   From: Nikos Balkanas <nbalka...@gmail.com>
>   To: Mike Nwaogu <michael_nwa...@yahoo.com>; Otandeka Simon Peter
> <otand...@smsmedia.info>
>   Cc: users@kannel.org
>   Sent: Wednesday, January 14, 2009 2:48:48 PM
>   Subject: Re: Invalid content type error
>
>
>   Hi,
>
>   Mike has already stated that the URL if pasted in a browser works OK.
> Problem is that when he uses his application to send the request it doesn't
> work. There is clearly a discrepancy between what his application sends and
> what he thinks is sending. IMHO It is not a kannel issue, that's why I
> requested a packet dump.
>
>   I think that a packet sniffer is an essential tool for anyone developing
> client/server applications.
>
>   BR,
>   Nikos
>     ----- Original Message -----
>     From: Mike Nwaogu
>     To: Otandeka Simon Peter
>     Cc: us...@kannel.orguser
>     Sent: Wednesday, January 14, 2009 10:18 AM
>     Subject: Re: Invalid content type error
>
>
>
>     $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: as_u_ca...@d.top
>
>
>
>
>
> ----------------------------------------------------------------------------
>     From: Otandeka Simon Peter <otand...@smsmedia.info>
>     To: Mike Nwaogu <michael_nwa...@yahoo.com>
>     Cc: "users@kannel.org User" <users@kannel.org>
>     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: as_u_ca...@d.top
>
>
>
>
>
> --------------------------------------------------------------------------
>       From: Rodrigo Cremaschi <rodrigo.cremas...@gmail.com>
>       To: Mike Nwaogu <michael_nwa...@yahoo.com>
>       Cc: users@kannel.org
>       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
> <michael_nwa...@yahoo.com> 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 <nbalka...@gmail.com>
>       > To: Mike Nwaogu <michael_nwa...@yahoo.com>; Alejandro Guerrieri
>       > <alejandro.guerri...@gmail.com>
>       > Cc: users@kannel.org
>       > 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: users@kannel.org
>       > 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: users@kannel.org
>       > 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 <michael_nwa...@yahoo.com>
>       > To: Nikos Balkanas <nbalka...@gmail.com>; Alejandro Guerrieri
>       > <alejandro.guerri...@gmail.com>
>       > Cc: users@kannel.org
>       > 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 <nbalka...@gmail.com>
>       > To: Mike Nwaogu <michael_nwa...@yahoo.com>; Alejandro Guerrieri
>       > <alejandro.guerri...@gmail.com>
>       > Cc: users@kannel.org
>       > 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: users@kannel.org
>       > 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
>
>
>
>
>
>


-- 
Regards,
Kenny
e: ke...@nuobjects.com
w: http://www.nuObjects.com

Enterprise SMS Solutions | Managed Hosting | Enterprise Software
Development | eCommerce Application Development

Reply via email to