[asterisk-dev] [Code Review] app_directed_pickup Implement the ability to remove a channel group on bridged channel
Alec Davis
reviewboard at asterisk.org
Fri May 27 05:01:47 CDT 2011
> On 2011-05-26 12:00:55, rmudgett wrote:
> > /trunk/main/channel.c, lines 6445-6450
> > <https://reviewboard.asterisk.org/r/1118/diff/7/?file=16740#file16740line6445>
> >
> > The defined locking order is the channels container then the channel. This is not the correct way to fix the deadlock.
>
> rmudgett wrote:
> Is the original deadlock still possible?
>
> irroot wrote:
> i will put a log message on if you want and try catch it ...
>
> i have seen this regualarly under the following circumstances
> ring all group 5+ phones not attended in evenings simultaneous pickups triggered ...
>
> ast_channel_masquerade is called with channel locked it should not be ...
>
> /*!
> * \brief Masquerade a channel
> *
> * \note Assumes _NO_ channels and _NO_ channel pvt's are locked. If a channel is locked while calling
> * this function, it invalidates our channel container locking order. All channels
> * must be unlocked before it is permissible to lock the channels' ao2 container.
> */
>
> now with ao2_callback_find locking and unlocking channels and channels this deadlock is possible AFAIK
>
> the recent changes did not sort out this possible problem due to it been locked going in...
The actual ast_do_masquerade has the requirements that nothing is locked.
But ast_channel_masquerade(), that prepares for the masquerade doesn't.
- Alec
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1118/#review3626
-----------------------------------------------------------
On 2011-05-26 13:32:29, irroot wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1118/
> -----------------------------------------------------------
>
> (Updated 2011-05-26 13:32:29)
>
>
> Review request for Asterisk Developers.
>
>
> Summary
> -------
>
> as a companion to 0018825 to aid with the move from call-limits to channel group variables. the problem with pickup and queue is that they manage channels outside the dialplan and need "helpers" to deal with channel groups.
>
> in the case of pickup when a call is placed to a extension with say a "<EXTEN>@called" channel group when it is picked up this needs to be cleared to allow further calls when call waiting is disabled.
>
> exten => s,n,GotoIf($[$[${ GROUP_COUNT(${ARG1}@called)} >= 1] | $[${GROUP_COUNT(${ARG1}@caller)} >= 1] | $[${GROUP_COUNT(${ARG1}@pickup)} >= 1] | $[${GROUP_COUNT(${ARG1}@qagent)} >= 1]]?s-BUSY,1)
>
> where
> caller is set when a call is placed.
> called is set when a call is received
> pickup is set when before calling pickup in the dialplan
> qagent is set with patch to queue
>
> Hope this is found to be useful and finds a home in trunk.
>
> not sure what time to put in the "wait for bridge" perhaps there is a better method ??
>
>
> This addresses bug 18830.
> https://issues.asterisk.org/view.php?id=18830
>
>
> Diffs
> -----
>
> /trunk/main/channel.c 320937
>
> Diff: https://reviewboard.asterisk.org/r/1118/diff
>
>
> Testing
> -------
>
>
> Thanks,
>
> irroot
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110527/bbe68413/attachment.htm>
More information about the asterisk-dev
mailing list