<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/2964/">https://reviewboard.asterisk.org/r/2964/</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;">This is one of those features that I'm not really familiar with, so I don't know how widespread it is nor if it's implemented "correctly" (correctly is in quotation marks since there's no RFC for this behavior).

What's here mostly looks good. I would suggest only registering the endpoint identifier if any outbound registrations have "line" options set. The container retrieval from sorcery could be expensive, especially if it's going to always fail.

I also would recommend adding an integrity check for registration objects so that if a line is provided with no endpoint (or vice-versa), then a warning is emitted and the registration is not created.</pre>
 <br />









<p>- Mark</p>


<br />
<p>On October 26th, 2013, 1:55 p.m. UTC, Joshua Colp 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.</div>
<div>By Joshua Colp.</div>


<p style="color: grey;"><i>Updated Oct. 26, 2013, 1:55 p.m.</i></p>









<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;">This patch adds "virtual line" support to the res_pjsip_outbound_registration module. This is an optional feature and simply adds a "line" URI parameter to the Contact we place in the outbound registration. If this line parameter is present on incoming requests we use it to establish a relationship to the outbound registration and match it to a user configured endpoint. This has the benefit that when registering to another server where it is supported you no longer have to do IP based matching for all of their potential servers. The downside (and why this is optional) is that if a third party got the line parameter they could send you calls as if they were the legit remote server.</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;">Registered to an ITSP, placed an inbound call from them, confirmed matched using line parameter.

Registered to a chan_sip instance, placed an inbound call from it, confirmed matched using line parameter.</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/12/res/res_pjsip_outbound_registration.c <span style="color: grey">(401280)</span></li>

</ul>

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







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








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