[asterisk-dev] [Code Review] Chan_Sip - In pedantic mode, allow all UTF-8 chars in Caller ID field.

jrose reviewboard at asterisk.org
Mon Apr 25 11:59:22 CDT 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1197/
-----------------------------------------------------------

Review request for Asterisk Developers.


Summary
-------

This is a patch submitted by Igor to resolve a URI encoding issue with pedantic mode.  Encoding the fromuser string isn't particularly appropriate to the URI since it eliminates non-ASCII UTF-8 characters, which are allowed according to RFC 3261.  Since ast_uri_encode is described as being "encoding agnostic", for the time being I have left this as is.  I'm not sure if it's especially safe though since there might be times with the fed string isn't UTF-8... in which case the SIP message might end up screwy.

Right now I'm wondering if it would be prudent to add another function to utils.h to drop characters that don't fit in UTF-8 and perform that on l instead of the function that got dropped here.


This addresses bug 18298.
    https://issues.asterisk.org/view.php?id=18298


Diffs
-----

  /branches/1.8/channels/chan_sip.c 314904 

Diff: https://reviewboard.asterisk.org/r/1197/diff


Testing
-------

Patch off:
SIP general context set to pedantic mode.
Created a DAHDI group with caller ID = "Örn Örnyman"
Used phone connected to Örn Örnyman to dial a second asterisk box (with sip debug) through SIP.
Caller ID in from field was escaped at the Ös (Something like %C396) on SIP debug

Patch on:
Same as above, except from field came out as:
From: "Örn Örnyman" <sip:asterisk at 10.24.20.132>;tag=as13dc4c39

Note though that on my crumby grandstream phone the final caller id output was:
Ãrn Ãrnyman (c383 by unicode standards, but it is probably just the phone being stupid.)


Thanks,

jrose

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110425/0f6401c9/attachment.htm>


More information about the asterisk-dev mailing list