<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 />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On August 17th, 2012, 1:06 a.m., <b>Olle E Johansson</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">You could consider the option of supporting channel variables set with the setvar= option in the device configuration in sip.conf. Just an idea.</pre>
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Done. I initially avoided doing this a those variables can be accessed with ${SIPPEER(${PEERNAME},chanvar[SOME_VAR_NAME])} but that can be a little clunky.</pre>
<br />
<p>- gareth</p>
<br />
<p>On September 10th, 2012, 11:12 p.m., gareth 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.</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;">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 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 'active' instead of 'terminated'.
There are probably other uses for this especially when paired with using Content => ${SHELL(/path/to/script "${PEERNAME}")} 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> </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>