<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/2172/">https://reviewboard.asterisk.org/r/2172/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">@matt: I did not require anything or refer to any policy. Please calm down.
Now, do we parse incoming Require: headers to our INVITE? That part is also in my code. If the other side does NOT add a Require header we're running stand-alone mode, but can still activate session timers. If the other side adds a Require header, we're in the play.</pre>
<br />
<p>- Olle E</p>
<br />
<p>On October 31st, 2012, 11:05 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.</div>
<div>By Mark Michelson.</div>
<p style="color: grey;"><i>Updated Oct. 31, 2012, 11:05 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;">This patch makes it so Asterisk adds Require: timer when appropriate when sending INVITE responses.
If session timers are in use, then there are two situations under which we'll add the header:
1) We are sending a 200 OK with a Session-Expires header that has a refresher parameter of "uac"
2) We are sending a 200 OK with a Session-Expires header that has a refresher parameter of "uas" and the INVITE to which we are responding had a Supported: timer header in it.
This patch also introduces another change. Prior to this change, the only way we would add a Session-Expires header in an INVITE response was if the inbound INVITE had a Supported: timer header in it. Now we always add this header if Asterisk using session-timers=originate. This is based on a table in section 9 of RFC 4028. It indicates that if the UAC does not support Session-Timers but the UAS does, then the UAS should send a Session-Expires header with a refresher parameter of "uas".</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;">Tried the following three scenarios that should have resulted in Asterisk sending a 200 OK with a Require: timer:
1. INVITE with refresher=uac
2. INVITE with refresher=uas
3. INVITE with no Session-Expires but with Supported: timer
I also tried the following scenario that should result in a 200 OK with a Session-Expires (refresher=uas) but no Require: timer header:
INVITE with no Supported: timer header present.
I plan on turning this into a testsuite test as well.</pre>
</td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-20570">ASTERISK-20570</a>
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>/branches/1.8/channels/chan_sip.c <span style="color: grey">(375481)</span></li>
<li>/branches/1.8/channels/sip/include/sip.h <span style="color: grey">(375481)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/2172/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>