<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/3447/">https://reviewboard.asterisk.org/r/3447/</a>
     </td>
    </tr>
   </table>
   <br />










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On April 17th, 2014, 4:06 p.m. CDT, <b>Matt Jordan</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="https://reviewboard.asterisk.org/r/3447/diff/3/?file=57618#file57618line15" style="color: black; font-weight: bold; text-decoration: underline;">/branches/1.8/CHANGES</a>
    <span style="font-weight: normal;">

     (Diff revision 3)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">15</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">SIP Changes</pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">16</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">-----------</pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">17</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> * SIP peers can now specify 'trust_id_outbound' which affects RPID/PAI</pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">18</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">   fields for prohibited callingpres information. If a peer is set to be</pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">19</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">   trusted with this setting, then caller ID information in Remote-Party-ID</pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">20</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">   and P-Asserted-Identity fields will not be anonymized to the recipient. In</pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">21</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">   the case of P-Asserted-Identity, a Privacy: id header will be appended as</pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">22</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">   well. If a peer is set not to be trusted, then PAI/RPID are omitted when</pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">23</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">   the remote party has prohibited callingpres information. By default,</pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">24</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">   legacy mode is used which leaves the behavior unchanged from 1.8.26.1</pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">25</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Update this description to be explicit about what the settings are:

If a peer is set with 'trust_id_outbound=no', etc.</pre>
 </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"> * SIP peers can now specify 'trust_id_outbound' which affects RPID/PAI
   fields for prohibited callingpres information. Values are legacy, no, and
   yes. By default, legacy is used.
   trust_id_outbound=legacy: behavior remains the same as 1.8.26.1 - When
   dealing with prohibited callingpres, RPID/PAI headers are created for both
   sendrpid=pai and sendrpid=rpid are appended, but the data is anonymized.
   trust_id_outbound=no: when dealing with prohibited callingpres, RPID/PAI
   headers are not sent.
   trust_id_outbound=yes: RPID/PAI headers are applied with the full
   remote party information in tact even for prohibited callingpres
   information. In the case of PAI, a Privacy: id header will be appended for
   prohibited calling information to communicate that the private information
   should not be relayed to untrusted parties.</pre>
<br />




<p>- Jonathan</p>


<br />
<p>On April 17th, 2014, 3:25 p.m. CDT, Jonathan Rose wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Asterisk Developers, Joshua Colp, Matt Jordan, Mark Michelson, and wdoekes.</div>
<div>By Jonathan Rose.</div>


<p style="color: grey;"><i>Updated April 17, 2014, 3:25 p.m.</i></p>







<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/jira/browse/AST-1301">AST-1301</a>, 

 <a href="https://issues.asterisk.org/jira/browse/ASTERISK-19465">ASTERISK-19465</a>


</div>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
Asterisk
</div>


<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;">Walter Doekes pointed out that this might cause a less than ideal situation in which people who were expecting P-Asserted-Identity not to disclose party information will now be sending privacy information, so I pulled this patch from 1.8-trunk and we will now review it here.

Without this patch, P-Asserted-Identity would always use anonymous for the caller ID information, and RFC-3325 seems to indicate that P-Asserted-Identity is something that should not be anonymized, but also only sent to trusted parties. The way this was presented to me, the intent here is that if you set callerpres to prohibited for a peer that receives P-Asserted-Identity, the P-Asserted-Identity shouldn't be anonymized, only the normal From/Contact headers would be anonymized. This apparently 

The obvious method for dealing with this mid-release change is to make the change into an option which defaults off in 1.8-12 while defaulting on in trunk. Also I'll need to add Upgrade notes for trunk since this might not always be a desired behavior as well as CHANGES notes throughout to indicate the new option if that's what we settle on.</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;">Call from SIP peer A to SIP peer B
settings for both peers:
sendrpid = pai
callerpres = prohib



Invite sent from Asterisk to the recipient of the call
------------------------------------------------------
Prior to patch:

Audio is at 19640
Adding codec 0x4 (ulaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to 10.24.18.240:5060:
INVITE sip:123@10.24.18.240:5060 SIP/2.0
Via: SIP/2.0/UDP 10.24.18.246:5060;branch=z9hG4bK2fb42910;rport
Max-Forwards: 70
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=as13075548
To: <sip:123@10.24.18.240:5060>
Contact: <sip:anonymous@10.24.18.246:5060>
Call-ID: 762b8a5e5848d7997f38f71a770d4dd9@10.24.18.246:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX SVN-branch-1.8-r410380
Date: Tue, 11 Mar 2014 22:59:39 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
P-Asserted-Identity: "Anonymous" <sip:anonymous@anonymous.invalid>
Content-Type: application/sdp
Content-Length: 276

v=0
o=root 473543868 473543868 IN IP4 10.24.18.246
s=Asterisk PBX SVN-branch-1.8-r410380
c=IN IP4 10.24.18.246
t=0 0
m=audio 19640 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv



After patch:

Audio is at 11822
Adding codec 0x4 (ulaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to 10.24.18.240:5060:
INVITE sip:123@10.24.18.240:5060 SIP/2.0
Via: SIP/2.0/UDP 10.24.18.246:5060;branch=z9hG4bK5d4a7db8;rport
Max-Forwards: 70
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=as181a14e3
To: <sip:123@10.24.18.240:5060>
Contact: <sip:anonymous@10.24.18.246:5060>
Call-ID: 721bef28208f7633288e929c6e88824e@10.24.18.246:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX SVN-branch-1.8-r410380M
Date: Tue, 11 Mar 2014 22:57:39 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
P-Asserted-Identity: "Goldy Locks" <sip:6018@10.24.18.246>
Privacy: id
Content-Type: application/sdp
Content-Length: 279

v=0
o=root 1606369071 1606369071 IN IP4 10.24.18.246
s=Asterisk PBX SVN-branch-1.8-r410380M
c=IN IP4 10.24.18.246
t=0 0
m=audio 11822 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv</pre>
  </td>
 </tr>
</table>


<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/configs/sip.conf.sample <span style="color: grey">(412438)</span></li>

 <li>/branches/1.8/channels/sip/include/sip.h <span style="color: grey">(412438)</span></li>

 <li>/branches/1.8/channels/chan_sip.c <span style="color: grey">(412438)</span></li>

 <li>/branches/1.8/CHANGES <span style="color: grey">(412438)</span></li>

</ul>

<p><a href="https://reviewboard.asterisk.org/r/3447/diff/" style="margin-left: 3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>