Olivier
2009-Apr-07 09:41 UTC
[asterisk-users] OT - SIP MESSAGE, newline chars and formatting
Hi, I'm using a SIP phone (Thomson ST2030) which is able to display text received though Asterisk's SendText() application. I'm using this to display from Asterisk "Forwarded to 0123456789" whenever a user forwards his calls to another number or extension. Test is displayed with white letters on black background. What I can't do at the moment is erasing this "Forwarded to 0123456789" text when user cancels previous forwarding. If I'm sending a string full of space chars, I've got an ugly string of black rectangles on LCD screen. Phone vendor says it can be done sending a "single carriage return" string to the phone (using usual SendText, I suppose) but either : A- I can't build correctly such "single carriage return" string, B- I can't send it (I shouldn't use SendText()), C- or I misunderstood vendor's advice. When setting an AEL2 variable with "Hello\rWorld"-like string value, I can see this string passed in SIP MESSAGE like this : Content-Type: text/plain Content-Length: 12 Hello\rWorld Unfortunately, this string (and other variations) are literally displayed (I hoped to use \r to erase Hello word and see only the remaning World on my phone screen). Is there a way to format text embedded in SIP MESSAGES or work around this ? Any hint or advice ? Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090407/f364a4d0/attachment.htm
Matt Riddell
2009-Apr-09 03:44 UTC
[asterisk-users] OT - SIP MESSAGE, newline chars and formatting
On 7/04/2009 9:41 p.m., Olivier wrote:> Hi, > > I'm using a SIP phone (Thomson ST2030) which is able to display text > received though Asterisk's SendText() application. > > I'm using this to display from Asterisk "Forwarded to 0123456789" whenever a > user forwards his calls to another number or extension. > Test is displayed with white letters on black background. > > What I can't do at the moment is erasing this "Forwarded to 0123456789" text > when user cancels previous forwarding. > If I'm sending a string full of space chars, I've got an ugly string of > black rectangles on LCD screen. > > Phone vendor says it can be done sending a "single carriage return" string > to the phone (using usual SendText, I suppose) but either : > A- I can't build correctly such "single carriage return" string, > B- I can't send it (I shouldn't use SendText()), > C- or I misunderstood vendor's advice.Have you tried with \r\n, \n, or even maybe <br /> and <br> -- Kind Regards, Matt Riddell Director _______________________________________________ http://www.venturevoip.com (Great new VoIP end to end solution) http://www.venturevoip.com/news.php (Daily Asterisk News - html) http://www.venturevoip.com/newrssfeed.php (Daily Asterisk News - rss)