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


<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.</div>
<div>By gareth.</div>


<p style="color: grey;"><i>Updated Sept. 10, 2012, 11:12 p.m.</i></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Changes</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;">Updated patch to latest version and added support for setting variables configured with setvar=.

A patch for functions that call autoservice was submitted in ASTERISK-20283.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description  (updated)</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 is the second part split out from the much larger patch at https://reviewboard.asterisk.org/r/1976/ - this part contains the code required to get the phone to restart or reset from a SIP NOTIFY requuest:

- Add ${} parsing for sip_notify.conf, PEERNAME variable contains the name of the peer being sent the notification.

- Allows the user to specify their own Subscription-State header as the Cisco phones require &#39;active&#39; instead of &#39;terminated&#39;.

There are probably other uses for this especially when paired with using Content =&gt; ${SHELL(/path/to/script &quot;${PEERNAME}&quot;)} etc. 

Note: Using SHELL() and CURL() emit errors here because they try to start autoservice on the channel. Not sure what the best fix for that is, maybe checking for dummy channels ast_autoservice_{start|stop} and treating it as a no-op.

Addendum: I submitted a patch to fix the above problem: ASTERISK-20283.</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;">Sent a few notifications to a peer containing ${} contructs.</pre>
  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> (updated)</h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>/trunk/CHANGES <span style="color: grey">(372831)</span></li>

 <li>/trunk/UPGRADE-11.txt <span style="color: grey">(372831)</span></li>

 <li>/trunk/channels/chan_sip.c <span style="color: grey">(372831)</span></li>

 <li>/trunk/configs/sip_notify.conf.sample <span style="color: grey">(372831)</span></li>

</ul>

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




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




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