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



 <p>Ship it!</p>



 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Just minor nits. Ship it!</pre>
 <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/4008/diff/1/?file=67436#file67436line1060" style="color: black; font-weight: bold; text-decoration: underline;">/branches/12/channels/chan_pjsip.c</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

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

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">static int update_connected_line_information(void *data)</pre></td>

  </tr>
 </tbody>



 
 

 <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">1060</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">generate_new_sdp</span> <span class="o">=</span> <span class="p">(</span><span class="n">method</span> <span class="o">==</span> <span class="n">AST_SIP_SESSION_REFRESH_METHOD_INVITE</span><span class="p">)</span> <span class="o">?</span> <span class="mi">1</span> <span class="o">:</span> <span class="mi">0</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;">The ternary operator is redundant here. Just do

generate_new_sdp = (method == AST_SIP_SESSION_REFRESH_METHO_INVITE);</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/4008/diff/1/?file=67437#file67437line757" style="color: black; font-weight: bold; text-decoration: underline;">/branches/12/res/res_pjsip_session.c</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

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

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">int ast_sip_session_refresh(struct ast_sip_session *session,</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">745</font></th>
    <td bgcolor="#fdfebc" 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">return</span> <span class="n">delay_request</span><span class="p">(</span><span class="n">session</span><span class="p">,</span> <span class="n">on_request_creation</span><span class="p">,</span> <span class="n">on_sdp_creation</span><span class="p">,</span> <span class="n">on_response</span><span class="p">,</span> <span class="s"><span class="hl">"INVITE"</span></span><span class="p"><span class="hl">,</span></span><span class="hl"> </span><span class="nb"><span class="hl">NULL</span></span><span class="p"><span class="hl">);</span></span></pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">757</font></th>
    <td bgcolor="#fdfebc" 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">return</span> <span class="n">delay_request</span><span class="p">(</span><span class="n">session</span><span class="p">,</span> <span class="n">on_request_creation</span><span class="p">,</span> <span class="n">on_sdp_creation</span><span class="p">,</span> <span class="n">on_response</span><span class="p">,</span><span class="ew"> </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;">There's a red blob at the end of this line.</pre>
</div>
<br />



<p>- Mark Michelson</p>


<br />
<p>On September 19th, 2014, 5:04 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 and Mark Michelson.</div>
<div>By Joshua Colp.</div>


<p style="color: grey;"><i>Updated Sept. 19, 2014, 5:04 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;">Currently it is possible for ast_sip_session_refresh to be called at times where the state of the dialog and INVITE session does not allow it to send a request. Trying to send a request actually results in an assertion within PJSIP. This change adds additional checks for deferral of these, stops generating new SDP on COLP UPDATEs, makes it so deferral does not always result in SDP generation, and ensures that after a provisional response that any pending UPDATE occurs.

* Note: Currently there is still a bug within pjproject which causes an UPDATE without SDP sent after a provisional response to cancel the pending SDP negotiation when it should not. This has been reported to Teluu and a fix is being worked 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;">Modified the dialing API to change callerID at certain points (after call but before handling responses, after handling responses). Confirmed that new code correctly defers sending COLP updates.</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_session.c <span style="color: grey">(423546)</span></li>

 <li>/branches/12/channels/chan_pjsip.c <span style="color: grey">(423546)</span></li>

</ul>

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







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








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