<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/3976/">https://reviewboard.asterisk.org/r/3976/</a>
</td>
</tr>
</table>
<br />
<div>
<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/3976/diff/4/?file=67415#file67415line61" style="color: black; font-weight: bold; text-decoration: underline;">branches/12/res/res_pjsip_phoneprov_provider.c</a>
<span style="font-weight: normal;">
(Diff revision 4)
</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">61</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm"><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span>section defined in pjsip.conf. Each section identifies</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><filename>pjsip.conf</filename></pre>
</div>
<br />
<div>
<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/3976/diff/4/?file=67415#file67415line125" style="color: black; font-weight: bold; text-decoration: underline;">branches/12/res/res_pjsip_phoneprov_provider.c</a>
<span style="font-weight: normal;">
(Diff revision 4)
</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">125</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="k">struct</span> <span class="n">ast_sorcery</span> <span class="o">*</span><span class="n">sorcery</span><span class="p">;</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Shouldn't this be static?</pre>
</div>
<br />
<div>
<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/3976/diff/4/?file=67415#file67415line198" style="color: black; font-weight: bold; text-decoration: underline;">branches/12/res/res_pjsip_phoneprov_provider.c</a>
<span style="font-weight: normal;">
(Diff revision 4)
</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">198</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="tb"> </span><span class="n">var</span> <span class="o">=</span> <span class="n">ast_variable_new</span><span class="p">(</span><span class="n">pvar</span><span class="o">-></span><span class="n">name</span><span class="p">,</span> <span class="n">pvar</span><span class="o">-></span><span class="n">value</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">var is not checked for NULL allocation failure</pre>
</div>
<br />
<div>
<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/3976/diff/4/?file=67415#file67415line215" style="color: black; font-weight: bold; text-decoration: underline;">branches/12/res/res_pjsip_phoneprov_provider.c</a>
<span style="font-weight: normal;">
(Diff revision 4)
</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">215</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="n">RAII_VAR</span><span class="p">(</span><span class="k">struct</span> <span class="n">ast_sip_auth</span> <span class="o">*</span><span class="p">,</span> <span class="n">auth</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">,</span> <span class="n">ao2_cleanup</span><span class="p">);</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">auth doesn't need to be a RAII_VAR as there is only one place where the cleanup would have any effect.</pre>
</div>
<br />
<div>
<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/3976/diff/4/?file=67415#file67415line303" style="color: black; font-weight: bold; text-decoration: underline;">branches/12/res/res_pjsip_phoneprov_provider.c</a>
<span style="font-weight: normal;">
(Diff revision 4)
</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">303</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="k">if</span> <span class="p">(</span><span class="n">load_endpoint</span><span class="p">(</span><span class="n">id</span><span class="p">,</span> <span class="n">endpoint_name</span><span class="p">,</span> <span class="n">pp</span><span class="o">-></span><span class="n">vars</span><span class="p">,</span> <span class="n">port_string</span><span class="p">))</span> <span class="p">{</span></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">304</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="k">return</span> <span class="o">-</span><span class="mi">1</span><span class="p">;</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">pp is ref leaked
i iterator is not destroyed</pre>
</div>
<br />
<div>
<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/3976/diff/4/?file=67415#file67415line335" style="color: black; font-weight: bold; text-decoration: underline;">branches/12/res/res_pjsip_phoneprov_provider.c</a>
<span style="font-weight: normal;">
(Diff revision 4)
</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">335</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">stray blank line</pre>
</div>
<br />
<p>- rmudgett</p>
<br />
<p>On September 18th, 2014, 7:55 p.m. CDT, George Joseph 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 George Joseph.</div>
<p style="color: grey;"><i>Updated Sept. 18, 2014, 7: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 module allows res_pjsip to integrate with res_phoneprov and depends on the res_phoneprov refactor (r3970).
A new pjsip.conf object is defined by this module...
;============EXAMPLE PHONEPROV CONFIGURATION================================
; Before configuring provisioning here, see the documentation for res_phoneprov
; and configure phoneprov.conf appropriately.
; For each user to be autoprovisioned, a [phoneprov] configuration section
; must be created. At a minimum, the 'type', 'PROFILE' and 'MAC' variables must
; be set. All other variables are optional.
; Example:
;[1000]
;type=phoneprov ; must be specified as 'phoneprov'
;endpoint=1000 ; Required only if automatic setting of
; USERNAME, SECRET, DISPLAY_NAME and CALLERID
; are needed.
;PROFILE=digium ; required
;MAC=deadbeef4dad ; required
;SERVER=myserver.example.com ; A standard variable
;TIMEZONE=America/Denver ; A standard variable
;MYVAR=somevalue ; A user confdigured variable
; If the phoneprov sections have common variables, it is best to create a
; phoneprov template. The example below will produce the same configuration
; as the one specified above except that MYVAR will be overridden for
; the specific user.
; Example:
;[phoneprov_defaults](!)
;type=phoneprov ; must be specified as 'phoneprov'
;PROFILE=digium ; required
;SERVER=myserver.example.com ; A standard variable
;TIMEZONE=America/Denver ; A standard variable
;MYVAR=somevalue ; A user configured variable
;[1000](phoneprov_defaults)
;endpoint=1000 ; Required only if automatic setting of
; USERNAME, SECRET, DISPLAY_NAME and CALLERID
; are needed.
;MAC=deadbeef4dad ; required
;MYVAR=someOTHERvalue ; A user confdigured variable
; To have USERNAME and SECRET automatically set, the endpoint
; specified here must in turn have an outbound_auth section defined.
; Fuller example:
;[1000]
;type=endpoint
;outbound_auth=1000-auth
;callerid=My Name <8005551212>
;transport=transport-udp-nat
;[1000-auth]
;type=auth
;auth_type=userpass
;username=myname
;password=mysecret
;[phoneprov_defaults](!)
;type=phoneprov ; must be specified as 'phoneprov'
;PROFILE=someprofile ; required
;SERVER=myserver.example.com ; A standard variable
;TIMEZONE=America/Denver ; A standard variable
;MYVAR=somevalue ; A user configured variable
;[1000](phoneprov_defaults)
;endpoint=1000 ; Required only if automatic setting of
; USERNAME, SECRET, DISPLAY_NAME and CALLERID
; are needed.
;MAC=deadbeef4dad ; required
;MYVAR=someUSERvalue ; A user confdigured variable
;LABEL=1000 ; A standard variable
; The previous sections would produce a template substitution map as follows:
;MAC=deadbeef4dad ;added by pp1000
;USERNAME=myname ;automatically added by 1000-auth username
;SECRET=mysecret ;automatically added by 1000-auth password
;PROFILE=someprofile ;added by defaults
;SERVER=myserver.example.com ;added by defaults
;SERVER_PORT=5060 ;added by defaults
;MYVAR=someUSERvalue ;added by defaults but overdidden by user
;CALLERID=8005551212 ;automatically added by 1000 callerid
;DISPLAY_NAME=My Name ;automatically added by 1000 callerid
;TIMEZONE=America/Denver ;added by defaults
;TZOFFSET=252100 ;automatically calculated by res_phoneprov
;DST_ENABLE=1 ;automatically calculated by res_phoneprov
;DST_START_MONTH=3 ;automatically calculated by res_phoneprov
;DST_START_MDAY=9 ;automatically calculated by res_phoneprov
;DST_START_HOUR=3 ;automatically calculated by res_phoneprov
;DST_END_MONTH=11 ;automatically calculated by res_phoneprov
;DST_END_MDAY=2 ;automatically calculated by res_phoneprov
;DST_END_HOUR=1 ;automatically calculated by res_phoneprov
;ENDPOINT_ID=1000 ;automatically added by this module
;AUTH_ID=1000-auth ;automatically added by this module
;TRANSPORT_ID=transport-udp-nat ;automatically added by this module
;LABEL=1000 ;added by user
</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;">I'm already starting to convert sip peers to pjsip endpoints with no change to my Grandstream templates.
</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_phoneprov_provider.c <span style="color: grey">(PRE-CREATION)</span></li>
<li>branches/12/configs/pjsip.conf.sample <span style="color: grey">(423501)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/3976/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>