[asterisk-dev] Asterisk 1.8 and character sets

Klaus Darilion klaus.mailinglists at pernau.at
Fri Nov 12 02:41:53 CST 2010


I think you should open a bug report.

regards
klaus

Am 11.11.2010 01:25, schrieb Örn Arnarson:
> As far as I can tell, it seems to be perfectly valid to escape the
> characters, and reserved and control characters in URIs MUST be
> escaped according to the RFC. However, I don't understand why it's
> done on the display name.
>
> SIP is in UTF-8, and the escaped character is escaped as an UTF-8
> character (Ö becomes %C3%96 instead of %D6), so if the idea is to make
> it compatible with devices that don't understand UTF-8, it doesn't
> really make sense. It won't know how to display an escaped UTF-8
> character any better than it would if it were simply printed as it is.
>
> There was a big discussion on these changes that I found here:
> https://issues.asterisk.org/view.php?id=16299
>
> As far as I can tell, the intention was _NOT_ to URI encode the
> Display name, as oej pointed out:
> "Again, the display name should *NOT* be URI-encoded. Ever. It's not
> part of a URI."
>
> This, however, seems to be the case, and it doesn't seem like anyone
> addressed what he said prior to submitting the patch.
>
> I'm not entirely sure what the correct method of doing is this
> according to the RFC. In theory, escaping it should probably be fine
> (albeit unnecessary), but I'm not certain since the Display name isn't
> an URI, and is contained within "".
>
> What I do know, however, is that Asterisk 1.8 breaks displaying the
> caller-id name correctly on all Aastra terminals that I've tested in
> on. It also breaks it on Doro phones. I will try to test Linksys and
> Snom tomorrow, but I suspect it'll have the same results. I don't
> think the Display name is meant to be URI escaped. At the very least,
> it is completely unnecessary as SIP is already in UTF-8.
>
> Regards,
> Örn
>
> 2010/11/10 Klaus Darilion<klaus.mailinglists at pernau.at>:
>>
>>
>> On 03.11.2010 11:02, Örn Arnarson wrote:
>>>
>>> I sent this first to the Asterisk users list, but this question
>>> probably belongs on the dev list, so here goes:
>>>
>>> Caller-ID behavior is different -- now when I set the caller-id name
>>> to something with special characters (Ö, for example), the SIP INVITE
>>> now has %C3%96 instead of the Ö character. I've tried doing
>>> Set(CALLERID(name-charset)=utf8) as well as iso8859-1, but it's always
>>> the same behavior.
>>>
>>> Here's the header as it appears in 1.6.2.11 CLI output:
>>>
>>> INVITE sip:1502 at 192.168.10.169:5060;transport=udp SIP/2.0
>>> Via: SIP/2.0/UDP 192.168.10.3:5060;branch=z9hG4bK73713002;rport
>>> Max-Forwards: 70
>>> From: "SIP ehf/Örn Arnarson"<sip:7712552 at 192.168.10.3>;tag=as2813a8fe
>>> To:<sip:1502 at 192.168.10.169:5060;transport=udp>
>>> Contact:<sip:7712552 at 192.168.10.3>
>>>
>>> Here is the header with the same caller-id information in 1.8.0:
>>>
>>> INVITE sip:1502 at 192.168.10.169:5060;transport=udp SIP/2.0
>>> Via: SIP/2.0/UDP 192.168.10.3:5060;branch=z9hG4bK1ff411d7
>>> Max-Forwards: 70
>>> From: "SIP ehf/%C3%96rn Arnarson"<sip:7712552 at 192.168.10.3>;tag=as701c8835
>>> To:<sip:1502 at 192.168.10.169:5060;transport=udp>
>>> Contact:<sip:7712552 at 192.168.10.3:5060>
>>
>> Have you checked the RFC? I guess that UTF-8 is allowed in the display name,
>> but %-encoding may be allowed too.
>>
>> regards
>> klaus
>>



More information about the asterisk-dev mailing list