<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/3050/">https://reviewboard.asterisk.org/r/3050/</a>
</td>
</tr>
</table>
<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/3050/diff/1/?file=49105#file49105line478" style="color: black; font-weight: bold; text-decoration: underline;">/res/res_pjsip_registrar.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 rx_task(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">478</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="tb"> </span><span class="k">if</span> <span class="p">(</span><span class="n">path_hdr</span><span class="p">)</span> <span class="p">{</span></pre></td>
</tr>
<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">479</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="tb"> </span><span class="tb"> </span><span class="n">ast_string_field_build</span><span class="p">(</span><span class="n">updated</span><span class="p">,</span> <span class="n">path</span><span class="p">,</span> <span class="s">"%.*s"</span><span class="p">,</span> <span class="p">(</span><span class="kt">int</span><span class="p">)</span><span class="n">path_hdr</span><span class="o">-></span><span class="n">hvalue</span><span class="p">.</span><span class="n">slen</span><span class="p">,</span> <span class="n">path_hdr</span><span class="o">-></span><span class="n">hvalue</span><span class="p">.</span><span class="n">ptr</span><span class="p">);</span></pre></td>
</tr>
<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">480</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="tb"> </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;">It's actually possible for there to be multiple Path headers. They may also be accumulated and be separated by ","</pre>
</div>
<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;">I have some general design comments which I think could improve things a bit:
1. I think it's time we make the contact object a parameter to request creation and session creation. In my mind as things continue to be added there's going to be additional information associated with it which may influence the creation process, and it also makes the next thing possible.
2. Make the contact available to outgoing request supplements. This would greatly simplify your supplement and could be useful further down the road for other things. One way of accomplishing this would be to store it with ref bumped on the tdata mod_data, and then after all the supplements have been invoked to simply drop the ref. It doesn't need to persist for the lifetime of tdata (and since it wouldn't it would need to be documented as such).</pre>
<p>- Joshua Colp</p>
<br />
<p>On December 5th, 2013, 7:06 p.m. UTC, opticron 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.</div>
<div>By opticron.</div>
<p style="color: grey;"><i>Updated Dec. 5, 2013, 7:06 p.m.</i></p>
<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-21084">ASTERISK-21084</a>
</div>
<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;">This adds Path support to chan_pjsip in res_pjsip_path.c with minimal additions in res_pjsip_registrar.c to store the path and additions in res_pjsip_outbound_registration.c to enable advertisement of path support to registrars and intervening proxies.
Path information is stored on contacts and is enabled via Address of Record (AoRs) and Registration configuration sections.
While adding path support, it became necessary to be able to add SIP supplements that handled messages outside of sessions, so a framework for handling these types of hooks was added in parallel to the already-existing session supplements and several senders of out-of-dialog requests were refactored as a result.</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;">This passes the tests covered by the review at https://reviewboard.asterisk.org/r/3051/
These tests were converted to work with chan_pjsip from their chan_sip counterparts.</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/res/res_pjsip_t38.c <span style="color: grey">(403395)</span></li>
<li>/trunk/res/res_pjsip_registrar.c <span style="color: grey">(403395)</span></li>
<li>/trunk/res/res_pjsip_refer.c <span style="color: grey">(403395)</span></li>
<li>/trunk/res/res_pjsip_path.c <span style="color: grey">(PRE-CREATION)</span></li>
<li>/trunk/res/res_pjsip_outbound_registration.c <span style="color: grey">(403395)</span></li>
<li>/trunk/res/res_pjsip_notify.c <span style="color: grey">(403395)</span></li>
<li>/trunk/res/res_pjsip_mwi.c <span style="color: grey">(403395)</span></li>
<li>/trunk/res/res_pjsip_messaging.c <span style="color: grey">(403395)</span></li>
<li>/trunk/res/res_pjsip_header_funcs.c <span style="color: grey">(403395)</span></li>
<li>/trunk/res/res_pjsip_diversion.c <span style="color: grey">(403395)</span></li>
<li>/trunk/res/res_pjsip_caller_id.c <span style="color: grey">(403395)</span></li>
<li>/trunk/res/res_pjsip/pjsip_options.c <span style="color: grey">(403395)</span></li>
<li>/trunk/res/res_pjsip/pjsip_distributor.c <span style="color: grey">(403395)</span></li>
<li>/trunk/res/res_pjsip/location.c <span style="color: grey">(403395)</span></li>
<li>/trunk/res/res_pjsip.c <span style="color: grey">(403395)</span></li>
<li>/trunk/include/asterisk/res_pjsip_session.h <span style="color: grey">(403395)</span></li>
<li>/trunk/include/asterisk/res_pjsip.h <span style="color: grey">(403395)</span></li>
<li>/trunk/channels/chan_pjsip.c <span style="color: grey">(403395)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/3050/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>