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








<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On May 17th, 2012, 12:26 p.m., <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/1925/diff/1/?file=28014#file28014line687" style="color: black; font-weight: bold; text-decoration: underline;">/certified/branches/1.8.11/channels/chan_sip.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 const struct sip_reasons {</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">687</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="p">{</span> <span class="n">AST_REDIRECTING_REASON_SEND_TO_VM</span><span class="p">,</span> <span class="s">&quot;send_to_vm&quot;</span><span class="p">},</span></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;">Not sure if we have a choice in the matter, but to follow the nomenclature of other redirecting reasons, this should probably be &quot;send-to-vm&quot;</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;">I can&#39;t make this change here since this is what the Digium phones send as their reason parameter for sending to voicemail.</pre>
<br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On May 17th, 2012, 12:26 p.m., <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/1925/diff/1/?file=28016#file28016line1206" style="color: black; font-weight: bold; text-decoration: underline;">/certified/branches/1.8.11/main/callerid.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 const struct ast_value_translation redirecting_reason_types[] = {</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">1206</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="p">{</span> <span class="n">AST_REDIRECTING_REASON_SEND_TO_VM</span><span class="p">,</span>     <span class="s">&quot;send_to_vm&quot;</span><span class="p">,</span>   <span class="s">&quot;Call is being redirected to user&#39;s voicemail&quot;</span><span class="p">},</span></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;">And same finding here.</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;">I could make the change here, but it actually seems inconsistent. The &quot;time_of_day&quot;, &quot;out_of_order&quot;, and &quot;cf_date&quot; values in this table all use underscores instead of hyphens for separating words.</pre>
<br />




<p>- Mark</p>


<br />
<p>On May 17th, 2012, 9:54 a.m., Mark Michelson wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/media/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, Jason Parker and Matt Jordan.</div>
<div>By Mark Michelson.</div>


<p style="color: grey;"><i>Updated May 17, 2012, 9:54 a.m.</i></p>




<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;">Digium phones have a couple of ways to send calls to voicemail.

On an incoming call, a call may be diverted to either the user&#39;s own, or to another user&#39;s, voicemail using the &quot;send to vm&quot; softkey.
On an bridged call, a user may select a contact and press the &quot;transfer vm&quot; key in order to blind transfer the call to the contact&#39;s voicemail.

Contrary to the way this is likely done in other Asterisk installations, sending a call to a contact&#39;s voicemail does not send the call to a different extension than would be used for dialing the contact. Instead, something must be available in the dialplan to distinguish an incoming call that is intended for a phone vs. an incoming call that is intended for voicemail.

The mechanism by which this is accomplished is via a Diversion header&#39;s reason parameter. When a call is being sent to voicemail, the reason parameter will be set to &quot;send_to_vm&quot;.

For the first case, on a redirected incoming call, the Diversion header is in the 302 response sent from the Digium phone.
The second case is a bit unorthodox, but from our readings, not harmful or non-compliant. In the second case, the Diversion header is in the REFER request sent from the Digium phone when it performs its blind transfer.

The changes to Asterisk are minimal here. First, the AST_REDIRECTING_REASON_SEND_TO_VM value had to be defined in callerid.h, and its string value and definition had to be added to a table in callerid.c. Finally, parsing of the Diversion header had to be added to handle_request_refer() in chan_sip.c</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;">Testing is posted as a separate review: https://reviewboard.asterisk.org/r/1926</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>/certified/branches/1.8.11/channels/chan_sip.c <span style="color: grey">(366547)</span></li>

 <li>/certified/branches/1.8.11/include/asterisk/callerid.h <span style="color: grey">(366547)</span></li>

 <li>/certified/branches/1.8.11/main/callerid.c <span style="color: grey">(366547)</span></li>

</ul>

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




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








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