<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/3601/">https://reviewboard.asterisk.org/r/3601/</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;">Well, this ended up being a lot more complex than we thought. Ugh.
First, let's make sure that the existing tests that hit accountcodes still function. Verify:
* tests/cdr/console_dial-sip_transfer
* tests/cdr/cdr_properties/blind-transfer-accountcode
Both of these use accountcode propagation in their tests, and - in the case of blind-transfer-accountcode - also check for propagation across Local channels.
This will need some tests updated in the testsuite to verify this functionality. While we could overload the existing bridging tests, there's enough propagation rules in here that it would be worthwhile having a few tests that just make sure that accountcodes get bounced across channels.
I'd suggest tests that cover the following scenarios:
* A channel with an accountcode (and only an accountcode) entering into a bridge with a channel that does/does not have an accountcode as well
* A channel with an accountcode and a peeraccount entering into a bridge with a channel that has an accountcode, and does/does not have a peeraccount as well
* Propagation of an accountcode down a chain of 2 non-optimizing Local channels
</pre>
<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/3601/diff/2/?file=60426#file60426line3330" style="color: black; font-weight: bold; text-decoration: underline;">/branches/12/main/bridge_basic.c</a>
<span style="font-weight: normal;">
(Diff revision 2)
</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; ">void ast_bridging_init_basic(void)</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">3317</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">3328</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#ebb1ba" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">3318</font></th>
<td bgcolor="#ffc5ce" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="n">personality_normal_v_table</span> <span class="o">=</span> <span class="n">ast_bridge_base_v_table</span><span class="p">;</span></pre></td>
<th bgcolor="#ebb1ba" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#ffc5ce" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">3319</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="n">personality_normal_v_table</span><span class="p">.</span><span class="n">name</span> <span class="o">=</span> <span class="s">"normal"</span><span class="p">;</span></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">3329</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="n">personality_normal_v_table</span><span class="p">.</span><span class="n">name</span> <span class="o">=</span> <span class="s">"normal"</span><span class="p">;</span></pre></td>
</tr>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">3320</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="n">personality_normal_v_table</span><span class="p">.</span><span class="n">push</span> <span class="o">=</span> <span class="n">bridge_personality_normal_push</span><span class="p">;</span></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">3330</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="n">personality_normal_v_table</span><span class="p">.</span><span class="n">push</span> <span class="o">=</span> <span class="n">bridge_personality_normal_push</span><span class="p">;</span></pre></td>
</tr>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">3321</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">3331</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#ebb1ba" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">3322</font></th>
<td bgcolor="#ffc5ce" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="n">personality_atxfer_v_table</span> <span class="o">=</span> <span class="n">ast_bridge_base_v_table</span><span class="p">;</span></pre></td>
<th bgcolor="#ebb1ba" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#ffc5ce" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">3323</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="n">personality_atxfer_v_table</span><span class="p">.</span><span class="n">name</span> <span class="o">=</span> <span class="s">"attended transfer"</span><span class="p">;</span></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">3332</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="n">personality_atxfer_v_table</span><span class="p">.</span><span class="n">name</span> <span class="o">=</span> <span class="s">"attended transfer"</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;">Why did these personalities lose the ast_bridge_base_v_table?
This means, for example, that the 'normal' personality will no longer get a vtable method for pulling, nor will it get a vtable method for bridge destruction.</pre>
</div>
<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/3601/diff/2/?file=60432#file60432line146" style="color: black; font-weight: bold; text-decoration: underline;">/branches/12/main/event.c</a>
<span style="font-weight: normal;">
(Diff revision 2)
</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 const struct ie_map {</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">146</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_EVENT_TIME_USEC</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_UINT</span><span class="p">,</span> <span class="s">"CELEventTimeUSec"</span> <span class="p">},</span></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">146</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_EVENT_TIME_USEC</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_UINT</span><span class="p">,</span> <span class="s">"CELEventTimeUSec"</span> <span class="p">},</span></pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">147</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_USEREVENT_NAME</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_<span class="hl">UINT</span></span><span class="p"><span class="hl">,</span></span> <span class="s">"CELUserEventName"</span> <span class="p">},</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">147</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_USEREVENT_NAME</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_<span class="hl">STR</span></span><span class="p"><span class="hl">,</span></span><span class="hl"> </span> <span class="s">"CELUserEventName"</span> <span class="p">},</span></pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">148</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_CIDNAME</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_STR</span><span class="p">,</span> <span class="s">"CELCIDName"</span> <span class="p">},</span></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">148</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_CIDNAME</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_STR</span><span class="p">,</span> <span class="s">"CELCIDName"</span> <span class="p">},</span></pre></td>
</tr>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">149</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_CIDNUM</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_STR</span><span class="p">,</span> <span class="s">"CELCIDNum"</span> <span class="p">},</span></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">149</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_CIDNUM</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_STR</span><span class="p">,</span> <span class="s">"CELCIDNum"</span> <span class="p">},</span></pre></td>
</tr>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">150</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_EXTEN</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_STR</span><span class="p">,</span> <span class="s">"CELExten"</span> <span class="p">},</span></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">150</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_EXTEN</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_STR</span><span class="p">,</span> <span class="s">"CELExten"</span> <span class="p">},</span></pre></td>
</tr>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">151</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_CONTEXT</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_STR</span><span class="p">,</span> <span class="s">"CELContext"</span> <span class="p">},</span></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">151</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_CONTEXT</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_STR</span><span class="p">,</span> <span class="s">"CELContext"</span> <span class="p">},</span></pre></td>
</tr>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">152</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_CHANNAME</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_STR</span><span class="p">,</span> <span class="s">"CELChanName"</span> <span class="p">},</span></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">152</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_CHANNAME</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_STR</span><span class="p">,</span> <span class="s">"CELChanName"</span> <span class="p">},</span></pre></td>
</tr>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">153</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_APPNAME</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_STR</span><span class="p">,</span> <span class="s">"CELAppName"</span> <span class="p">},</span></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">153</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_APPNAME</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_STR</span><span class="p">,</span> <span class="s">"CELAppName"</span> <span class="p">},</span></pre></td>
</tr>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">154</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_APPDATA</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_STR</span><span class="p">,</span> <span class="s">"CELAppData"</span> <span class="p">},</span></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">154</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_APPDATA</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_STR</span><span class="p">,</span> <span class="s">"CELAppData"</span> <span class="p">},</span></pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">155</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_AMAFLAGS</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_<span class="hl">STR</span></span><span class="p"><span class="hl">,</span></span><span class="hl"> </span> <span class="s">"CELAMAFlags"</span> <span class="p">},</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">155</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_AMAFLAGS</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_<span class="hl">UINT</span></span><span class="p"><span class="hl">,</span></span> <span class="s">"CELAMAFlags"</span> <span class="p">},</span></pre></td>
</tr>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">156</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_ACCTCODE</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_<span class="hl">UINT</span></span><span class="p"><span class="hl">,</span></span> <span class="s">"CELAcctCode"</span> <span class="p">},</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">156</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_ACCTCODE</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_<span class="hl">STR</span></span><span class="p"><span class="hl">,</span></span><span class="hl"> </span> <span class="s">"CELAcctCode"</span> <span class="p">},</span></pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">157</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_UNIQUEID</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_STR</span><span class="p">,</span> <span class="s">"CELUniqueID"</span> <span class="p">},</span></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">157</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_UNIQUEID</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_STR</span><span class="p">,</span> <span class="s">"CELUniqueID"</span> <span class="p">},</span></pre></td>
</tr>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">158</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_USERFIELD</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_STR</span><span class="p">,</span> <span class="s">"CELUserField"</span> <span class="p">},</span></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">158</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_USERFIELD</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_STR</span><span class="p">,</span> <span class="s">"CELUserField"</span> <span class="p">},</span></pre></td>
</tr>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">159</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_CIDANI</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_STR</span><span class="p">,</span> <span class="s">"CELCIDani"</span> <span class="p">},</span></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">159</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_CIDANI</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_STR</span><span class="p">,</span> <span class="s">"CELCIDani"</span> <span class="p">},</span></pre></td>
</tr>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">160</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_CIDRDNIS</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_STR</span><span class="p">,</span> <span class="s">"CELCIDrdnis"</span> <span class="p">},</span></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">160</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_CIDRDNIS</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_STR</span><span class="p">,</span> <span class="s">"CELCIDrdnis"</span> <span class="p">},</span></pre></td>
</tr>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">161</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_CIDDNID</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_STR</span><span class="p">,</span> <span class="s">"CELCIDdnid"</span> <span class="p">},</span></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">161</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_CIDDNID</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_STR</span><span class="p">,</span> <span class="s">"CELCIDdnid"</span> <span class="p">},</span></pre></td>
</tr>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">162</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_PEER</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_STR</span><span class="p">,</span> <span class="s">"CELPeer"</span> <span class="p">},</span></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">162</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_PEER</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_STR</span><span class="p">,</span> <span class="s">"CELPeer"</span> <span class="p">},</span></pre></td>
</tr>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">163</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_LINKEDID</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_STR</span><span class="p">,</span> <span class="s">"CELLinkedID"</span> <span class="p">},</span></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">163</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_LINKEDID</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_STR</span><span class="p">,</span> <span class="s">"CELLinkedID"</span> <span class="p">},</span></pre></td>
</tr>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">164</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_PEERACCT</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_STR</span><span class="p">,</span> <span class="s">"CELPeerAcct"</span> <span class="p">},</span></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">164</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_PEERACCT</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_STR</span><span class="p">,</span> <span class="s">"CELPeerAcct"</span> <span class="p">},</span></pre></td>
</tr>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">165</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_EXTRA</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_STR</span><span class="p">,</span> <span class="s">"CELExtra"</span> <span class="p">},</span></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">165</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_CEL_EXTRA</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_STR</span><span class="p">,</span> <span class="s">"CELExtra"</span> <span class="p">},</span></pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">166</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_SECURITY_EVENT</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_<span class="hl">STR</span></span><span class="p"><span class="hl">,</span></span><span class="hl"> </span> <span class="s">"SecurityEvent"</span> <span class="p">},</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">166</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_SECURITY_EVENT</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_<span class="hl">UINT</span></span><span class="p"><span class="hl">,</span></span> <span class="s">"SecurityEvent"</span> <span class="p">},</span></pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">167</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_EVENT_VERSION</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_UINT</span><span class="p">,</span> <span class="s">"EventVersion"</span> <span class="p">},</span></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">167</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="p">[</span><span class="n">AST_EVENT_IE_EVENT_VERSION</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">AST_EVENT_IE_PLTYPE_UINT</span><span class="p">,</span> <span class="s">"EventVersion"</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;">For the tweaks in this section that are unrelated to the accountcode changes, please commit them on a separate patch.
They don't need to be put up for review again.
Note that changes in datatypes in event.h are typically dangerous - interactions with other Asterisk systems will break (badly) if we change the data types here. Luckily, CEL and Security events are not shared across corosync, so this should be okay.</pre>
</div>
<br />
<p>- Matt Jordan</p>
<br />
<p>On June 23rd, 2014, 3:56 p.m. CDT, rmudgett 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 rmudgett.</div>
<p style="color: grey;"><i>Updated June 23, 2014, 3:56 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/AFS-65">AFS-65</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;">Accountcode propagation:
The current behavior is to simply set the accountcode of an outgoing
channel to the accountcode of the channel initiating the call. It was
done this way a long time ago to allow the accountcode set on the SIP/100
channel to be propagated to a local channel so the dialplan execution on
the Local;2 channel would have the SIP/100 accountcode available.
SIP/100 -> Local;1/Local;2 -> SIP/200
Propagating the SIP/100 accountcode to the local channels is very useful.
However, a side effect of this is it will overwrite any accountcode set by
the SIP channel driver configuration for the SIP/200 channel with the
accountcode from the Local;2 channel. Without any dialplan manipulation,
all channels in this call would have the same accountcode.
Using dialplan, you can set a different accountcode on the SIP/200 channel
either by setting the accountcode on the Local;2 channel or by the Dial
application's b(pre-dial), M(macro) or U(gosub) options, or by the
FollowMe application's b(pre-dial) option, or by the Queue application's
macro or gosub options. The altered accountcode on SIP/200 will remain
until the local channels optimized out when the accountcode would change
to the SIP/100 accountcode.
Asterisk v1.8 attempted to add peeraccount support but ultimately had to
punt on the support. The peeraccount support was rendered useless because
of how the CDR code needed to unconditionally force the caller's
accountcode onto the peer channel's accountcode. The CEL events were thus
intentionally made to always use the channel's accountcode as the
peeraccount value.
With the arrival of Asterisk v12, the situation has improved so
peeraccount support can be made to work. Using the indicated example,
the goal is to have the accountcode values become as follows:
SIP/100 ---> Local;1 ---- Local;2 ---> SIP/200
acct: 100 \/ acct: 200 \/ acct: 100 \/ acct: 200
peer: 200 /\ peer: 100 /\ peer: 200 /\ peer: 100
If a channel already has an accountcode it can only change by explicit
user command by the following methods:
1) A channel originate method that can specify an accountcode to use.
2) Dialplan using CHANNEL(accountcode).
3) Dialplan using CHANNEL(peeraccount) on the other end of a local
channel pair.
If a channel does not have an accountcode it can get one from the
following places:
1) The channel driver's configuration at channel creation.
2) Before dialing from the calling channel's peeraccount value; or as a
legacy fallback the calling channel's accountcode.
3) Explicit user command as already indicated.
4) Entering a bridge from a peer channel's peeraccount value.
You can specify the accountcode for an outgoing channel that does not have
one by setting the CHANNEL(peeraccount) before using the Dial, FollowMe,
and Queue applications.
Accountcode and peeraccount values propagate to an outgoing channel before
dialing. Accountcodes also propagate when channels enter or leave a
bridge. The peeraccount value only makes sense for channels in two party
bridges.
* Made peeraccount functional by changing accountcode propagation as
described above.
* Fixed the basic bridge sub-class to update peeraccount codes when the
number of channels in the bridge drops back down to two parties.
* Refactored ast_bridge_channel_update_accountcodes() to handle channels
joining/leaving the bridge.
* Fixed the basic bridge to not call the base pull method twice.
* Fixed CEL extracting the wrong ie value for the peeraccount. This was
done intentionally in Asterisk v1.8 when that version had to punt on
peeraccount.
* Fixed some incorrect CEL event ie types. These seem to only be used
by the unit tests now.
* Fixed a few places dealing with accountcodes that were reading from
channels without the lock held.
NOTE: This patch is against v12 because that was the original target for
the patch. However, because the peeraccount changes were more extensive
than anticipated and resulted in a larger behavior change it will only be
checked into trunk.
</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;">Set the accountcode on the initial channel and let the channel driver supply or not the accountcode for the other channel.
Without the channel driver supplying the accountcode, the outgoing channel got the same accountcode as the initial channel.
With the channel driver supplying the accountcode, the outgoing channel kept its accountcode.
Let the channel driver supply the accountcode for all endpoint channels.
Performed a DTMF attended transfer with consultation and creation of a three party bridge.
When the transferrer channel left the three party bridge, the remaining two channels got the peeraccount updated to the other party.
Throughout each of these tests, the CEL log had the expected peeraccount value. Note the peeraccount value is meaningless if the bridge contains more than two parties.</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>/branches/12/res/parking/parking_bridge_features.c <span style="color: grey">(417163)</span></li>
<li>/branches/12/main/pbx.c <span style="color: grey">(417163)</span></li>
<li>/branches/12/main/event.c <span style="color: grey">(417163)</span></li>
<li>/branches/12/main/dial.c <span style="color: grey">(417163)</span></li>
<li>/branches/12/main/core_unreal.c <span style="color: grey">(417163)</span></li>
<li>/branches/12/main/channel.c <span style="color: grey">(417163)</span></li>
<li>/branches/12/main/cel.c <span style="color: grey">(417163)</span></li>
<li>/branches/12/main/bridge_channel.c <span style="color: grey">(417163)</span></li>
<li>/branches/12/main/bridge_basic.c <span style="color: grey">(417163)</span></li>
<li>/branches/12/main/bridge.c <span style="color: grey">(417163)</span></li>
<li>/branches/12/include/asterisk/channel.h <span style="color: grey">(417163)</span></li>
<li>/branches/12/include/asterisk/bridge_channel.h <span style="color: grey">(417163)</span></li>
<li>/branches/12/apps/app_queue.c <span style="color: grey">(417163)</span></li>
<li>/branches/12/apps/app_followme.c <span style="color: grey">(417163)</span></li>
<li>/branches/12/apps/app_dial.c <span style="color: grey">(417163)</span></li>
<li>/branches/12/UPGRADE.txt <span style="color: grey">(417163)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/3601/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>