[asterisk-users] AEL2, BASE64_DECODE and hexadecimal

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Thu Apr 9 11:42:15 CDT 2009


On Thursday 09 April 2009 10:14:12 Tilghman Lesher wrote:
> On Thursday 09 April 2009 04:28:16 Olivier wrote:
> > 2009/4/8 Tilghman Lesher <tilghman at mail.jeffandtilghman.com>
> >
> > > On Tuesday 07 April 2009 23:38:08 Olivier wrote:
> > > > 2009/4/7 Mark Michelson <mmichelson at digium.com>
> > > >
> > > > > Philipp Kempgen wrote:
> > > > > > BTW (developer's question) is there a reason why SendText() resp.
> > > > > > sendtext_exec() refuses to send zero-length data?
> > > > >
> > > > > I can't point to any specific reason. I assume that whoever wrote
> > > > > the application probably thought that attempting to send
> > > > > zero-length data
> > >
> > > was
> > >
> > > > > pointless and that if no data were passed to the application, it
> > > > > likely was due
> > > > > to an error by the user.
> > > >
> > > > The phone I'm working on (Thomson ST2030) would display in slow
> > > > blinking, inversed letters (white on black) any text received in SIP
> > > > MESSAGE. Display duration is unlimited.
> > > > To erase an old message, you must send a single carriage return (or
> > > > maybe an empty string).
> > > >
> > > > I'm wondering how many phones behave like this ?
> > > >
> > > > Maybe, sendtext should then be refactored to accommodate this.
> > >
> > > What does the phone do when you send a single space?
> >
> > It would display it as a black rectangle : as unfortunately, this phone
> > displays text in inversed color (white letters on black background), a
> > single space remains visible.
> >
> > It seems I really need to send a carriage return ($0D in hexa) but I
> > couldn't find a way to pass such string using SendText.
> >
> > As suggested earlier, maybe an empty SIP MESSAGE would do the trick but
> > as SendText rejects empty strings, I've not tested it yet. For that,
> > maybe I could try to build my own custom SIP MESSAGE, faking a true SIP
> > MESSAGE to double check if an empty string would be acceptable solution ?
> >
> > (Note, that sending a carriage return must work as vendor handed to me a
> > Wireshark capture for a "working SIP MESSAGE")
>
> I suspect not.  You really need to send an empty message; that is, a
> message with a content-length of 0.  A message containing a carriage return
> would still have a content-length of 1 and would confuse the phone at
> worst, and display an unprintable character, at best.
>
> You could send an empty message in SendText with SendText(,), but chan_sip
> still doesn't allow the empty message, so a code change is still necessary.

Fixed in 1.4 in changeset 187362.

-- 
Tilghman



More information about the asterisk-users mailing list