<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/1353/">https://reviewboard.asterisk.org/r/1353/</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 and rmudgett.</div>
<div>By Alec Davis.</div>
<p style="color: grey;"><i>Updated Aug. 26, 2011, 6:27 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;">Removed need to update each channel driver's p->owner->parent.
Only chan_local that invokes another call needs to have the p->chan->parent updated.
</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description (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;">If ast_can_pickup() can pickup the target channel, it also needs to check that the originating parent channel isn't being picked up from one of the other spawned the calls.
Example dialplan below causes a segfault as ast-hangup removes the same channel as is being picked up.
How to crash it!
dial 801 from 1 phone.
from 2 phones simultaneously dial 800.
result = segfault!
or segfault with 2 dahdi channels:
dial 803 from 1 phone.
from 2 phones simultaneously dial *8
result = segfault!
or NULL objects and orpaned channel
dial 801 or 802 from 1 phone.
from 2 phones simultaneously dial *8
result = an orphaned channel!
exten => 800,1,NoOp(Local pickup: Pickup through Localchan call)
exten => 800,n,Dial(Local/824@en-pickup&Local/823@en-pickup)
exten => 801,1,NoOp(Local pickup debug: Ring Phones)
exten => 801,n,Dial(Local/823@en-phone&Local/824@en-phone)
exten => 802,1,Dial(SIP/gxp-823&SIP/gxp-824)
exten => 803,1,Dial(DAHDI/33&DAHDI/35)
[en-pickup]
exten => _[0-9*#]!, 1, PickupChan(Local/${EXTEN}@en-phone)
[en-phone]
exten => _[0-9*#]!, 1, Dial(SIP/gxp-${EXTEN},20,rwt)</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;">Confirmed no orphaned channels, and no NULL object messages with DAHDI, SIP and LOCALCHAN calls
Example below where parent is updated sucessfully to head caller
-- Executing [801@phones:1] NoOp("SIP/snom8929-0000000b", "Debug Localchan Pickup, Ring Phones") in new stack
-- Executing [801@phones:2] Dial("SIP/snom8929-0000000b", "Local/823@en_phone&Local/824@en_phone") in new stack
[2011-08-26 22:09:26.246139] NOTICE[21577]: channel.c:5712 ast_call: ALEC parent=SIP/snom8929-0000000b
-- Called Local/823@en_phone
-- Executing [823@en_phone:1] Dial("Local/823@en_phone-9edc;2", "SIP/gxp-823,20,rwt") in new stack
== Using UDPTL CoS mark 5
== Using SIP RTP CoS mark 5
[2011-08-26 22:09:26.252722] NOTICE[21577]: channel.c:5712 ast_call: ALEC parent=SIP/snom8929-0000000b
-- Called Local/824@en_phone
-- Executing [824@en_phone:1] Dial("Local/824@en_phone-41b8;2", "SIP/gxp-824,20,rwt") in new stack
== Using UDPTL CoS mark 5
== Extension Changed 823[phones] new state Ringing for Notify User gxp-823
== Extension Changed 823[phones] new state Ringing for Notify User gxp-824
== Extension Changed 823[phones] new state Ringing for Notify User snom8929
== Using SIP RTP CoS mark 5
[2011-08-26 22:09:26.265837] NOTICE[21578]: channel.c:5712 ast_call: ALEC parent=SIP/snom8929-0000000b
-- Called SIP/gxp-823
-- Local/823@en_phone-9edc;1 is ringing
-- Local/823@en_phone-9edc;1 connected line has changed. Saving it until answer for SIP/snom8929-0000000b
-- Local/823@en_phone-9edc;1 connected line has changed. Saving it until answer for SIP/snom8929-0000000b
== Extension Changed 824[phones] new state Ringing for Notify User gxp-823
== Extension Changed 824[phones] new state Ringing for Notify User gxp-824
== Extension Changed 824[phones] new state Ringing for Notify User snom8929
[2011-08-26 22:09:26.277966] NOTICE[21579]: channel.c:5712 ast_call: ALEC parent=SIP/snom8929-0000000b
-- Called SIP/gxp-824
-- Local/824@en_phone-41b8;1 is ringing
-- Local/824@en_phone-41b8;1 connected line has changed. Saving it until answer for SIP/snom8929-0000000b
-- Local/824@en_phone-41b8;1 connected line has changed. Saving it until answer for SIP/snom8929-0000000b
-- SIP/gxp-823-0000000c is ringing
-- Executing [800@phones:1] NoOp("SIP/gxp-824-00000013", "Debug Localchan pickup") in new stack
-- Executing [800@phones:2] Dial("SIP/gxp-824-00000013", "Local/824@en_pickup&Local/823@en_pickup") in new stack
== Using SIP RTP CoS mark 5
[2011-08-26 22:11:19.238111] NOTICE[21592]: channel.c:5712 ast_call: ALEC parent=SIP/gxp-824-00000013
-- Called Local/824@en_pickup
== Extension Changed 823[phones] new state InUse&Ringing for Notify User gxp-823
== Extension Changed 823[phones] new state InUse&Ringing for Notify User gxp-824
== Extension Changed 823[phones] new state InUse&Ringing for Notify User snom8929
-- Executing [824@en_pickup:1] PickupChan("Local/824@en_pickup-c63b;2", "Local/824@en_phone") in new stack
[2011-08-26 22:11:19.248294] NOTICE[21592]: channel.c:5712 ast_call: ALEC parent=SIP/gxp-824-00000013
-- Called Local/823@en_pickup
-- Local/824@en_pickup-c63b;1 connected line has changed. Saving it until answer for SIP/gxp-824-00000013
-- Executing [823@en_pickup:1] PickupChan("Local/823@en_pickup-7a9f;2", "Local/823@en_phone") in new stack
-- Local/824@en_pickup-c63b;1 answered SIP/gxp-824-00000013
[2011-08-26 22:11:19.250604] NOTICE[21595]: app_directed_pickup.c:375 pickupchan_exec: No target channel found for Local/823@en_phone.
-- Executing [800@phones:1] NoOp("SIP/gxp-823-00000014", "Debug Localchan pickup") in new stack
-- Executing [800@phones:2] Dial("SIP/gxp-823-00000014", "Local/824@en_pickup&Local/823@en_pickup") in new stack
-- Auto fallthrough, channel 'Local/823@en_pickup-7a9f;2' status is 'UNKNOWN'
[2011-08-26 22:11:19.267860] NOTICE[21594]: channel.c:5712 ast_call: ALEC parent=SIP/gxp-823-00000014
-- Called Local/824@en_pickup
-- Executing [824@en_pickup:1] PickupChan("Local/824@en_pickup-c8ca;2", "Local/824@en_phone") in new stack
[2011-08-26 22:11:19.272006] NOTICE[21594]: channel.c:5712 ast_call: ALEC parent=SIP/gxp-823-00000014
-- Called Local/823@en_pickup
[2011-08-26 22:11:19.274014] NOTICE[21596]: app_directed_pickup.c:375 pickupchan_exec: No target channel found for Local/824@en_phone.
-- Auto fallthrough, channel 'Local/824@en_pickup-c8ca;2' status is 'UNKNOWN'
-- Executing [823@en_pickup:1] PickupChan("Local/823@en_pickup-dc84;2", "Local/823@en_phone") in new stack
[2011-08-26 22:11:19.276514] NOTICE[21597]: app_directed_pickup.c:375 pickupchan_exec: No target channel found for Local/823@en_phone.
-- Auto fallthrough, channel 'Local/823@en_pickup-dc84;2' status is 'UNKNOWN'
== Everyone is busy/congested at this time (2:0/0/2)
-- Auto fallthrough, channel 'SIP/gxp-823-00000014' status is 'CHANUNAVAIL'
asterix*CLI> core show channels
Channel Location State Application(Data)
SIP/gxp-824-00000013 800@phones:2 Up Dial(Local/824@en_pickup&Local
SIP/snom8929-0000001 (None) Up AppDial((Outgoing Line))
2 active channels
1 active call
</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-18222">ASTERISK-18222</a>,
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-18273">ASTERISK-18273</a>
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> (updated)</h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>trunk/channels/chan_local.c <span style="color: grey">(333199)</span></li>
<li>trunk/include/asterisk/channel.h <span style="color: grey">(333199)</span></li>
<li>trunk/main/channel.c <span style="color: grey">(333199)</span></li>
<li>trunk/main/features.c <span style="color: grey">(333199)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/1353/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>