<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/1868/">https://reviewboard.asterisk.org/r/1868/</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, Mark Michelson, rmudgett, and Matt Jordan.</div>
<div>By jrose.</div>
<p style="color: grey;"><i>Updated April 16, 2012, 11:06 a.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;">Amending testing.</pre>
</td>
</tr>
</table>
<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 adds a number of new functions involving channels and call identifiers to allow the creation of callids within specific channel drivers so that log messages can be bound to a call ID before going into the PBX. The SIP channel driver is used to demonstrate the methodology involved. Also adds display of callid involved with a channel in core show channel if it is a channel that has been deliberately bound to call id.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing (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;">Normal calls, calls being transfered, calls being rejected from Chan SIP.
EDIT:
I have a few scenarios to detail, and the behavior of one of them might be less than awesome.
1 - peer A calls extension to dial peer B (single invite, no reauthorization takes place)
A call ID is generated and bound to the channel for peer A making the call. The PBX thread is started and also takes a reference to the Call ID copied from the channel. Peer is dialed and when that channel is created, it gets a reference to the call ID as well. This is pretty ideal.
2 - peer C calls extension to dial peer B (reauthorization takes place, so a second invite happens before C connects)
In this case, the first invite gets a call ID which is bound to the SIP thread momentarily before the call is confirmed as being unable to complete. Peer C sends a second invite with authorization, which causes a second call ID to be created which gets bound to the call. This is a bit of a problem since the call ID should ideally be the same for both the preauthorized and post authorized portions of the call, so it needs some work.
As for transfer scenarios, it was tested with both blind and attended transfers. In the case of a blind transfer, the call ID remains the same throughout the whole process. For attended transfers however, a new call ID is created which covers the transferring channel as well as the channel receiving the transfer. Once the transfer is completed, the transferred channel is also on the new call ID. This behavior might not be a problem, though it is perhaps a little inconsistent.</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>/team/jrose/call_identifiers/channels/chan_sip.c <span style="color: grey">(362131)</span></li>
<li>/team/jrose/call_identifiers/include/asterisk/channel.h <span style="color: grey">(362131)</span></li>
<li>/team/jrose/call_identifiers/include/asterisk/logger.h <span style="color: grey">(362131)</span></li>
<li>/team/jrose/call_identifiers/main/channel.c <span style="color: grey">(362131)</span></li>
<li>/team/jrose/call_identifiers/main/channel_internal_api.c <span style="color: grey">(362131)</span></li>
<li>/team/jrose/call_identifiers/main/cli.c <span style="color: grey">(362131)</span></li>
<li>/team/jrose/call_identifiers/main/logger.c <span style="color: grey">(362131)</span></li>
<li>/team/jrose/call_identifiers/main/pbx.c <span style="color: grey">(362131)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/1868/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>