<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://reviewboard.asterisk.org/r/1235/">https://reviewboard.asterisk.org/r/1235/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I'm sorry to have to be a pain in the ass.
RFC3261 25.1, page 221:
[...] In quoted strings, quotation marks (") and
backslashes (\) need to be escaped.
quoted-string = SWS DQUOTE *(qdtext / quoted-pair ) DQUOTE
qdtext = LWS / %x21 / %x23-5B / %x5D-7E
/ UTF8-NONASCII
Your version does not escape backslashes. (Yes, I only mentioned double-quotes in my previous post, sorry about that.)
I would suggest a more generic ast_backslace_escape function, taking an *input, *output, and *chars_to_escape, where chars_to_escape = "\"\\".
Otherwise the patch looks good.</pre>
<br />
<p>- wdoekes</p>
<br />
<p>On May 31st, 2011, 11:22 a.m., jrose wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.orgrb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Asterisk Developers, Russell Bryant and David Vossel.</div>
<div>By jrose.</div>
<p style="color: grey;"><i>Updated 2011-05-31 11:22:36</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Under SIP pedantic mode, this function was encoding strings meant for the display name into into a URI safe format when this was not specified in the SIP RFCs. I also took the liberty of adding a little commentary.
pedantic mode was the default in Asterisk 1.8+</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">A number of different calls with user names including more interesting UTF-8 characters from a variety of characters from a variety of sources including trema (like German umlaut characters), Kanji (Japanese pictographic characters), Sanskrit (phonetic characters for one of India's languages), and Cyrillic (Russian). Whether or not they'll display properly depends on the receiving phone... My Grandstream phone doesn't like the higher end UTF-8 characters, but all of my soft phones read them fine.
Testing involved a manually set DAHDI channel to have odd caller ID and an incoming call from another Asterisk Box sending SIP from a phone set to also have a display name with high UTF-8 chars.</pre>
</td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="https://issues.asterisk.org/view.php?id=18298">18298</a>
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>/branches/1.8/channels/chan_sip.c <span style="color: grey">(321510)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/1235/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>