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










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On September 30th, 2013, 5:52 p.m. UTC, <b>jrose</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/2892/diff/1/?file=46891#file46891line55" style="color: black; font-weight: bold; text-decoration: underline;">/branches/12/contrib/ast-db-manage/config/versions/4da0c5f79a9c_create_tables.py</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </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">55</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">PJSIP_CID_PRIVACY_VALUES = ['allowed_not_screened', 'allowed_passed_screened',</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">56</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                            'allowed_failed_screened', 'allowed',</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">57</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                            'prohib_not_screened', 'prohib_passed_screened',</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;">So... I'm beginning to wonder if it wouldn't be better to have the PJSIP alembic scripts separated from all of this random assortment of stuff. Take the ODBC voicemail configuration for example.  It lives in a separate alembic configuration from the config stuff and has separate version numbers and such. I'm going to bring Russell in on this review and ask his opinion.</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;">In short, maybe.  I'll explain my logic for the split that's here.  My thinking was that storing your voicemail in a database is a completely different use case from wanting to store your configuration in the database.  If you're storing your config in the db, I also assumed you would be storing all/most of your config there, so it made sense to just create all of the configuration tables together.

Following that logic, putting it where you have it makes sense.  It's what I would do.  

Also note that at some point you have to stop changing the initial migration script and only make additional changes with new migration scripts.  Basically, as soon as you expect anyone may have run this in production, you should start making new migrations.</pre>
<br />




<p>- Russell</p>


<br />
<p>On September 30th, 2013, 5:52 p.m. UTC, jrose 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.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 Russell Bryant.</div>
<div>By jrose.</div>


<p style="color: grey;"><i>Updated Sept. 30, 2013, 5:52 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/ASTERISK-22133">ASTERISK-22133</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;">Part of an effort to document the usage of realtime with PJSIP. This includes the ability to automatically build database tables for Endpoints, AORs, Authentication profiles, domain aliases, and endpoint identifiers. There also also some example configuration changes which provide linkage though sorcery.conf and extconfig.conf.  The extconfig samples assume ODBC is used, but they can be changed to any of the other back-ends fairly trivially for anyone who knows how to use them anyway.

A wiki page will also be written for this issue.</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;">Generated the database tables with the alembic script
Made PJSIP calls using realtime endpoints and AORs
Tested that auths were created and could be read using the realtime backend provided by sorcery by means of a hastily chopped together CLI command (not included in the patch).  Domain aliases and endpoint identifier IPs haven't been directly tested, but the concept is the same.</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/configs/extconfig.conf.sample <span style="color: grey">(399662)</span></li>

 <li>/branches/12/configs/sorcery.conf.sample <span style="color: grey">(399662)</span></li>

 <li>/branches/12/contrib/ast-db-manage/config/versions/4da0c5f79a9c_create_tables.py <span style="color: grey">(399662)</span></li>

</ul>

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







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








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