Re: [Kannel-Users] Re: send-url for HTTP-based relay in 1.3.1
Peter Beckman <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
On Sat, 7 Aug 2004, Stipe Tolj wrote:
> Peter Beckman wrote:
>
> > Folks -- Having a little problem with kannel and binary messages sent via
> > HTTP.
> >
> > Right now, I can't seem to successfully convert the text passed by kannel
> > via an HTTP relay connection back to the hex encoded string.
> >
> > The original:
> >
> > UDH: 0B0504158100000003010301
> > Txt: 024A3A61A5B991858DB1D5880400D522CAEB2CD49082CAB12418400410B2AD49082CB312408B26D49082CAB12408B2CD49082CAB12418400410B2AD4
> >
> > What I get from Kannel:
> >
> > [from] => #####
> > [to] => 1##########
> > [text] => J:a������Ո\0�\"��,Ԑ�ʱ$@��I,�@�&Ԑ�ʱ$��I,�A�\0A*�
> > [smsc] => ####http
> > [coding] => 2
> > [udh] => �\0\0\0
> > [textbin] => %b
> > [worthless] => nothing?username=nada
> > [password] => nada
> >
> > I have a function that gets it close (taking each character and trying to
> > convert it to its binary then hex format, taking in account \0 is a null),
> > but not exact.
> >
> > This is as close as I get:
> >
> > [udh] => 0B05040F5100000003010301
> > OrigUDH: 0B0504158100000003010301
> >
> > [text] => 0204033D00005B550800005804000000000002005A520000181228040A0000310802000C28081A005A52000018080000310802000C29540029000200
> > OrigTxt: 024A3A61A5B991858DB1D5880400D522CAEB2CD49082CAB12418400410B2AD49082CB312408B26D49082CAB12408B2CD49082CAB12418400410B2AD4
> >
> > Any suggestions? Here's my function that I use to parse:
>
> first of all, please _do NOT_ crosspost to mailing lists. We consider
> this abuse. ;)
Whoops. Ok, I'll remove users as I think this is more a devel-level
question.
> Ok, now regarding the question itself. Unfortunatly it's a bit to
> "unspecified" in terms of what szenario you are trying to solve. Could
> you please outline a bit more in details what you are trying to do?!
Sorry. I have a single SMS message (ok, multiple, but lets just deal with
one for now) that has a UDH and a binary body. Using 1.3.1.
I'm using an HTTP relay connection to an SMSC. The URL I use is this:
http://222.22.222.222/smschttp.php?from=%p&to=%P&text=%a&smsc=%i&coding=%c&udh=%u&textbin=%b&worthless=nothing
The worthless=nothing is there because the url called attaches
?username=xxx&password=yyy at the end.
When I get the UDH and the TEXT of the message passed to me, it is already
in ASCII, which I then need to convert back into 0x00 characters so I can
pass it to the SMSC.
The problem is that either I'm converting wrong or something else from the
ASCII version kannel passes to the URL, or I'm using the send-url wrong.
Either way, a UDH in of 0B05041581... comes out 0B05040F51... and a whole
bunch of other weird stuff.
Has anyone taken a binary message from kannel HTTP and gotten things to
work?
Beckman
> At least I didn't get the point... or am I missing the obvious? ;)
>
> Stipe
>
> mailto:stolj_{at}_wapme.de
> -------------------------------------------------------------------
> Wapme Systems AG
>
> Vogelsanger Weg 80
> 40470 Düsseldorf, NRW, Germany
>
> phone: +49.211.74845.0
> fax: +49.211.74845.299
>
> mailto:info_{at}_wapme-systems.de
> http://www.wapme-systems.de/
> -------------------------------------------------------------------
>
> -----BEGIN PGP PUBLIC KEY BLOCK-----
> Version: GnuPG v1.2.2 (Cygwin)
>
> mIsEP6mcYwEEAMDnUiUwrbb+xwTFWN6TxF2+XZu7/alwJMeCwMBRvXtPZqfjpPhS
> OkBpU0F4TrVuugz1HINTSaJTYq10AzDQXp5NkyWgckqW79nPAWuOX0dicbJk+cN2
> nM2TI4KaxUDe6u8hghNEnH/i2lXsUu9apnP/iixzV81VC2je3uc9hZpnAAYptEVT
> dGlwZSBUb2xqIChUZWNobm9sb2d5IENlbnRlciAmIFJlc2VhcmNoIExhYikgPHRv
> bGpAd2FwbWUtc3lzdGVtcy5kZT6ItAQTAQIAHgUCP6mcYwIbAwYLCQgHAwIDFQID
> AxYCAQIeAQIXgAAKCRABV0w1BqPYRuSqA/wPzsQxao2YePENCtgRTrO86U6zg3sl
> OcS6CJFI4FZP5h/xD3GRsNH1+MPSvZlomDdpFnr547DGz/Kq9MXuQwVvlVig5yWZ
> K5dtKp1r5YLhxJQBhfirZbRFFnYmf19f18J8OoS28tuFVftDl1AIwJS3HLyBTv6H
> g2HyLAEKQIp30Q==
> =aYCI
> -----END PGP PUBLIC KEY BLOCK-----
>
---------------------------------------------------------------------------
Peter Beckman Internet Guy
[email protected] http://www.purplecow.com/
---------------------------------------------------------------------------